Skip to content
Merged
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

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?php

namespace Rector\Php\Tests\Rector\FuncCall\ParseStrWithResultArgumentRector\Fixture;

class AlreadySet
{
public function run()
{
$query = 'bla';
parse_str($query, $data);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ final class ParseStrWithResultArgumentRectorTest extends AbstractRectorTestCase
{
public function test(): void
{
$this->doTestFiles([__DIR__ . '/Fixture/fixture.php.inc', __DIR__ . '/Fixture/already_set.php.inc']);
$this->doTestFiles([__DIR__ . '/Fixture/fixture.php.inc', __DIR__ . '/Fixture/skip_already_set.php.inc']);
}

protected function getRectorClass(): string
Expand Down
12 changes: 6 additions & 6 deletions phpstan.neon
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ includes:
- 'vendor/phpstan/phpstan/conf/bleedingEdge.neon'

parameters:
# to allow intalling with various phsptan versions without reporting old errors here
# to allow installing with various phsptan versions without reporting old errors here
reportUnmatchedIgnoredErrors: false
level: max

Expand All @@ -24,7 +24,7 @@ parameters:
- '*tests/*/Source/*'
- '*tests/Source/*'
- 'packages/NodeTypeResolver/tests/Source/SomeClass.php'
# intetionally original
# intentionally original
- 'packages/Php/src/EregToPcreTransformer.php'
- '*/packages/ContributorTools/templates/*'
# part of composer
Expand All @@ -36,7 +36,7 @@ parameters:
- '#Call to function method_exists\(\) with string and (.*?) will always evaluate to false#'
- '#PHPDoc tag \@param for parameter \$node with type float is incompatible with native type PhpParser\\Node#'

# missuse of interface and class
# misuse of interface and class
- '#Parameter \#1 (.*?) expects Symfony\\Component\\DependencyInjection\\ContainerBuilder, Symfony\\Component\\DependencyInjection\\ContainerInterface given#'
- '#Method Rector\\Symfony\\Bridge\\DefaultAnalyzedSymfonyApplicationContainer::getContainer\(\) should return Symfony\\Component\\DependencyInjection\\ContainerBuilder but returns Symfony\\Component\\DependencyInjection\\Container#'

Expand All @@ -48,14 +48,14 @@ parameters:
# nette container
- '#Method Rector\\NodeTypeResolver\\DependencyInjection\\PHPStanServicesFactory::create(.*?)() should return (.*?) but returns object#'

# false postive - type is set by annotation above
# false positive - type is set by annotation above
- '#Array \(array<PhpParser\\Node\\Stmt>\) does not accept PhpParser\\Node#'
- '#Method Rector\\Php\\Rector\\TryCatch\\MultiExceptionCatchRector\:\:collectCatchKeysByContent\(\) should return array<array<int\>\> but returns array<string, array<int, int\|string\>\>#'
- '#Method Rector\\NodeTypeResolver\\PhpDoc\\NodeAnalyzer\\DocBlockManipulator::getTagByName\(\) should return PHPStan\\PhpDocParser\\Ast\\PhpDoc\\PhpDocTagNode but returns PHPStan\\PhpDocParser\\Ast\\PhpDoc\\PhpDocTagNode\|null#'
- '#Parameter \#1 \$expr of class PhpParser\\Node\\Expr\\BooleanNot constructor expects PhpParser\\Node\\Expr, PhpParser\\Node given#'
- '#Parameter \#1 \$node of method Rector\\PhpParser\\Node\\Commander\\NodeAddingCommander::wrapToExpression\(\) expects PhpParser\\Node\\Expr\|PhpParser\\Node\\Stmt, PhpParser\\Node given#'

# irelevant
# irrelevant
- '#Call to function in_array\(\) with arguments string, (.*?) and true will always evaluate to false#'
- '#Parameter \#1 \$name of class ReflectionFunction constructor expects Closure\|string, callable given#'

Expand Down Expand Up @@ -159,7 +159,7 @@ parameters:
- '#Access to an undefined property PhpParser\\Node\\Expr\:\:\$args#'

- '#Parameter \#2 \$name of method Rector\\Rector\\AbstractRector\:\:isName\(\) expects string, string\|null given#'
# cascade irelevant
# cascade irrelevant
- '#Parameter (.*?) expects array<PhpParser\\Node\\Stmt\>, array<PhpParser\\Node\> given#'

# known value
Expand Down