File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2727 "data-values/data-values" : " ~0.1|~1.0"
2828 },
2929 "require-dev" : {
30- "squizlabs/php_codesniffer" : " ~2.1 " ,
30+ "squizlabs/php_codesniffer" : " ~2.3 " ,
3131 "phpmd/phpmd" : " ~2.3"
3232 },
3333 "autoload" : {
Original file line number Diff line number Diff line change 4040 </rule >
4141
4242 <rule ref =" Generic.NamingConventions" />
43- <!-- TODO: create variation of this sniff that allows underscores in test methods -->
4443 <rule ref =" Generic.NamingConventions.CamelCapsFunctionName.ScopeNotCamelCaps" >
4544 <severity >0</severity >
4645 </rule >
7372 <rule ref =" Squiz.Functions.FunctionDuplicateArgument" />
7473 <rule ref =" Squiz.Functions.GlobalFunction" />
7574 <rule ref =" Squiz.Scope" />
75+
76+
77+ <rule ref =" Squiz.Strings.DoubleQuoteUsage" />
78+ <rule ref =" Squiz.Strings.DoubleQuoteUsage.ContainsVar" >
79+ <severity >0</severity >
80+ </rule >
81+
7682 <rule ref =" Squiz.WhiteSpace.CastSpacing" />
7783 <rule ref =" Squiz.WhiteSpace.LanguageConstructSpacing" />
7884 <rule ref =" Squiz.WhiteSpace.LogicalOperatorSpacing" />
7985
80- <!-- https://github.com/squizlabs/PHP_CodeSniffer/issues/348 -->
81- <!-- <rule ref="Squiz.WhiteSpace.OperatorSpacing" />-->
86+ <rule ref =" Squiz.WhiteSpace.OperatorSpacing" >
87+ <properties >
88+ <property name =" ignoreNewlines" value =" true" />
89+ </properties >
90+ </rule >
8291
8392 <rule ref =" Squiz.WhiteSpace.ScopeClosingBrace" />
8493 <rule ref =" Squiz.WhiteSpace.ScopeKeywordSpacing" />
Original file line number Diff line number Diff line change 55 xsi : noNamespaceSchemaLocation =" http://pmd.sf.net/ruleset_xml_schema.xsd" >
66
77 <rule ref =" rulesets/codesize.xml" >
8- <exclude name =" TooManyMethods" />
98 <exclude name =" ExcessiveClassComplexity" />
109 </rule >
11- <rule ref =" rulesets/codesize.xml/TooManyMethods" >
10+
11+ <rule ref =" rulesets/controversial.xml" >
12+ <exclude name =" CamelCaseMethodName" />
13+ </rule >
14+ <rule ref =" rulesets/controversial.xml/CamelCaseMethodName" >
1215 <properties >
13- <property name =" maxmethods " value =" 20 " />
16+ <property name =" allow-underscore-test " value =" true " />
1417 </properties >
1518 </rule >
1619
17- <!-- todo: exclude the camel case method rule for the tests -->
18- <rule ref =" rulesets/controversial.xml" />
19-
2020 <rule ref =" rulesets/design.xml" />
2121
2222 <rule ref =" rulesets/naming.xml" >
Original file line number Diff line number Diff line change @@ -221,10 +221,10 @@ public function testSetClaims() {
221221 $ statements = array ( $ statement0 , $ statement1 );
222222
223223 $ item ->setClaims ( new Claims ( $ statements ) );
224- $ this ->assertEquals ( count ( $ statements ), $ item ->getStatements ()->count (), " added some statements " );
224+ $ this ->assertEquals ( count ( $ statements ), $ item ->getStatements ()->count (), ' added some statements ' );
225225
226226 $ item ->setClaims ( new Claims () );
227- $ this ->assertTrue ( $ item ->getStatements ()->isEmpty (), " should be empty again " );
227+ $ this ->assertTrue ( $ item ->getStatements ()->isEmpty (), ' should be empty again ' );
228228 }
229229
230230
Original file line number Diff line number Diff line change @@ -244,10 +244,10 @@ public function testSetClaims() {
244244 $ statements = array ( $ statement0 , $ statement1 );
245245
246246 $ property ->setClaims ( new Claims ( $ statements ) );
247- $ this ->assertEquals ( count ( $ statements ), $ property ->getStatements ()->count (), " added some statements " );
247+ $ this ->assertEquals ( count ( $ statements ), $ property ->getStatements ()->count (), ' added some statements ' );
248248
249249 $ property ->setClaims ( new Claims () );
250- $ this ->assertTrue ( $ property ->getStatements ()->isEmpty (), " should be empty again " );
250+ $ this ->assertTrue ( $ property ->getStatements ()->isEmpty (), ' should be empty again ' );
251251 }
252252
253253}
Original file line number Diff line number Diff line change @@ -279,7 +279,7 @@ public function testGetAllSnaks( Statement $statement ) {
279279 $ c += count ( $ reference ->getSnaks () );
280280 }
281281
282- $ this ->assertGreaterThanOrEqual ( $ c , count ( $ snaks ), " At least one snak per Qualifier and Reference " );
282+ $ this ->assertGreaterThanOrEqual ( $ c , count ( $ snaks ), ' At least one snak per Qualifier and Reference ' );
283283 }
284284
285285 public function testGivenNonStatement_equalsReturnsFalse () {
You can’t perform that action at this time.
0 commit comments