diff --git a/.php-cs-fixer.dist.php b/.php-cs-fixer.dist.php index 93b7049a3..4c024e3e0 100644 --- a/.php-cs-fixer.dist.php +++ b/.php-cs-fixer.dist.php @@ -51,6 +51,7 @@ 'trailing_comma_in_multiline' => true, 'trim_array_spaces' => true, 'single_space_after_construct' => true, + 'single_line_comment_spacing' => true, 'no_empty_phpdoc' => true, // 7.3 only 'no_superfluous_phpdoc_tags' => true, diff --git a/Examples/processors/schema-query-parameter/scan.php b/Examples/processors/schema-query-parameter/scan.php index 27ff62d4e..7311e6ce9 100644 --- a/Examples/processors/schema-query-parameter/scan.php +++ b/Examples/processors/schema-query-parameter/scan.php @@ -29,5 +29,5 @@ $openapi = $generator ->setProcessors($processors) ->generate([__DIR__ . '/app']); -//file_put_contents(__DIR__ . '/schema-query-parameter.yaml', $openapi->toYaml()); +// file_put_contents(__DIR__ . '/schema-query-parameter.yaml', $openapi->toYaml()); echo $openapi->toYaml(); diff --git a/src/Analysers/TokenAnalyser.php b/src/Analysers/TokenAnalyser.php index 2a3916da9..07e252ced 100644 --- a/src/Analysers/TokenAnalyser.php +++ b/src/Analysers/TokenAnalyser.php @@ -120,7 +120,7 @@ protected function fromTokens(array $tokens, Context $parseContext): Analysis if ($token[0] === T_CLASS) { // Doc-comment before a class? if (is_array($previousToken) && $previousToken[0] === T_DOUBLE_COLON) { - //php 5.5 class name resolution (i.e. ClassName::class) + // php 5.5 class name resolution (i.e. ClassName::class) continue; } diff --git a/src/Annotations/AbstractAnnotation.php b/src/Annotations/AbstractAnnotation.php index b4469becd..bb44e387c 100644 --- a/src/Annotations/AbstractAnnotation.php +++ b/src/Annotations/AbstractAnnotation.php @@ -670,7 +670,7 @@ private function validateArrayType($value): bool } $count = 0; foreach ($value as $i => $item) { - //not a array, but a hash/map + // not a array, but a hash/map if ($count !== $i) { return false; } diff --git a/src/Attributes/PathItem.php b/src/Attributes/PathItem.php index be4e0da45..61604ba68 100644 --- a/src/Attributes/PathItem.php +++ b/src/Attributes/PathItem.php @@ -35,4 +35,4 @@ public function __construct( } } -//Missing parameters: get, put, post, delete, options, head, patch, trace, parameters +// Missing parameters: get, put, post, delete, options, head, patch, trace, parameters diff --git a/tests/Analysers/ReflectionAnalyserTest.php b/tests/Analysers/ReflectionAnalyserTest.php index 3563ce673..8a6685054 100644 --- a/tests/Analysers/ReflectionAnalyserTest.php +++ b/tests/Analysers/ReflectionAnalyserTest.php @@ -103,7 +103,7 @@ public function testApiDocBlockBasic(AnalyserInterface $analyser): void $this->assertIsArray($operations); $spec = $this->fixture('Apis/basic.yaml'); - //file_put_contents($spec, $analysis->openapi->toYaml()); + // file_put_contents($spec, $analysis->openapi->toYaml()); $this->assertTrue($analysis->validate()); $this->assertSpecEquals($analysis->openapi, file_get_contents($spec)); } @@ -132,7 +132,7 @@ public function testApiAttributesBasic(AnalyserInterface $analyser): void $this->assertIsArray($operations); $spec = $this->fixture('Apis/basic.yaml'); - //file_put_contents($spec, $analysis->openapi->toYaml()); + // file_put_contents($spec, $analysis->openapi->toYaml()); $this->assertTrue($analysis->validate()); $this->assertSpecEquals($analysis->openapi, file_get_contents($spec)); @@ -171,7 +171,7 @@ public function testApiMixedBasic(AnalyserInterface $analyser): void $this->assertIsArray($operations); $spec = $this->fixture('Apis/basic.yaml'); - //file_put_contents($spec, $analysis->openapi->toYaml()); + // file_put_contents($spec, $analysis->openapi->toYaml()); $this->assertTrue($analysis->validate()); $this->assertSpecEquals($analysis->openapi, file_get_contents($spec)); } diff --git a/tests/ExamplesTest.php b/tests/ExamplesTest.php index 881b8d196..bbe9131aa 100644 --- a/tests/ExamplesTest.php +++ b/tests/ExamplesTest.php @@ -182,7 +182,7 @@ public function testExamples(string $version, string $example, string $spec, arr ->setVersion($version) ->setAnalyser($analyser) ->generate([$path]); - //file_put_contents($path . '/' . $spec, $openapi->toYaml()); + // file_put_contents($path . '/' . $spec, $openapi->toYaml()); $this->assertSpecEquals( $openapi, file_get_contents($path . '/' . $spec),