Skip to content

Commit

Permalink
executed php-cs-fixer
Browse files Browse the repository at this point in the history
  • Loading branch information
Chelaru Flaviu committed Jan 30, 2024
1 parent 559231e commit 81f9687
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 11 deletions.
2 changes: 1 addition & 1 deletion src/Config/Parser/MetadataParser/MetadataParser.php
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ private static function processFile(SplFileInfo $file, ContainerBuilder $contain
}

return $preProcess ? self::$map->toArray() : $gqlTypes;
} catch (\ReflectionException $e) {
} catch (ReflectionException $e) {
return $gqlTypes;
} catch (\InvalidArgumentException $e) {
throw new InvalidArgumentException(sprintf('Failed to parse GraphQL metadata from file "%s".', $file), $e->getCode(), $e);
Expand Down
18 changes: 9 additions & 9 deletions tests/Config/Parser/MetadataParserTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -619,26 +619,26 @@ public function testInvalidProviderMutationOnQuery(): void
public function testInvalidPhpFiles(): void
{
$files = [
__DIR__ . '/fixtures/annotations/Invalid/HasNoClass.php',
__DIR__ . '/fixtures/annotations/Invalid/EmptyPhpFile.php',
__DIR__ . '/fixtures/annotations/Invalid/NotAPhpFile',
__DIR__ . '/fixtures/annotations/Type/RootQuery.php',
__DIR__.'/fixtures/annotations/Invalid/HasNoClass.php',
__DIR__.'/fixtures/annotations/Invalid/EmptyPhpFile.php',
__DIR__.'/fixtures/annotations/Invalid/NotAPhpFile',
__DIR__.'/fixtures/annotations/Type/RootQuery.php',
];
$this->parser('reset', $this->parserConfig);

foreach($files as $file) {
foreach ($files as $file) {
$this->parser('preParse', new SplFileInfo($file), $this->containerBuilder, $this->parserConfig);
}

$config = [];
foreach($files as $file) {
$config += self::cleanConfig($this->parser('parse', new SplFileInfo($file), $this->containerBuilder, $this->parserConfig));
foreach ($files as $file) {
$config += self::cleanConfig($this->parser('parse', new SplFileInfo($file), $this->containerBuilder, $this->parserConfig));
}

$this->assertSame([
'RootQuery' => [
'type' => 'object'
]
'type' => 'object',
],
], $config);
}
}
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
<?php

declare(strict_types=1);
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
<?php

return function() {};
declare(strict_types=1);

return function (): void {};

0 comments on commit 81f9687

Please sign in to comment.