File tree Expand file tree Collapse file tree 5 files changed +34
-3
lines changed
SlevomatCodingStandard/Sniffs/Namespaces Expand file tree Collapse file tree 5 files changed +34
-3
lines changed Original file line number Diff line number Diff line change 55before_script :
66 - composer self-update
77script :
8- - composer install
8+ - composer install --ignore-platform-reqs
99 - vendor/bin/phing
1010after_script :
1111 - php vendor/bin/coveralls -v
Original file line number Diff line number Diff line change @@ -99,7 +99,8 @@ private function fixAlphabeticalOrder(
9999 */
100100 private function compareStrings ($ a , $ b )
101101 {
102- for ($ i = 0 ; $ i < min (strlen ($ a ), strlen ($ b )); $ i ++) {
102+ $ i = 0 ;
103+ for (; $ i < min (strlen ($ a ), strlen ($ b )); $ i ++) {
103104 if ($ this ->isSpecialCharacter ($ a [$ i ]) && !$ this ->isSpecialCharacter ($ b [$ i ])) {
104105 return -1 ;
105106 } elseif (!$ this ->isSpecialCharacter ($ a [$ i ]) && $ this ->isSpecialCharacter ($ b [$ i ])) {
Original file line number Diff line number Diff line change 55 composer,
66 lint,
77 cs,
8- tests
8+ tests,
9+ phpstan
910 " />
1011
1112 <target name =" composer" >
1617 checkreturn=" true"
1718 >
1819 <arg value =" install" />
20+ <arg value =" --ignore-platform-reqs" />
1921 </exec >
2022 </target >
2123
8183 </exec >
8284 </target >
8385
86+ <target name =" phpstan" >
87+ <php expression =" PHP_VERSION_ID >= 70000 ?'true':'false'" returnProperty =" isPHP7" level =" verbose" />
88+ <if >
89+ <equals arg1=" ${ isPHP7 } " arg2=" true" />
90+ <then >
91+ <exec
92+ executable=" vendor/bin/phpstan"
93+ logoutput=" true"
94+ passthru=" true"
95+ checkreturn=" true"
96+ >
97+ <arg value =" analyse" />
98+ <arg value =" -c" />
99+ <arg path =" phpstan.neon" />
100+ <arg path =" SlevomatCodingStandard" />
101+ <arg path =" tests" />
102+ </exec >
103+ </then >
104+ <else >
105+ <echo message =" PHPStan requires PHP 7." />
106+ </else >
107+ </if >
108+ </target >
109+
84110</project >
Original file line number Diff line number Diff line change 1212 "require-dev" : {
1313 "consistence/coding-standard" : " ^0.10" ,
1414 "phing/phing" : " ^2.9" ,
15+ "phpstan/phpstan" : " dev-dev#1cb3904e17" ,
1516 "phpunit/phpunit" : " ^5.0" ,
1617 "satooshi/php-coveralls" : " dev-master"
1718 },
Original file line number Diff line number Diff line change 1+ parameters :
2+ excludes_analyse :
3+ - */tests/*/data/*
You can’t perform that action at this time.
0 commit comments