Skip to content
This repository was archived by the owner on Jan 29, 2020. It is now read-only.

Feature - extended CS sniffs #109

Closed
wants to merge 3 commits into from
Closed
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
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,5 @@ tmp/
zf-mkdoc-theme/
clover.xml
coveralls-upload.json
phpcs.xml
phpunit.xml
vendor
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"ext-phar": "*",
"doctrine/annotations": "~1.0",
"zendframework/zend-stdlib": "^2.7 || ^3.0",
"squizlabs/php_codesniffer": "^2.5",
"zendframework/zend-coding-standard": "dev-feature/sniffs",
"phpunit/PHPUnit": "^4.8.21"
},
"suggest": {
Expand Down
133 changes: 72 additions & 61 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 22 additions & 0 deletions phpcs.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?xml version="1.0"?>
<ruleset name="Zend Framework Coding Standard">
<rule ref="./vendor/zendframework/zend-coding-standard/ruleset.xml"/>

<rule ref="ZendCodingStandard.Commenting.FunctionComment.TypeHintMissing">
<severity>0</severity>
</rule>

<rule ref="ZendCodingStandard.NamingConventions.ValidVariableName.NotCamelCaps">
<exclude-pattern>src/Scanner/AnnotationScanner.php</exclude-pattern>
<exclude-pattern>src/Scanner/ClassScanner.php</exclude-pattern>
<exclude-pattern>src/Scanner/DocBlockScanner.php</exclude-pattern>
<exclude-pattern>src/Scanner/MethodScanner.php</exclude-pattern>
<exclude-pattern>src/Scanner/TokenArrayScanner.php</exclude-pattern>
Copy link
Member Author

Choose a reason for hiding this comment

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

In these files we have variables like: $MACRO_STREAM_ADVANCE_CHAR. Probably we can rename all these variables there and then remove this exception here. Or is there any other reason why we have uppercase, underscore separated variable names there?

</rule>

<!-- Paths to check -->
<file>src</file>
<file>test</file>
<exclude-pattern>*/TestAsset/*</exclude-pattern>
<exclude-pattern>*/_files/*</exclude-pattern>
</ruleset>
Loading