From 5558f967eea904295bec28a8e86ce4bcb34b68af Mon Sep 17 00:00:00 2001 From: Nicolas Dievart Date: Tue, 13 Nov 2018 15:35:19 +0100 Subject: [PATCH] CS improvement (#6) --- .php_cs.dist | 1 + docker-compose.yaml | 2 +- src/Parser/YamlParser.php | 3 +-- tests/e2e/E2ETest.php | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.php_cs.dist b/.php_cs.dist index e9052dc..21895f2 100644 --- a/.php_cs.dist +++ b/.php_cs.dist @@ -20,6 +20,7 @@ return PhpCsFixer\Config::create() 'php_unit_no_expectation_annotation' => false, 'array_syntax' => array('syntax' => 'short'), 'fopen_flags' => false, + 'native_function_invocation' => ['include' => ['@compiler_optimized']], 'ordered_imports' => true, 'protected_to_private' => false, 'return_type_declaration' => ['space_before' => 'none'], diff --git a/docker-compose.yaml b/docker-compose.yaml index fad38e5..bd97ba0 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -32,4 +32,4 @@ services: networks: - proxy depends_on: - - database + - mysql diff --git a/src/Parser/YamlParser.php b/src/Parser/YamlParser.php index 9291b0a..1e1d9eb 100644 --- a/src/Parser/YamlParser.php +++ b/src/Parser/YamlParser.php @@ -4,7 +4,6 @@ use Elao\ElaoCommandMigration\Parser\Exception\InvalidYamlSchemaException; use Symfony\Component\Yaml\Yaml; -use function is_array; class YamlParser implements ParserInterface { @@ -28,7 +27,7 @@ public function getStorageConfiguration(): array public function getMigrations(): array { if (!isset($this->configuration['elao_command_migration']['migrations']) - || !is_array($this->configuration['elao_command_migration']['migrations']) + || !\is_array($this->configuration['elao_command_migration']['migrations']) ) { throw new InvalidYamlSchemaException('Missing migrations node'); } diff --git a/tests/e2e/E2ETest.php b/tests/e2e/E2ETest.php index 683a9c3..afba858 100644 --- a/tests/e2e/E2ETest.php +++ b/tests/e2e/E2ETest.php @@ -9,7 +9,7 @@ class E2ETest extends TestCase { public function testE2E() { - $pathToFile = sprintf('%s/elao_command_migration.yaml', __DIR__ ); + $pathToFile = sprintf('%s/elao_command_migration.yaml', __DIR__); $process = new Process(sprintf('php bin/elaoCommandMigration %s', $pathToFile)); $process->run();