Fix some code samples (#1239)

* Fix code sample

* Fix code sample

* Fix code sample

* Fix code sample
This commit is contained in:
Jacob Dreesen 2019-03-20 02:48:38 +01:00 committed by Tomáš Votruba
parent 2835c2656d
commit 93dfcf288e
4 changed files with 6 additions and 6 deletions

View File

@ -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");'
),
]

View File

@ -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
),
]

View File

@ -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]);')]
);
}

View File

@ -87,7 +87,7 @@ class SomeExtension extends Twig_Extension
];
}
public function getFilteres()
public function getFilters()
{
return [
new Twig_SimpleFilter('is_mobile', [$this, 'isMobile']),