-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Methods for StreamWrapper are declared in error #1003
Comments
What are you proposing? |
The idea would be the test of the name of the method and if it is in the list of the methods from StreamWrapper, that doesn't trigger any error. |
There can be another class in the system having these methods and not in any relation with StreamWrapper. When using vendor code that doesn't comply with standard of the project there is no much we can do about it. |
Yeah, you're right : StreamWrapper classes can't be detected as instance of StreamWrapper. So the solution would be ignoreLine and specific rules... #604 |
Closing this as I can't see a way of ignoring these method names without hard-coding them (and a lot of others). Excluding specific rules for files can already be done in a ruleset.xml file, so I'd recommend that. Being able to do it with code comments is a useful feature, and linked in the comment above. |
Hi I use PHP_CS for PHPOffice\PHPExcel, we have some classes that we use with streams.
But for PHPCS, methods for these classes are in error but it's the implementation for StreamWrapper.
Travis CI Errors : https://travis-ci.org/PHPOffice/PHPExcel/jobs/130181980#L325
Code : https://github.com/PHPOffice/PHPExcel/blob/1.9/src/PhpSpreadsheet/Shared/OLE/ChainedBlockStream.php
Doc PHP : http://php.net/manual/en/class.streamwrapper.php
Poke @MarkBaker
The text was updated successfully, but these errors were encountered: