Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ class AddArrayAccessInterfaceReturnTypesTest extends AbstractRectorTestCase
/**
* @dataProvider provideData()
*/
public function test(SmartFileInfo $fileInfo): void
public function test(string $fileInfo): void
{
$this->doTestFileInfo($fileInfo);
$this->doTestFile($fileInfo);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ class ReplaceMbStrposNullLimitTest extends AbstractRectorTestCase
/**
* @dataProvider provideData()
*/
public function test(SmartFileInfo $fileInfo): void
public function test(string $fileInfo): void
{
$this->doTestFileInfo($fileInfo);
$this->doTestFile($fileInfo);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ class ReplaceNewDateTimeNullTest extends AbstractRectorTestCase
/**
* @dataProvider provideData()
*/
public function test(SmartFileInfo $fileInfo): void
public function test(string $fileInfo): void
{
$this->doTestFileInfo($fileInfo);
$this->doTestFile($fileInfo);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ class ReplacePregSplitNullLimitTest extends AbstractRectorTestCase
/**
* @dataProvider provideData()
*/
public function test(SmartFileInfo $fileInfo): void
public function test(string $fileInfo): void
{
$this->doTestFileInfo($fileInfo);
$this->doTestFile($fileInfo);
}

/**
Expand Down
6 changes: 4 additions & 2 deletions Magento2/Sniffs/Legacy/TableNameSniff.php
Original file line number Diff line number Diff line change
Expand Up @@ -189,8 +189,10 @@ private function checkOccurrencesInProperty(File $phpcsFile, int $stackPtr, arra
private function checkOccurrencesInArray(File $phpcsFile, int $stackPtr, array $tokens): void
{
$aliasPos = $phpcsFile->findPrevious(
T_CONSTANT_ENCAPSED_STRING,
$stackPtr -1
T_WHITESPACE,
$stackPtr - 1,
null,
true,
);

$alias = trim($tokens[$aliasPos]['content'], '\'"');
Expand Down
2 changes: 2 additions & 0 deletions Magento2/Tests/Legacy/TableNameUnitTest.inc
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ $select = $connection->select()->from(
['main_table' => 'magento_sample_table']
);

$fooBar=array(0=>array(125,0,875,750),'33' =>array(85,0,194,716), 10 => 100);

class Collection extends \Magento\Sales\Model\ResourceModel\Report\Order\Collection
{
/**
Expand Down
2 changes: 1 addition & 1 deletion Magento2/Tests/Legacy/TableNameUnitTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public function getErrorList($testFile = '')
7 => 1,
16 => 1,
20 => 1,
38 => 1,
40 => 1,
];
}

Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"ext-dom": "*",
"phpcompatibility/php-compatibility": "^9.3",
"squizlabs/php_codesniffer": "^3.6.1",
"rector/rector": "^0.13.0"
"rector/rector": "^0.14.8"
},
"require-dev": {
"phpunit/phpunit": "^9.5.8"
Expand Down
73 changes: 35 additions & 38 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.