File tree Expand file tree Collapse file tree 5 files changed +36
-19
lines changed Expand file tree Collapse file tree 5 files changed +36
-19
lines changed Original file line number Diff line number Diff line change 255
255
<severity >0</severity >
256
256
</rule >
257
257
258
- <rule ref =" Squiz.Functions.MultiLineFunctionDeclaration" />
258
+ <rule ref =" Squiz.Functions.MultiLineFunctionDeclaration" >
259
+ <properties >
260
+ <property name =" indent" value =" 2" />
261
+ </properties >
262
+ </rule >
263
+ <!-- Disable some errors that are already coverd by other sniffs. -->
259
264
<rule ref =" Squiz.Functions.MultiLineFunctionDeclaration.BraceOnSameLine" >
260
265
<severity >0</severity >
261
266
</rule >
262
267
<rule ref =" Squiz.Functions.MultiLineFunctionDeclaration.ContentAfterBrace" >
263
268
<severity >0</severity >
264
269
</rule >
265
- <!-- Standard yet to be finalized on this (https://www.drupal.org/node/1539712). -->
266
- <rule ref =" Squiz.Functions.MultiLineFunctionDeclaration.FirstParamSpacing" >
267
- <severity >0</severity >
268
- </rule >
269
- <rule ref =" Squiz.Functions.MultiLineFunctionDeclaration.Indent" >
270
- <severity >0</severity >
271
- </rule >
272
- <rule ref =" Squiz.Functions.MultiLineFunctionDeclaration.CloseBracketLine" >
273
- <severity >0</severity >
274
- </rule >
275
270
276
271
<rule ref =" Squiz.PHP.LowercasePHPFunctions" />
277
272
<rule ref =" Squiz.PHP.NonExecutableCode" />
Original file line number Diff line number Diff line change @@ -382,7 +382,8 @@ protected function getErrorList(string $testFile): array
382
382
836 => 1 ,
383
383
838 => 1 ,
384
384
849 => 2 ,
385
- 855 => 2 ,
385
+ 860 => 1 ,
386
+ 864 => 2 ,
386
387
];
387
388
}//end switch
388
389
Original file line number Diff line number Diff line change @@ -852,4 +852,13 @@ public static function test() {
852
852
853
853
}
854
854
855
+ /**
856
+ * Multi-line function declaration brace should be on a new line.
857
+ */
858
+ function test29 (
859
+ int $ a ,
860
+ string $ b ) {
861
+ echo "Hello " ;
862
+ }
863
+
855
864
?>
Original file line number Diff line number Diff line change @@ -905,3 +905,13 @@ class ScopeKeyword {
905
905
}
906
906
907
907
}
908
+
909
+ /**
910
+ * Multi-line function declaration brace should be on a new line.
911
+ */
912
+ function test29(
913
+ int $a,
914
+ string $b
915
+ ) {
916
+ echo "Hello";
917
+ }
Original file line number Diff line number Diff line change @@ -1468,14 +1468,16 @@ function test17($arg) {
1468
1468
}
1469
1469
1470
1470
/**
1471
- * Ignore indentation of multi-line function declarations.
1471
+ * Indentation of multi-line function declarations is standardized .
1472
1472
*/
1473
- function test18 (ConfigFactoryInterface $ config_factory ,
1474
- EntityTypeManagerInterface $ entity_type_manager ,
1475
- CacheTagsInvalidatorInterface $ cache_invalidator ,
1476
- ModuleHandlerInterface $ module_handler ,
1477
- EntityFieldManagerInterface $ entity_field_manager ,
1478
- EntityTypeBundleInfoInterface $ entity_type_bundle_info ) {
1473
+ function test18 (
1474
+ ConfigFactoryInterface $ config_factory ,
1475
+ EntityTypeManagerInterface $ entity_type_manager ,
1476
+ CacheTagsInvalidatorInterface $ cache_invalidator ,
1477
+ ModuleHandlerInterface $ module_handler ,
1478
+ EntityFieldManagerInterface $ entity_field_manager ,
1479
+ EntityTypeBundleInfoInterface $ entity_type_bundle_info
1480
+ ) {
1479
1481
return 0 ;
1480
1482
}
1481
1483
You can’t perform that action at this time.
0 commit comments