@@ -1214,26 +1214,39 @@ Additionally, thanks to [Alexander Turek][@derrabus] for consulting on the repo
1214
1214
- This check has been missing from these standards, but has now been implemented
1215
1215
- When using the PEAR standard, the error code is PEAR.Functions.FunctionCallSignature.FirstArgumentPosition
1216
1216
- When using PSR2 or PSR12, the error code is PSR2.Methods.FunctionCallSignature.FirstArgumentPosition
1217
- - PSR12.ControlStructures.BooleanOperatorPlacement no longer complains when multiple expression appears on the same line
1218
- - Previously, boolean operators were enforce to appear at the start or end of lines only
1217
+ - PSR12.ControlStructures.BooleanOperatorPlacement no longer complains when multiple expressions appear on the same line
1218
+ - Previously, boolean operators were enforced to appear at the start or end of lines only
1219
1219
- Boolean operators can now appear in the middle of the line
1220
1220
- PSR12.Files.FileHeader no longer ignores comments preceding a use, namespace, or declare statement
1221
1221
- PSR12.Files.FileHeader now allows a hashbang line at the top of the file
1222
1222
1223
1223
### Fixed
1224
- - Fixed bug #2506 : PSR2 standard can't auto fix multi-line function call inside a string concat statement
1225
- - Fixed bug #2530 : PEAR.Commenting.FunctionComment does not support intersection types in comments
1226
- - Fixed bug #2615 : Constant visibility false positive on non-class constants
1227
- - Fixed bug #2616 : PSR12.Files.FileHeader false positive when file only contains docblock
1228
- - Fixed bug #2619 : PSR12.Files.FileHeader locks up when inline comment is the last content in a file
1229
- - Fixed bug #2621 : PSR12.Classes.AnonClassDeclaration.CloseBraceSameLine false positive for anon class passed as function argument
1224
+ - Fixed bug [ #2506 ] : PSR2 standard can't auto fix multi-line function call inside a string concat statement
1225
+ - Fixed bug [ #2530 ] : PEAR.Commenting.FunctionComment does not support intersection types in comments
1226
+ - Fixed bug [ #2615 ] : Constant visibility false positive on non-class constants
1227
+ - Fixed bug [ #2616 ] : PSR12.Files.FileHeader false positive when file only contains docblock
1228
+ - Fixed bug [ #2619 ] : PSR12.Files.FileHeader locks up when inline comment is the last content in a file
1229
+ - Fixed bug [ #2621 ] : PSR12.Classes.AnonClassDeclaration.CloseBraceSameLine false positive for anon class passed as function argument
1230
1230
- Thanks to [ Martins Sipenko] [ @martinssipenko ] for the patch
1231
- - Fixed bug #2623 : PSR12.ControlStructures.ControlStructureSpacing not ignoring indentation inside multi-line string arguments
1232
- - Fixed bug #2624 : PSR12.Traits.UseDeclaration doesnt apply the correct indent during auto fixing
1233
- - Fixed bug #2626 : PSR12.Files.FileHeader detects @var annotations as file docblocks
1234
- - Fixed bug #2628 : PSR12.Traits.UseDeclaration does not allow comments above a USE declaration
1235
- - Fixed bug #2632 : Incorrect indentation of lines starting with "static" inside closures
1236
- - Fixed bug #2641 : PSR12.Functions.NullableTypeDeclaration false positive when using new static()
1231
+ - Fixed bug [ #2623 ] : PSR12.ControlStructures.ControlStructureSpacing not ignoring indentation inside multi-line string arguments
1232
+ - Fixed bug [ #2624 ] : PSR12.Traits.UseDeclaration doesnt apply the correct indent during auto fixing
1233
+ - Fixed bug [ #2626 ] : PSR12.Files.FileHeader detects @var annotations as file docblocks
1234
+ - Fixed bug [ #2628 ] : PSR12.Traits.UseDeclaration does not allow comments above a USE declaration
1235
+ - Fixed bug [ #2632 ] : Incorrect indentation of lines starting with "static" inside closures
1236
+ - Fixed bug [ #2641 ] : PSR12.Functions.NullableTypeDeclaration false positive when using new static()
1237
+
1238
+ [ #2506 ] : https://github.com/squizlabs/PHP_CodeSniffer/issues/2506
1239
+ [ #2530 ] : https://github.com/squizlabs/PHP_CodeSniffer/issues/2530
1240
+ [ #2615 ] : https://github.com/squizlabs/PHP_CodeSniffer/issues/2615
1241
+ [ #2616 ] : https://github.com/squizlabs/PHP_CodeSniffer/issues/2616
1242
+ [ #2619 ] : https://github.com/squizlabs/PHP_CodeSniffer/issues/2619
1243
+ [ #2621 ] : https://github.com/squizlabs/PHP_CodeSniffer/issues/2621
1244
+ [ #2623 ] : https://github.com/squizlabs/PHP_CodeSniffer/issues/2623
1245
+ [ #2624 ] : https://github.com/squizlabs/PHP_CodeSniffer/issues/2624
1246
+ [ #2626 ] : https://github.com/squizlabs/PHP_CodeSniffer/issues/2626
1247
+ [ #2628 ] : https://github.com/squizlabs/PHP_CodeSniffer/issues/2628
1248
+ [ #2632 ] : https://github.com/squizlabs/PHP_CodeSniffer/issues/2632
1249
+ [ #2641 ] : https://github.com/squizlabs/PHP_CodeSniffer/issues/2641
1237
1250
1238
1251
## [ 3.5.0] - 2019-09-27
1239
1252
### Changed
@@ -1259,11 +1272,11 @@ Additionally, thanks to [Alexander Turek][@derrabus] for consulting on the repo
1259
1272
- Thanks to [ Juliette Reinders Folmer] [ @jrfnl ] for the patch
1260
1273
- The tokenizer now correctly identifies inline control structures in more cases
1261
1274
- All helper methods inside the File class now throw RuntimeException instead of TokenizerException
1262
- - Some tokenizer methods were also throwing RuntimeExpection but now correctly throw TokenizerException
1275
+ - Some tokenizer methods were also throwing RuntimeException but now correctly throw TokenizerException
1263
1276
- Thanks to [ Juliette Reinders Folmer] [ @jrfnl ] for the patch
1264
1277
- The File::getMethodParameters() method now returns more information, and supports closure USE groups
1265
1278
- If a type hint is specified, the position of the last token in the hint will be set in a "type_hint_end_token" array index
1266
- - If a default is specified, the position of the first token in the default value will be set in a "default_token" array index
1279
+ - If a default is specified, the position of the first token in the default value will be set in a "default_token" array index
1267
1280
- If a default is specified, the position of the equals sign will be set in a "default_equal_token" array index
1268
1281
- If the param is not the last, the position of the comma will be set in a "comma_token" array index
1269
1282
- If the param is passed by reference, the position of the reference operator will be set in a "reference_token" array index
@@ -1323,9 +1336,9 @@ Additionally, thanks to [Alexander Turek][@derrabus] for consulting on the repo
1323
1336
- Use the Squiz.WhiteSpace.OperatorSpacing sniff to enforce spacing around assignment operators
1324
1337
- Note that this sniff checks spacing around all assignment operators, not just inside function calls
1325
1338
- The Generic.Functions.FunctionCallArgumentSpacing.NoSpaceBeforeEquals error has been removed
1326
- - use Squiz.WhiteSpace.OperatorSpacing.NoSpaceBefore instead
1339
+ - Use Squiz.WhiteSpace.OperatorSpacing.NoSpaceBefore instead
1327
1340
- The Generic.Functions.FunctionCallArgumentSpacing.NoSpaceAfterEquals error has been removed
1328
- - use Squiz.WhiteSpace.OperatorSpacing.NoSpaceAfter instead
1341
+ - Use Squiz.WhiteSpace.OperatorSpacing.NoSpaceAfter instead
1329
1342
- This also changes the PEAR/PSR2/PSR12 standards so they no longer check assignment operators inside function calls
1330
1343
- They were previously checking these operators when they should not have
1331
1344
- Thanks to [ Juliette Reinders Folmer] [ @jrfnl ] for the patch
@@ -1353,7 +1366,7 @@ Additionally, thanks to [Alexander Turek][@derrabus] for consulting on the repo
1353
1366
- Squiz.Operators.IncrementDecrementUsage now suggests pre-increment of variables instead of post-increment
1354
1367
- This change does not enforce pre-increment over post-increment; only the suggestion has changed
1355
1368
- Thanks to [ Juliette Reinders Folmer] [ @jrfnl ] for the patch
1356
- - Squiz.PHP.DisallowMultipleAssignments now has a second error code for when assignments are found inside control structure conditions
1369
+ - Squiz.PHP.DisallowMultipleAssignments now has a second error code for when assignments are found inside control structure conditions
1357
1370
- The new error code is Squiz.PHP.DisallowMultipleAssignments.FoundInControlStructure
1358
1371
- All other multiple assignment cases use the existing error code Squiz.PHP.DisallowMultipleAssignments.Found
1359
1372
- Thanks to [ Juliette Reinders Folmer] [ @jrfnl ] for the patch
@@ -1371,40 +1384,63 @@ Additionally, thanks to [Alexander Turek][@derrabus] for consulting on the repo
1371
1384
- Thanks to [ Jakub Chábek] [ @grongor ] for the patch
1372
1385
1373
1386
### Fixed
1374
- - Fixed bug #2391 : Sniff-specific ignore rules inside rulesets are filtering out too many files
1387
+ - Fixed bug [ #2391 ] : Sniff-specific ignore rules inside rulesets are filtering out too many files
1375
1388
- Thanks to [ Juliette Reinders Folmer] [ @jrfnl ] and [ Willington Vega] [ @wvega ] for the patch
1376
- - Fixed bug #2478 : FunctionCommentThrowTag.WrongNumber when exception is thrown once but built conditionally
1377
- - Fixed bug #2479 : Generic.WhiteSpace.ScopeIndent error when using array destructing with exact indent checking
1378
- - Fixed bug #2498 : Squiz.Arrays.ArrayDeclaration.MultiLineNotAllowed autofix breaks heredoc
1379
- - Fixed bug #2502 : Generic.WhiteSpace.ScopeIndent false positives with nested switch indentation and case fall-through
1380
- - Fixed bug #2504 : Generic.WhiteSpace.ScopeIndent false positives with nested arrays and nowdoc string
1381
- - Fixed bug #2511 : PSR2 standard not checking if closing paren of single-line function declaration is on new line
1382
- - Fixed bug #2512 : Squiz.PHP.NonExecutableCode does not support alternate SWITCH control structure
1389
+ - Fixed bug [ #2478 ] : FunctionCommentThrowTag.WrongNumber when exception is thrown once but built conditionally
1390
+ - Fixed bug [ #2479 ] : Generic.WhiteSpace.ScopeIndent error when using array destructing with exact indent checking
1391
+ - Fixed bug [ #2498 ] : Squiz.Arrays.ArrayDeclaration.MultiLineNotAllowed autofix breaks heredoc
1392
+ - Fixed bug [ #2502 ] : Generic.WhiteSpace.ScopeIndent false positives with nested switch indentation and case fall-through
1393
+ - Fixed bug [ #2504 ] : Generic.WhiteSpace.ScopeIndent false positives with nested arrays and nowdoc string
1394
+ - Fixed bug [ #2511 ] : PSR2 standard not checking if closing paren of single-line function declaration is on new line
1395
+ - Fixed bug [ #2512 ] : Squiz.PHP.NonExecutableCode does not support alternate SWITCH control structure
1383
1396
- Thanks to [ Juliette Reinders Folmer] [ @jrfnl ] for the patch
1384
- - Fixed bug #2522 : Text generator throws error when code sample line is too long
1397
+ - Fixed bug [ #2522 ] : Text generator throws error when code sample line is too long
1385
1398
- Thanks to [ Juliette Reinders Folmer] [ @jrfnl ] for the patch
1386
- - Fixed bug #2526 : XML report format has bad syntax on Windows
1399
+ - Fixed bug [ #2526 ] : XML report format has bad syntax on Windows
1387
1400
- Thanks to [ Juliette Reinders Folmer] [ @jrfnl ] for the patch
1388
- - Fixed bug #2529 : Generic.Formatting.MultipleStatementAlignment wrong error for assign in string concat
1389
- - Fixed bug #2534 : Unresolvable installed_paths can lead to open_basedir errors
1401
+ - Fixed bug [ #2529 ] : Generic.Formatting.MultipleStatementAlignment wrong error for assign in string concat
1402
+ - Fixed bug [ #2534 ] : Unresolvable installed_paths can lead to open_basedir errors
1390
1403
- Thanks to [ Oliver Nowak] [ @ndm2 ] for the patch
1391
- - Fixed bug #2541 : Text doc generator does not allow for multi-line rule explanations
1404
+ - Fixed bug [ #2541 ] : Text doc generator does not allow for multi-line rule explanations
1392
1405
- Thanks to [ Juliette Reinders Folmer] [ @jrfnl ] for the patch
1393
- - Fixed bug #2549 : Searching for a phpcs.xml file can throw warnings due to open_basedir restrictions
1406
+ - Fixed bug [ #2549 ] : Searching for a phpcs.xml file can throw warnings due to open_basedir restrictions
1394
1407
- Thanks to [ Matthew Peveler] [ @MasterOdin ] for the patch
1395
- - Fixed bug #2558 : PHP 7.4 throwing offset syntax with curly braces is deprecated message
1408
+ - Fixed bug [ #2558 ] : PHP 7.4 throwing offset syntax with curly braces is deprecated message
1396
1409
- Thanks to [ Matthew Peveler] [ @MasterOdin ] for the patch
1397
- - Fixed bug #2561 : PHP 7.4 compatibility fix / implode argument order
1398
- - Thanks to [ Juliette Reinders Folmer] [ @jrfnl ] for the patch
1399
- - Fixed bug #2562 : Inline WHILE triggers SpaceBeforeSemicolon incorrectly
1400
- - Thanks to [ Juliette Reinders Folmer] [ @jrfnl ] for the patch
1401
- - Fixed bug #2565 : Generic.ControlStructures.InlineControlStructure confused by mixed short/long tags
1402
- - Thanks to [ Juliette Reinders Folmer] [ @jrfnl ] for the patch
1403
- - Fixed bug #2566 : Author tag email validation doesn't support all TLDs
1404
- - Thanks to [ Juliette Reinders Folmer] [ @jrfnl ] for the patch
1405
- - Fixed bug #2575 : Custom error messages don't have data replaced when cache is enabled
1406
- - Fixed bug #2601 : Squiz.WhiteSpace.FunctionSpacing incorrect fix when spacing is 0
1407
- - Fixed bug #2608 : PSR2 throws errors for use statements when multiple namespaces are defined in a file
1410
+ - Fixed bug [ #2561 ] : PHP 7.4 compatibility fix / implode argument order
1411
+ - Thanks to [ Juliette Reinders Folmer] [ @jrfnl ] for the patch
1412
+ - Fixed bug [ #2562 ] : Inline WHILE triggers SpaceBeforeSemicolon incorrectly
1413
+ - Thanks to [ Juliette Reinders Folmer] [ @jrfnl ] for the patch
1414
+ - Fixed bug [ #2565 ] : Generic.ControlStructures.InlineControlStructure confused by mixed short/long tags
1415
+ - Thanks to [ Juliette Reinders Folmer] [ @jrfnl ] for the patch
1416
+ - Fixed bug [ #2566 ] : Author tag email validation doesn't support all TLDs
1417
+ - Thanks to [ Juliette Reinders Folmer] [ @jrfnl ] for the patch
1418
+ - Fixed bug [ #2575 ] : Custom error messages don't have data replaced when cache is enabled
1419
+ - Fixed bug [ #2601 ] : Squiz.WhiteSpace.FunctionSpacing incorrect fix when spacing is 0
1420
+ - Fixed bug [ #2608 ] : PSR2 throws errors for use statements when multiple namespaces are defined in a file
1421
+
1422
+ [ #2391 ] : https://github.com/squizlabs/PHP_CodeSniffer/issues/2391
1423
+ [ #2478 ] : https://github.com/squizlabs/PHP_CodeSniffer/issues/2478
1424
+ [ #2479 ] : https://github.com/squizlabs/PHP_CodeSniffer/issues/2479
1425
+ [ #2498 ] : https://github.com/squizlabs/PHP_CodeSniffer/issues/2498
1426
+ [ #2502 ] : https://github.com/squizlabs/PHP_CodeSniffer/pull/2502
1427
+ [ #2504 ] : https://github.com/squizlabs/PHP_CodeSniffer/pull/2504
1428
+ [ #2511 ] : https://github.com/squizlabs/PHP_CodeSniffer/issues/2511
1429
+ [ #2512 ] : https://github.com/squizlabs/PHP_CodeSniffer/issues/2512
1430
+ [ #2522 ] : https://github.com/squizlabs/PHP_CodeSniffer/pull/2522
1431
+ [ #2526 ] : https://github.com/squizlabs/PHP_CodeSniffer/issues/2526
1432
+ [ #2529 ] : https://github.com/squizlabs/PHP_CodeSniffer/issues/2529
1433
+ [ #2534 ] : https://github.com/squizlabs/PHP_CodeSniffer/pull/2534
1434
+ [ #2541 ] : https://github.com/squizlabs/PHP_CodeSniffer/pull/2541
1435
+ [ #2549 ] : https://github.com/squizlabs/PHP_CodeSniffer/issues/2549
1436
+ [ #2558 ] : https://github.com/squizlabs/PHP_CodeSniffer/issues/2558
1437
+ [ #2561 ] : https://github.com/squizlabs/PHP_CodeSniffer/pull/2561
1438
+ [ #2562 ] : https://github.com/squizlabs/PHP_CodeSniffer/issues/2562
1439
+ [ #2565 ] : https://github.com/squizlabs/PHP_CodeSniffer/issues/2565
1440
+ [ #2566 ] : https://github.com/squizlabs/PHP_CodeSniffer/issues/2566
1441
+ [ #2575 ] : https://github.com/squizlabs/PHP_CodeSniffer/issues/2575
1442
+ [ #2601 ] : https://github.com/squizlabs/PHP_CodeSniffer/pull/2601
1443
+ [ #2608 ] : https://github.com/squizlabs/PHP_CodeSniffer/issues/2608
1408
1444
1409
1445
## [ 3.4.2] - 2019-04-11
1410
1446
### Changed
0 commit comments