Skip to content

Commit b789b4e

Browse files
committed
chore: upgrade coding standard
1 parent d5fa606 commit b789b4e

File tree

13 files changed

+103
-103
lines changed

13 files changed

+103
-103
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
"require-dev": {
5858
"phpunit/phpunit": "^7 || ^8 || ^9",
5959
"phpstan/phpstan": "^1.4.6",
60-
"wdes/coding-standard": "^3",
60+
"wdes/coding-standard": "^3.3.1",
6161
"phpstan/phpstan-phpunit": "^1"
6262
},
6363
"autoload": {

scripts/generate-twig-cache.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@
7070
$twig = new TwigEnvironment(
7171
$loader,
7272
[
73-
'cache' => $cache
73+
'cache' => $cache,
7474
]
7575
);
7676
Doctum::addTwigExtensions($twig);

scripts/phar-generator-script.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ static function (string $fileRelativePath) {
279279
'phar' => [
280280
'sha256' => $phar->getSignature()['hash'],
281281
'numberOfFiles' => $phar->count(),
282-
]
282+
],
283283
];
284284

285285
file_put_contents($buildRoot . '/manifest.json', json_encode($manifest, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES));

src/Project.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -469,7 +469,7 @@ public static function isPhpTypeHint(string $hint): bool
469469
'double',
470470
'float',
471471
'callable',
472-
'$this'
472+
'$this',
473473
]
474474
);
475475
}

src/Renderer/Renderer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,7 @@ private function getTree(Project $project): string
313313
if (! isset($this->cachedTree[$key])) {
314314
$this->cachedTree[$key] = [
315315
'tree' => $this->tree->getTree($project),
316-
'treeOpenLevel' => $project->getConfig('default_opened_level')
316+
'treeOpenLevel' => $project->getConfig('default_opened_level'),
317317
];
318318
}
319319

tests/DoctumTest.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ public function testBasicGitIntegration(): void
5353
new Version(
5454
'master',
5555
'Main Branch'
56-
)
56+
),
5757
],
5858
$project->getVersions()
5959
);
@@ -88,7 +88,7 @@ public function testBasicNoGitIntegration(): void
8888
new Version(
8989
'main',
9090
'main'
91-
)
91+
),
9292
],
9393
$project->getVersions()
9494
);
@@ -124,7 +124,7 @@ public function testBasicNoGitCustomNameIntegration(): void
124124
new Version(
125125
'blob-blob-says-the-fish',
126126
'blob-blob-says-the-fish'
127-
)
127+
),
128128
],
129129
$project->getVersions()
130130
);
@@ -222,7 +222,7 @@ public function testCliOnlyVersion(): void
222222
new Version(
223223
'fouBar',
224224
'fouBar'
225-
)
225+
),
226226
],
227227
$project->getVersions()
228228
);
@@ -264,7 +264,7 @@ public function testAdvancedHackyIntegration(): void
264264
new Version(
265265
'blob-blob-says-the-fish',
266266
'blob-blob-says-the-fish'
267-
)
267+
),
268268
],
269269
$project->getVersions()
270270
);

tests/Parser/DocBlockParserTest.php

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -312,11 +312,11 @@ public function getParseTests(): array
312312
'tags' => [
313313
'throws' => [
314314
'\InvalidArgumentException.',
315-
'\Drupal\Component\Plugin\Exception\InvalidPluginDefinitionException.'
315+
'\Drupal\Component\Plugin\Exception\InvalidPluginDefinitionException.',
316316
],
317317
],
318318
],
319-
]
319+
],
320320
],
321321
[
322322
'
@@ -484,8 +484,8 @@ public function getParseTests(): array
484484
'see' => [
485485
[
486486
self::NAMESPACE . 'SomeClass::SomeMethod This is a description.',
487-
self::NAMESPACE . 'SomeClass::SomeMethod', 'This is a description.'
488-
]
487+
self::NAMESPACE . 'SomeClass::SomeMethod', 'This is a description.',
488+
],
489489
],
490490
'since' => ['1.0.1 First time this was introduced.'],
491491
'source' => ['2 1 Check that ensures lazy counting.'],
@@ -544,7 +544,7 @@ public function getParseTests(): array
544544
'see' => [[
545545
self::ALIASES['SomeClass'] . '::SomeMethod This is a description.',
546546
self::ALIASES['SomeClass'] . '::SomeMethod',
547-
'This is a description.'
547+
'This is a description.',
548548
]],
549549
'since' => ['1.0.1 First time this was introduced.'],
550550
'source' => ['2 1 Check that ensures lazy counting.'],
@@ -573,8 +573,8 @@ public function getParseTests(): array
573573
[
574574
[
575575
'string',
576-
false
577-
]
576+
false,
577+
],
578578
],
579579
'db',
580580
'database name',
@@ -588,11 +588,11 @@ public function getParseTests(): array
588588
false,
589589
],
590590
],
591-
''
591+
'',
592592
],
593-
]
593+
],
594594
],
595-
]]
595+
]],
596596
],
597597
[
598598
'/**
@@ -613,8 +613,8 @@ public function getParseTests(): array
613613
[
614614
[
615615
'bool',
616-
false
617-
]
616+
false,
617+
],
618618
],
619619
'_error',
620620
'whether user create or not',
@@ -623,16 +623,16 @@ public function getParseTests(): array
623623
[
624624
[
625625
'string',
626-
false
627-
]
626+
false,
627+
],
628628
],
629629
'real_sql_query',
630630
'SQL query for add a user',
631631
],
632632
],
633633
'return' => [
634634
'array, $message',
635-
]
635+
],
636636
],
637637
]],
638638
],

tests/Parser/NodeVisitorTest.php

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ private function getPrimitiveMethodReturnType(): array
113113
$method = new ClassMethod(
114114
'testMethod',
115115
[
116-
'returnType' => 'string'
116+
'returnType' => 'string',
117117
]
118118
);
119119

@@ -154,7 +154,7 @@ private function getClassMethodReturnType(): array
154154
return [
155155
$classReflection,
156156
$method,
157-
$expectedReturnType
157+
$expectedReturnType,
158158
];
159159
}
160160

@@ -180,7 +180,7 @@ private function getNullableMethodReturnType(): array
180180
return [
181181
$classReflection,
182182
$method,
183-
$expectedReturnType
183+
$expectedReturnType,
184184
];
185185
}
186186

