diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon new file mode 100644 index 0000000..9871369 --- /dev/null +++ b/phpstan-baseline.neon @@ -0,0 +1,86 @@ +parameters: + ignoreErrors: + - + message: "#^Parameter \\$apply of method Kocal\\\\BiomeJsBundle\\\\BiomeJs\\:\\:check\\(\\) expects bool, mixed given\\.$#" + count: 1 + path: src/Command/BiomeJsCheckCommand.php + + - + message: "#^Parameter \\$applyUnsafe of method Kocal\\\\BiomeJsBundle\\\\BiomeJs\\:\\:check\\(\\) expects bool, mixed given\\.$#" + count: 1 + path: src/Command/BiomeJsCheckCommand.php + + - + message: "#^Parameter \\$changed of method Kocal\\\\BiomeJsBundle\\\\BiomeJs\\:\\:check\\(\\) expects bool, mixed given\\.$#" + count: 1 + path: src/Command/BiomeJsCheckCommand.php + + - + message: "#^Parameter \\$formatterEnabled of method Kocal\\\\BiomeJsBundle\\\\BiomeJs\\:\\:check\\(\\) expects bool, mixed given\\.$#" + count: 1 + path: src/Command/BiomeJsCheckCommand.php + + - + message: "#^Parameter \\$linterEnabled of method Kocal\\\\BiomeJsBundle\\\\BiomeJs\\:\\:check\\(\\) expects bool, mixed given\\.$#" + count: 1 + path: src/Command/BiomeJsCheckCommand.php + + - + message: "#^Parameter \\$organizeImportsEnabled of method Kocal\\\\BiomeJsBundle\\\\BiomeJs\\:\\:check\\(\\) expects bool, mixed given\\.$#" + count: 1 + path: src/Command/BiomeJsCheckCommand.php + + - + message: "#^Parameter \\$path of method Kocal\\\\BiomeJsBundle\\\\BiomeJs\\:\\:check\\(\\) expects array\\, mixed given\\.$#" + count: 1 + path: src/Command/BiomeJsCheckCommand.php + + - + message: "#^Parameter \\$since of method Kocal\\\\BiomeJsBundle\\\\BiomeJs\\:\\:check\\(\\) expects string\\|null, mixed given\\.$#" + count: 1 + path: src/Command/BiomeJsCheckCommand.php + + - + message: "#^Parameter \\$staged of method Kocal\\\\BiomeJsBundle\\\\BiomeJs\\:\\:check\\(\\) expects bool, mixed given\\.$#" + count: 1 + path: src/Command/BiomeJsCheckCommand.php + + - + message: "#^Parameter \\$changed of method Kocal\\\\BiomeJsBundle\\\\BiomeJs\\:\\:ci\\(\\) expects bool, mixed given\\.$#" + count: 1 + path: src/Command/BiomeJsCiCommand.php + + - + message: "#^Parameter \\$formatterEnabled of method Kocal\\\\BiomeJsBundle\\\\BiomeJs\\:\\:ci\\(\\) expects bool, mixed given\\.$#" + count: 1 + path: src/Command/BiomeJsCiCommand.php + + - + message: "#^Parameter \\$linterEnabled of method Kocal\\\\BiomeJsBundle\\\\BiomeJs\\:\\:ci\\(\\) expects bool, mixed given\\.$#" + count: 1 + path: src/Command/BiomeJsCiCommand.php + + - + message: "#^Parameter \\$organizeImportsEnabled of method Kocal\\\\BiomeJsBundle\\\\BiomeJs\\:\\:ci\\(\\) expects bool, mixed given\\.$#" + count: 1 + path: src/Command/BiomeJsCiCommand.php + + - + message: "#^Parameter \\$path of method Kocal\\\\BiomeJsBundle\\\\BiomeJs\\:\\:ci\\(\\) expects array\\, mixed given\\.$#" + count: 1 + path: src/Command/BiomeJsCiCommand.php + + - + message: "#^Parameter \\$since of method Kocal\\\\BiomeJsBundle\\\\BiomeJs\\:\\:ci\\(\\) expects string\\|null, mixed given\\.$#" + count: 1 + path: src/Command/BiomeJsCiCommand.php + + - + message: "#^Call to an undefined method Symfony\\\\Component\\\\Config\\\\Definition\\\\Builder\\\\NodeParentInterface\\:\\:end\\(\\)\\.$#" + count: 1 + path: src/DependencyInjection/BiomeJsExtension.php + + - + message: "#^Method Kocal\\\\BiomeJsBundle\\\\DependencyInjection\\\\BiomeJsExtension\\:\\:getConfiguration\\(\\) has parameter \\$config with no value type specified in iterable type array\\.$#" + count: 1 + path: src/DependencyInjection/BiomeJsExtension.php diff --git a/phpstan.neon.dist b/phpstan.neon.dist index c7a5610..24a0319 100644 --- a/phpstan.neon.dist +++ b/phpstan.neon.dist @@ -1,3 +1,6 @@ +includes: + - phpstan-baseline.neon + parameters: level: max diff --git a/src/DependencyInjection/BiomeJsExtension.php b/src/DependencyInjection/BiomeJsExtension.php index bbbc736..269cc05 100644 --- a/src/DependencyInjection/BiomeJsExtension.php +++ b/src/DependencyInjection/BiomeJsExtension.php @@ -20,13 +20,14 @@ public function load(array $configs, ContainerBuilder $container) $loader->load('services.php'); $configuration = $this->getConfiguration($configs, $container); + /** @var array $config */ $config = $this->processConfiguration($configuration, $configs); $container->getDefinition('biomejs.binary') ->setArgument(2, $config['binary_version']); } - public function getConfiguration(array $config, ContainerBuilder $container): ?ConfigurationInterface + public function getConfiguration(array $config, ContainerBuilder $container): ConfigurationInterface { return $this; }