Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 8d3f905

Browse files
committed
Merge branch '2.2'
2 parents eb54981 + daf0d14 commit 8d3f905

5 files changed

Lines changed: 17 additions & 13 deletions

File tree

.appveyor.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ install:
3030
- echo extension=php_openssl.dll >> php.ini
3131
- IF NOT EXIST C:\tools\composer.phar (cd C:\tools && appveyor DownloadFile https://getcomposer.org/download/1.4.1/composer.phar)
3232
- cd C:\projects\php-cs-fixer
33-
- git config --global github.accesstoken 5e7538aa415005c606ea68de2bbbade0409b4b8c
3433
- php C:\tools\composer.phar global show -ND 2>1 | findstr "hirak/prestissimo" || php C:\tools\composer.phar global require hirak/prestissimo
3534

3635
before_test:

README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,7 @@ Choose from the list of available rules:
300300
- ``space`` (``'none'``, ``'single'``): spacing to apply around the equal sign;
301301
defaults to ``'none'``
302302

303-
* **declare_strict_types**
303+
* **declare_strict_types** [@PHP70Migration:risky]
304304

305305
Force strict types declaration in all files. Requires PHP >= 7.0.
306306

src/RuleSet.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,9 @@ final class RuleSet implements RuleSetInterface
161161
),
162162
'ternary_to_null_coalescing' => true,
163163
),
164+
'@PHP70Migration:risky' => array(
165+
'declare_strict_types' => true,
166+
),
164167
'@PHP71Migration' => array(
165168
'@PHP70Migration' => true,
166169
'visibility_required' => array(

tests/AutoReview/FixerTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -166,8 +166,8 @@ private function getAllFixers()
166166
/**
167167
* copy paste from GeckoPackages/GeckoPHPUnit StringsAssertTrait, to replace with Trait when possible.
168168
*
169-
* @param mixed $actual
170-
* @param mixed $message
169+
* @param mixed $actual
170+
* @param string $message
171171
*/
172172
private static function assertStringIsNotEmpty($actual, $message = '')
173173
{

tests/Fixer/Import/OrderedImportsFixerTest.php

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1477,11 +1477,11 @@ public function testByLengthWithoutUses()
14771477
}
14781478

14791479
/**
1480+
* @param string $expected
1481+
* @param string|null $input
1482+
*
14801483
* @dataProvider provide70CasesByLength
14811484
* @requires PHP 7.0
1482-
*
1483-
* @param mixed $expected
1484-
* @param mixed $input
14851485
*/
14861486
public function test70ByLength($expected, $input = null)
14871487
{
@@ -1535,8 +1535,8 @@ public function provide70CasesByLength()
15351535
* @dataProvider provide70TypesOrderAndLength
15361536
* @requires PHP 7.0
15371537
*
1538-
* @param mixed $expected
1539-
* @param mixed $input
1538+
* @param string $expected
1539+
* @param string|null $input
15401540
*/
15411541
public function test70TypesOrderAndLength($expected, $input = null)
15421542
{
@@ -1594,14 +1594,15 @@ public function provide70TypesOrderAndLength()
15941594
* @dataProvider provide70TypesOrderAndAlphabet
15951595
* @requires PHP 7.0
15961596
*
1597-
* @param mixed $expected
1598-
* @param mixed $input
1597+
* @param string $expected
1598+
* @param string|null $input
1599+
* @param string[] $importOrder
15991600
*/
1600-
public function test70TypesOrderAndAlphabet($expected, $input = null)
1601+
public function test70TypesOrderAndAlphabet($expected, $input = null, array $importOrder = null)
16011602
{
16021603
$this->fixer->configure(array(
16031604
'sortAlgorithm' => OrderedImportsFixer::SORT_ALPHA,
1604-
'importsOrder' => array(OrderedImportsFixer::IMPORT_TYPE_CLASS, OrderedImportsFixer::IMPORT_TYPE_CONST, OrderedImportsFixer::IMPORT_TYPE_FUNCTION),
1605+
'importsOrder' => $importOrder,
16051606
));
16061607

16071608
$this->doTest($expected, $input);
@@ -1655,6 +1656,7 @@ public function provide70TypesOrderAndAlphabet()
16551656
use const some\b\{ConstE};
16561657
use function some\a\{fn_a, fn_b};
16571658
',
1659+
array(OrderedImportsFixer::IMPORT_TYPE_CLASS, OrderedImportsFixer::IMPORT_TYPE_CONST, OrderedImportsFixer::IMPORT_TYPE_FUNCTION),
16581660
),
16591661
);
16601662
}

0 commit comments

Comments
 (0)