Skip to content

Commit 491853d

Browse files
committed
CS: various array formatting fixes
These alignment issues were, for some unknown reason, not picking up by the PHPCS native sniffs. This may need investigating, but as it involves the `Squiz.Arrays.ArrayDeclaration` sniff, this is not really worth the time. Fixed now anyway by locally using a few outside sniffs.
1 parent e4c1f2f commit 491853d

File tree

6 files changed

+104
-104
lines changed

6 files changed

+104
-104
lines changed

tests/Core/Tokenizers/PHP/ArrayKeywordTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ public static function dataArrayType()
135135
'testMarker' => '/* testFunctionDeclarationParamDNFType */',
136136
],
137137
'closure param DNF type' => [
138-
'testMarker' => '/* testClosureDeclarationParamDNFType */',
138+
'testMarker' => '/* testClosureDeclarationParamDNFType */',
139139
],
140140
'arrow return DNF type' => [
141141
'testMarker' => '/* testArrowDeclarationReturnDNFType */',

tests/Core/Tokenizers/PHP/AttributesTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ public static function dataAttribute()
7474
'class attribute' => [
7575
'testMarker' => '/* testAttribute */',
7676
'tokenCodes' => [
77-
T_STRING
77+
T_STRING,
7878
],
7979
],
8080
'class attribute with param' => [
@@ -105,7 +105,7 @@ public static function dataAttribute()
105105
'function attribute' => [
106106
'testMarker' => '/* testAttributeOnFunction */',
107107
'tokenCodes' => [
108-
T_STRING
108+
T_STRING,
109109
],
110110
],
111111
'function attribute with params' => [
@@ -389,7 +389,7 @@ public static function dataAttributeOnParameters()
389389
'testMarker' => '/* testSingleAttributeOnParameter */',
390390
'position' => 4,
391391
'tokenCodes' => [
392-
T_STRING
392+
T_STRING,
393393
],
394394
],
395395
'parameter attribute; multiple comma separated, inline' => [

tests/Core/Tokenizers/PHP/BackfillFnTokenTest.php

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,10 @@ public static function dataSimple()
4545
{
4646
return [
4747
'standard' => [
48-
'testMarker' => '/* testStandard */',
48+
'testMarker' => '/* testStandard */',
4949
],
5050
'mixed case' => [
51-
'testMarker' => '/* testMixedCase */',
51+
'testMarker' => '/* testMixedCase */',
5252
],
5353
];
5454

@@ -423,28 +423,28 @@ public static function dataKeywordReturnTypes()
423423
{
424424
return [
425425
'self' => [
426-
'testMarker' => '/* testSelfReturnType */',
426+
'testMarker' => '/* testSelfReturnType */',
427427
],
428428
'parent' => [
429-
'testMarker' => '/* testParentReturnType */',
429+
'testMarker' => '/* testParentReturnType */',
430430
],
431431
'callable' => [
432-
'testMarker' => '/* testCallableReturnType */',
432+
'testMarker' => '/* testCallableReturnType */',
433433
],
434434
'array' => [
435-
'testMarker' => '/* testArrayReturnType */',
435+
'testMarker' => '/* testArrayReturnType */',
436436
],
437437
'static' => [
438-
'testMarker' => '/* testStaticReturnType */',
438+
'testMarker' => '/* testStaticReturnType */',
439439
],
440440
'false' => [
441-
'testMarker' => '/* testFalseReturnType */',
441+
'testMarker' => '/* testFalseReturnType */',
442442
],
443443
'true' => [
444-
'testMarker' => '/* testTrueReturnType */',
444+
'testMarker' => '/* testTrueReturnType */',
445445
],
446446
'null' => [
447-
'testMarker' => '/* testNullReturnType */',
447+
'testMarker' => '/* testNullReturnType */',
448448
],
449449
];
450450

tests/Core/Tokenizers/PHP/DNFTypesTest.php

Lines changed: 47 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -386,150 +386,150 @@ public static function dataDNFTypeParentheses()
386386
{
387387
return [
388388
'arrow function return type: in named parameter' => [
389-
'testMarker' => '/* testDNFTypeArrowFnReturnInNamedParam */',
389+
'testMarker' => '/* testDNFTypeArrowFnReturnInNamedParam */',
390390
],
391391
'closure return type: in named parameter' => [
392-
'testMarker' => '/* testDNFTypeClosureReturnInNamedParam */',
392+
'testMarker' => '/* testDNFTypeClosureReturnInNamedParam */',
393393
],
394394

395395
'OO const type: unqualified classes' => [
396-
'testMarker' => '/* testDNFTypeOOConstUnqualifiedClasses */',
396+
'testMarker' => '/* testDNFTypeOOConstUnqualifiedClasses */',
397397
],
398398
'OO const type: modifiers in reverse order' => [
399-
'testMarker' => '/* testDNFTypeOOConstReverseModifierOrder */',
399+
'testMarker' => '/* testDNFTypeOOConstReverseModifierOrder */',
400400
],
401401
'OO const type: multi-dnf part 1' => [
402-
'testMarker' => '/* testDNFTypeOOConstMulti1 */',
402+
'testMarker' => '/* testDNFTypeOOConstMulti1 */',
403403
],
404404
'OO const type: multi-dnf part 2' => [
405-
'testMarker' => '/* testDNFTypeOOConstMulti2 */',
405+
'testMarker' => '/* testDNFTypeOOConstMulti2 */',
406406
],
407407
'OO const type: multi-dnf part 3' => [
408-
'testMarker' => '/* testDNFTypeOOConstMulti3 */',
408+
'testMarker' => '/* testDNFTypeOOConstMulti3 */',
409409
],
410410
'OO const type: namespace relative classes' => [
411-
'testMarker' => '/* testDNFTypeOOConstNamespaceRelative */',
411+
'testMarker' => '/* testDNFTypeOOConstNamespaceRelative */',
412412
],
413413
'OO const type: partially qualified classes' => [
414-
'testMarker' => '/* testDNFTypeOOConstPartiallyQualified */',
414+
'testMarker' => '/* testDNFTypeOOConstPartiallyQualified */',
415415
],
416416
'OO const type: fully qualified classes' => [
417-
'testMarker' => '/* testDNFTypeOOConstFullyQualified */',
417+
'testMarker' => '/* testDNFTypeOOConstFullyQualified */',
418418
],
419419

420420
'OO property type: unqualified classes' => [
421-
'testMarker' => '/* testDNFTypePropertyUnqualifiedClasses */',
421+
'testMarker' => '/* testDNFTypePropertyUnqualifiedClasses */',
422422
],
423423
'OO property type: modifiers in reverse order' => [
424-
'testMarker' => '/* testDNFTypePropertyReverseModifierOrder */',
424+
'testMarker' => '/* testDNFTypePropertyReverseModifierOrder */',
425425
],
426426
'OO property type: multi-dnf namespace relative classes' => [
427-
'testMarker' => '/* testDNFTypePropertyMultiNamespaceRelative */',
427+
'testMarker' => '/* testDNFTypePropertyMultiNamespaceRelative */',
428428
],
429429
'OO property type: multi-dnf partially qualified classes' => [
430-
'testMarker' => '/* testDNFTypePropertyMultiPartiallyQualified */',
430+
'testMarker' => '/* testDNFTypePropertyMultiPartiallyQualified */',
431431
],
432432
'OO property type: multi-dnf fully qualified classes' => [
433-
'testMarker' => '/* testDNFTypePropertyMultiFullyQualified */',
433+
'testMarker' => '/* testDNFTypePropertyMultiFullyQualified */',
434434
],
435435
'OO property type: multi-dnf with readonly keyword 1' => [
436-
'testMarker' => '/* testDNFTypePropertyWithReadOnlyKeyword1 */',
436+
'testMarker' => '/* testDNFTypePropertyWithReadOnlyKeyword1 */',
437437
],
438438
'OO property type: multi-dnf with readonly keyword 2' => [
439-
'testMarker' => '/* testDNFTypePropertyWithReadOnlyKeyword2 */',
439+
'testMarker' => '/* testDNFTypePropertyWithReadOnlyKeyword2 */',
440440
],
441441
'OO property type: with static and readonly keywords' => [
442-
'testMarker' => '/* testDNFTypePropertyWithStaticAndReadOnlyKeywords */',
442+
'testMarker' => '/* testDNFTypePropertyWithStaticAndReadOnlyKeywords */',
443443
],
444444
'OO property type: with only static keyword' => [
445-
'testMarker' => '/* testDNFTypePropertyWithOnlyStaticKeyword */',
445+
'testMarker' => '/* testDNFTypePropertyWithOnlyStaticKeyword */',
446446
],
447447
'OO property type: with only final keyword' => [
448-
'testMarker' => '/* testDNFTypeWithPHP84FinalKeyword */',
448+
'testMarker' => '/* testDNFTypeWithPHP84FinalKeyword */',
449449
],
450450
'OO property type: with final and static keyword' => [
451-
'testMarker' => '/* testDNFTypeWithPHP84FinalKeywordAndStatic */',
451+
'testMarker' => '/* testDNFTypeWithPHP84FinalKeywordAndStatic */',
452452
],
453453

454454
'OO method param type: first param' => [
455-
'testMarker' => '/* testDNFTypeParam1WithAttribute */',
455+
'testMarker' => '/* testDNFTypeParam1WithAttribute */',
456456
],
457457
'OO method param type: second param, first DNF' => [
458-
'testMarker' => '/* testDNFTypeParam2 */',
458+
'testMarker' => '/* testDNFTypeParam2 */',
459459
],
460460
'OO method param type: second param, second DNF' => [
461-
'testMarker' => '/* testDNFTypeParam3 */',
461+
'testMarker' => '/* testDNFTypeParam3 */',
462462
],
463463
'OO method param type: namespace relative classes' => [
464-
'testMarker' => '/* testDNFTypeParamNamespaceRelative */',
464+
'testMarker' => '/* testDNFTypeParamNamespaceRelative */',
465465
],
466466
'OO method param type: partially qualified classes' => [
467-
'testMarker' => '/* testDNFTypeParamPartiallyQualified */',
467+
'testMarker' => '/* testDNFTypeParamPartiallyQualified */',
468468
],
469469
'OO method param type: fully qualified classes' => [
470-
'testMarker' => '/* testDNFTypeParamFullyQualified */',
470+
'testMarker' => '/* testDNFTypeParamFullyQualified */',
471471
],
472472
'Constructor property promotion with multi DNF 1' => [
473-
'testMarker' => '/* testDNFTypeConstructorPropertyPromotion1 */',
473+
'testMarker' => '/* testDNFTypeConstructorPropertyPromotion1 */',
474474
],
475475
'Constructor property promotion with multi DNF 2' => [
476-
'testMarker' => '/* testDNFTypeConstructorPropertyPromotion2 */',
476+
'testMarker' => '/* testDNFTypeConstructorPropertyPromotion2 */',
477477
],
478478
'OO method return type: multi DNF 1' => [
479-
'testMarker' => '/* testDNFTypeReturnType1 */',
479+
'testMarker' => '/* testDNFTypeReturnType1 */',
480480
],
481481
'OO method return type: multi DNF 2' => [
482-
'testMarker' => '/* testDNFTypeReturnType2 */',
482+
'testMarker' => '/* testDNFTypeReturnType2 */',
483483
],
484484
'OO abstract method return type: multi DNF 1' => [
485-
'testMarker' => '/* testDNFTypeAbstractMethodReturnType1 */',
485+
'testMarker' => '/* testDNFTypeAbstractMethodReturnType1 */',
486486
],
487487
'OO abstract method return type: multi DNF 2' => [
488-
'testMarker' => '/* testDNFTypeAbstractMethodReturnType2 */',
488+
'testMarker' => '/* testDNFTypeAbstractMethodReturnType2 */',
489489
],
490490
'OO method return type: namespace relative classes' => [
491-
'testMarker' => '/* testDNFTypeReturnTypeNamespaceRelative */',
491+
'testMarker' => '/* testDNFTypeReturnTypeNamespaceRelative */',
492492
],
493493
'OO method return type: partially qualified classes' => [
494-
'testMarker' => '/* testDNFTypeReturnPartiallyQualified */',
494+
'testMarker' => '/* testDNFTypeReturnPartiallyQualified */',
495495
],
496496
'OO method return type: fully qualified classes' => [
497-
'testMarker' => '/* testDNFTypeReturnFullyQualified */',
497+
'testMarker' => '/* testDNFTypeReturnFullyQualified */',
498498
],
499499
'function param type: with reference' => [
500-
'testMarker' => '/* testDNFTypeWithReference */',
500+
'testMarker' => '/* testDNFTypeWithReference */',
501501
],
502502
'function param type: with spread' => [
503-
'testMarker' => '/* testDNFTypeWithSpreadOperator */',
503+
'testMarker' => '/* testDNFTypeWithSpreadOperator */',
504504
],
505505
'closure param type: with illegal nullable' => [
506-
'testMarker' => '/* testDNFTypeClosureParamIllegalNullable */',
506+
'testMarker' => '/* testDNFTypeClosureParamIllegalNullable */',
507507
],
508508
'closure return type' => [
509-
'testMarker' => '/* testDNFTypeClosureReturn */',
509+
'testMarker' => '/* testDNFTypeClosureReturn */',
510510
],
511511
'closure with use return type' => [
512-
'testMarker' => '/* testDNFTypeClosureWithUseReturn */',
512+
'testMarker' => '/* testDNFTypeClosureWithUseReturn */',
513513
],
514514

515515
'arrow function param type' => [
516-
'testMarker' => '/* testDNFTypeArrowParam */',
516+
'testMarker' => '/* testDNFTypeArrowParam */',
517517
],
518518
'arrow function return type' => [
519-
'testMarker' => '/* testDNFTypeArrowReturnType */',
519+
'testMarker' => '/* testDNFTypeArrowReturnType */',
520520
],
521521
'arrow function param type with return by ref' => [
522-
'testMarker' => '/* testDNFTypeArrowParamWithReturnByRef */',
522+
'testMarker' => '/* testDNFTypeArrowParamWithReturnByRef */',
523523
],
524524

525525
'illegal syntax: unnecessary parentheses (no union)' => [
526-
'testMarker' => '/* testDNFTypeParamIllegalUnnecessaryParens */',
526+
'testMarker' => '/* testDNFTypeParamIllegalUnnecessaryParens */',
527527
],
528528
'illegal syntax: union within parentheses, intersect outside' => [
529-
'testMarker' => '/* testDNFTypeParamIllegalIntersectUnionReversed */',
529+
'testMarker' => '/* testDNFTypeParamIllegalIntersectUnionReversed */',
530530
],
531531
'illegal syntax: nested parentheses' => [
532-
'testMarker' => '/* testDNFTypeParamIllegalNestedParens */',
532+
'testMarker' => '/* testDNFTypeParamIllegalNestedParens */',
533533
],
534534
];
535535

0 commit comments

Comments
 (0)