@@ -399,7 +399,7 @@ public function testUpdateMethodParametersFromTags(): void
399399
'updateMethodParametersFromTags',
400400
[
401401
$function,
402-
$docBlockNode->getTag('param')
402+
$docBlockNode->getTag('param'),
403403
]
404404
)
405405
);
@@ -433,7 +433,7 @@ public function testUpdateMethodParametersFromTagsVariadic(): void
433433
'updateMethodParametersFromTags',
434434
[
435435
$function,
436-
$docBlockNode->getTag('param')
436+
$docBlockNode->getTag('param'),
437437
]
438438
)
439439
);
@@ -480,7 +480,7 @@ public function testUpdateMethodParametersFromInvalidTags(): void
480480
'updateMethodParametersFromTags',
481481
[
482482
$function,
483-
$docBlockNode->getTag('param')
483+
$docBlockNode->getTag('param'),
484484
]
485485
)
486486
);
@@ -517,7 +517,7 @@ public function testUpdateMethodParametersFromInvalidTagsReport(): void
517517
'updateMethodParametersFromTags',
518518
[
519519
$function,
520-
$docBlockNode->getTag('param')
520+
$docBlockNode->getTag('param'),
521521
]
522522
)
523523
);
@@ -548,12 +548,12 @@ public function testAddTagFromCommentToMethodInvalidHint(): void
548548
'var',
549549
$docBlockNode,
550550
$property,
551-
&$errors
551+
&$errors,
552552
]
553553
);
554554
$this->assertSame(
555555
[
556-
'The hint on "prop1" at @var is invalid: "\Illuminate\Support\Carbon;"'
556+
'The hint on "prop1" at @var is invalid: "\Illuminate\Support\Carbon;"',
557557
],
558558
$errors
559559
);
@@ -584,7 +584,7 @@ public function testAddTagFromCommentToMethodHintVariadic(): void
584584
'var',
585585
$docBlockNode,
586586
$property,
587-
&$errors
587+
&$errors,
588588
]
589589
);
590590
$this->assertSame(
@@ -618,7 +618,7 @@ public function testAddTagFromCommentToMethodReturnParam(): void
618618
'return',
619619
$docBlockNode,
620620
$property,
621-
&$errors
621+
&$errors,
622622
]
623623
);
624624
$this->assertSame('comment', $property->getHintDesc());
@@ -653,7 +653,7 @@ public function testAddTagFromCommentToMethodReturnParamNoComment(): void
653653
'return',
654654
$docBlockNode,
655655
$property,
656-
&$errors
656+
&$errors,
657657
]
658658
);
659659
$this->assertSame('', $property->getHintDesc());
@@ -689,13 +689,13 @@ public function testAddTagFromCommentToMethodReturnParamTooMuchVarTags(): void
689689
'var',
690690
$docBlockNode,
691691
$property,
692-
&$errors
692+
&$errors,
693693
]
694694
);
695695
$this->assertSame('', $property->getHintDesc());
696696
$this->assertSame(
697697
[
698-
'Too much @var tags on "myProperty" at @var found: 2 @var tags'
698+
'Too much @var tags on "myProperty" at @var found: 2 @var tags',
699699
],
700700
$errors
701701
);
@@ -727,13 +727,13 @@ public function testAddTagFromCommentToMethodReturnParamTooMuchReturnTags(): voi
727727
'return',
728728
$docBlockNode,
729729
$property,
730-
&$errors
730+
&$errors,
731731
]
732732
);
733733
$this->assertSame('', $property->getHintDesc());
734734
$this->assertSame(
735735
[
736-
'Too much @return tags on "functionName" at @return found: 2 @return tags'
736+
'Too much @return tags on "functionName" at @return found: 2 @return tags',
737737
],
738738
$errors
739739
);
@@ -752,7 +752,7 @@ public function testGetParsedSeeEntry(): void
752752
'getParsedSeeEntry',
753753
[
754754
'https://foo.tld',
755-
''
755+
'',
756756
]
757757
);
758758
$this->assertSame(
@@ -771,7 +771,7 @@ public function testGetParsedSeeEntry(): void
771771
'getParsedSeeEntry',
772772
[
773773
'Class::method()',
774-
''
774+
'',
775775
]
776776
);
777777
$this->assertSame(
@@ -790,7 +790,7 @@ public function testGetParsedSeeEntry(): void
790790
'getParsedSeeEntry',
791791
[
792792
'FooClass',
793-
''
793+
'',
794794
]
795795
);
796796
$this->assertSame(
@@ -819,7 +819,7 @@ public function testResolveSee(): void
819819
[
820820
[
821821
'Net_Sample::$foo, Net_Other::someMethod()',
822-
'https://example.com, http://foo.bar.tld/folder/'
822+
'https://example.com, http://foo.bar.tld/folder/',
823823
],
824824
]
825825
);

tests/ProjectTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ public function testGetBaseUrl(): void
150150

151151
$project = $this->getProject(
152152
[
153-
'base_url' => 'https://github.com/code-lts/doctum'
153+
'base_url' => 'https://github.com/code-lts/doctum',
154154
]
155155
);
156156

@@ -161,7 +161,7 @@ public function testGetBaseUrl(): void
161161

162162
$project = $this->getProject(
163163
[
164-
'base_url' => 'https://github.com/code-lts/doctum/'
164+
'base_url' => 'https://github.com/code-lts/doctum/',
165165
]
166166
);
167167

@@ -172,7 +172,7 @@ public function testGetBaseUrl(): void
172172

173173
$project = $this->getProject(
174174
[
175-
'base_url' => 'https://github.com/code-lts/doctum//'
175+
'base_url' => 'https://github.com/code-lts/doctum//',
176176
]
177177
);
178178

tests/Reflection/MethodReflectionTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ public function testGetExceptions(): void
6464
[
6565
'Drupal\\Component\\Plugin\\Exception\\InvalidPluginDefinitionException',
6666
'',
67-
]
67+
],
6868
],
6969
$exceptions
7070
);

0 commit comments

Comments
 (0)