Skip to content

implemented DuplicateDeclarationRule, fixes phpstan/phpstan#3475#250

Closed
dktapps wants to merge 10 commits intophpstan:masterfrom
pmmp:duplicate-declarations-rule
Closed

implemented DuplicateDeclarationRule, fixes phpstan/phpstan#3475#250
dktapps wants to merge 10 commits intophpstan:masterfrom
pmmp:duplicate-declarations-rule

Conversation

@dktapps
Copy link
Copy Markdown
Contributor

@dktapps dktapps commented Jun 18, 2020

No description provided.

Copy link
Copy Markdown
Member

@ondrejmirtes ondrejmirtes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is mostly fine, thank you :)

$this->analyse(
[
__DIR__ . '/data/duplicate-declarations.php',
],
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the indentation looks wrong

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh sorry, you're right. Anyway, look at the failing build. The files can be excluded from lint like this

phpstan-src/build.xml

Lines 118 to 150 in 6425cdf

<target name="lint">
<exec
executable="vendor/bin/parallel-lint"
logoutput="true"
passthru="true"
checkreturn="true"
>
<arg value="--colors"/>
<arg value="--exclude"/>
<arg path="tests/PHPStan/Analyser/data"/>
<arg value="--exclude"/>
<arg path="tests/PHPStan/Rules/Methods/data"/>
<arg value="--exclude"/>
<arg path="tests/PHPStan/Rules/Functions/data"/>
<arg value="--exclude"/>
<arg path="tests/PHPStan/Rules/Operators/data/invalid-inc-dec.php"/>
<arg value="--exclude"/>
<arg path="tests/PHPStan/Rules/Arrays/data/offset-access-without-dim-for-reading.php"/>
<arg value="--exclude"/>
<arg path="tests/PHPStan/Rules/Classes/data/extends-error.php"/>
<arg value="--exclude"/>
<arg path="tests/PHPStan/Rules/Classes/data/implements-error.php"/>
<arg value="--exclude"/>
<arg path="tests/PHPStan/Rules/Classes/data/interface-extends-error.php"/>
<arg value="--exclude"/>
<arg path="tests/PHPStan/Rules/Classes/data/trait-use-error.php"/>
<arg value="--exclude"/>
<arg path="tests/PHPStan/Rules/Properties/data/default-value-for-native-property-type.php"/>
<arg path="src" />
<arg path="tests" />
<arg path="compiler/src" />
</exec>
</target>

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. I noticed it had failed but I wasn't sure what to do about it.

@ondrejmirtes
Copy link
Copy Markdown
Member

Skip the tests in case self::$useStaticReflectionProvider is false. There are many tests skipped like this.

@ondrejmirtes
Copy link
Copy Markdown
Member

Merged as 5e2ba1a, thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants