mirror of
https://github.com/rectorphp/rector.git
synced 2024-06-27 13:13:31 +00:00
Fix some code samples (#1239)
* Fix code sample * Fix code sample * Fix code sample * Fix code sample
This commit is contained in:
parent
2835c2656d
commit
93dfcf288e
|
@ -46,10 +46,10 @@ final class AssertInstanceOfComparisonRector extends AbstractPHPUnitRector
|
|||
[
|
||||
new CodeSample(
|
||||
'$this->assertTrue($foo instanceof Foo, "message");',
|
||||
'$this->assertFalse($foo instanceof Foo, "message");'
|
||||
'$this->assertInstanceOf("Foo", $foo, "message");'
|
||||
),
|
||||
new CodeSample(
|
||||
'$this->assertInstanceOf("Foo", $foo, "message");',
|
||||
'$this->assertFalse($foo instanceof Foo, "message");',
|
||||
'$this->assertNotInstanceOf("Foo", $foo, "message");'
|
||||
),
|
||||
]
|
||||
|
|
|
@ -36,8 +36,8 @@ json_decode($json);
|
|||
CODE_SAMPLE
|
||||
,
|
||||
<<<'CODE_SAMPLE'
|
||||
json_encode($content, JSON_THROW_ON_ERROR
|
||||
json_decode($json, null, null, JSON_THROW_ON_ERROR););
|
||||
json_encode($content, JSON_THROW_ON_ERROR);
|
||||
json_decode($json, null, null, JSON_THROW_ON_ERROR);
|
||||
CODE_SAMPLE
|
||||
),
|
||||
]
|
||||
|
|
|
@ -20,7 +20,7 @@ final class ListSwapArrayOrderRector extends AbstractRector
|
|||
{
|
||||
return new RectorDefinition(
|
||||
'list() assigns variables in reverse order - relevant in array assign',
|
||||
[new CodeSample('list($a[], $a[]) = [1, 2];', 'list($a[], $a[]) = array_reverse([1, 2])];')]
|
||||
[new CodeSample('list($a[], $a[]) = [1, 2];', 'list($a[], $a[]) = array_reverse([1, 2]);')]
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
@ -87,7 +87,7 @@ class SomeExtension extends Twig_Extension
|
|||
];
|
||||
}
|
||||
|
||||
public function getFilteres()
|
||||
public function getFilters()
|
||||
{
|
||||
return [
|
||||
new Twig_SimpleFilter('is_mobile', [$this, 'isMobile']),
|
||||
|
|
Loading…
Reference in New Issue
Block a user