@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | ->defaultValue(sys_get_temp_dir() . '/behat-code-coverage-cache') |
69 | 69 | ->end() |
70 | 70 | ->booleanNode('branchAndPathCoverage') |
71 | - ->defaultNull() // use null to mean auto |
|
71 | + ->defaultNull() // use null to mean auto |
|
72 | 72 | ->end() |
73 | 73 | ->arrayNode('filter') |
74 | 74 | ->addDefaultsIfNotSet() |
@@ -83,17 +83,17 @@ discard block |
||
83 | 83 | ->addDefaultsIfNotSet() |
84 | 84 | ->children() |
85 | 85 | ->arrayNode('directories') |
86 | - ->useAttributeAsKey('name') |
|
87 | - ->normalizeKeys(false) |
|
88 | - ->prototype('array') |
|
89 | - ->children() |
|
90 | - ->scalarNode('prefix')->defaultValue('')->end() |
|
91 | - ->scalarNode('suffix')->defaultValue('.php')->end() |
|
92 | - ->end() |
|
93 | - ->end() |
|
86 | + ->useAttributeAsKey('name') |
|
87 | + ->normalizeKeys(false) |
|
88 | + ->prototype('array') |
|
89 | + ->children() |
|
90 | + ->scalarNode('prefix')->defaultValue('')->end() |
|
91 | + ->scalarNode('suffix')->defaultValue('.php')->end() |
|
92 | + ->end() |
|
93 | + ->end() |
|
94 | 94 | ->end() |
95 | 95 | ->arrayNode('files') |
96 | - ->prototype('scalar')->end() |
|
96 | + ->prototype('scalar')->end() |
|
97 | 97 | ->end() |
98 | 98 | ->end() |
99 | 99 | ->end() |
@@ -101,17 +101,17 @@ discard block |
||
101 | 101 | ->addDefaultsIfNotSet() |
102 | 102 | ->children() |
103 | 103 | ->arrayNode('directories') |
104 | - ->useAttributeAsKey('name') |
|
105 | - ->normalizeKeys(false) |
|
106 | - ->prototype('array') |
|
107 | - ->children() |
|
108 | - ->scalarNode('prefix')->defaultValue('')->end() |
|
109 | - ->scalarNode('suffix')->defaultValue('.php')->end() |
|
110 | - ->end() |
|
111 | - ->end() |
|
104 | + ->useAttributeAsKey('name') |
|
105 | + ->normalizeKeys(false) |
|
106 | + ->prototype('array') |
|
107 | + ->children() |
|
108 | + ->scalarNode('prefix')->defaultValue('')->end() |
|
109 | + ->scalarNode('suffix')->defaultValue('.php')->end() |
|
110 | + ->end() |
|
111 | + ->end() |
|
112 | 112 | ->end() |
113 | 113 | ->arrayNode('files') |
114 | - ->prototype('scalar')->end() |
|
114 | + ->prototype('scalar')->end() |
|
115 | 115 | ->end() |
116 | 116 | ->end() |
117 | 117 | ->end() |
@@ -44,7 +44,7 @@ discard block |
||
44 | 44 | */ |
45 | 45 | public function load(ContainerBuilder $container, array $config): void |
46 | 46 | { |
47 | - $loader = new XmlFileLoader($container, new FileLocator(__DIR__ . '/Resources/config')); |
|
47 | + $loader = new XmlFileLoader($container, new FileLocator(__DIR__.'/Resources/config')); |
|
48 | 48 | |
49 | 49 | $servicesFile = 'services.xml'; |
50 | 50 | $loader->load($servicesFile); |
@@ -63,7 +63,7 @@ discard block |
||
63 | 63 | $builder |
64 | 64 | ->children() |
65 | 65 | ->scalarNode('cache') |
66 | - ->defaultValue(sys_get_temp_dir() . '/behat-code-coverage-cache') |
|
66 | + ->defaultValue(sys_get_temp_dir().'/behat-code-coverage-cache') |
|
67 | 67 | ->end() |
68 | 68 | ->booleanNode('branchAndPathCoverage') |
69 | 69 | ->defaultNull() // use null to mean auto |
@@ -199,7 +199,7 @@ discard block |
||
199 | 199 | $filterDefinition = $container->getDefinition(Filter::class); |
200 | 200 | $codeCoverageDefinition->setFactory([new Reference(self::class), 'initCodeCoverage']); |
201 | 201 | $codeCoverageDefinition->setArguments([$filterDefinition, $filterConfig, $branchPathConfig, $cacheDir, $output]); |
202 | - } catch (NoCodeCoverageDriverAvailableException|Xdebug2NotEnabledException|Xdebug3NotEnabledException $e) { |
|
202 | + } catch (NoCodeCoverageDriverAvailableException | Xdebug2NotEnabledException | Xdebug3NotEnabledException $e) { |
|
203 | 203 | $output->writeln("<comment>No code coverage driver is available. {$e->getMessage()}</comment>"); |
204 | 204 | $canCollectCodeCoverage = false; |
205 | 205 | } |
@@ -212,19 +212,19 @@ discard block |
||
212 | 212 | public function initCodeCoverage(Filter $filter, array $filterConfig, ?bool $branchPathConfig, string $cacheDir, OutputInterface $output): CodeCoverage |
213 | 213 | { |
214 | 214 | // set up filter |
215 | - array_walk($filterConfig['include']['directories'], static function (array $dir, string $path, Filter $filter): void { |
|
215 | + array_walk($filterConfig['include']['directories'], static function(array $dir, string $path, Filter $filter): void { |
|
216 | 216 | $filter->includeDirectory($path, $dir['suffix'], $dir['prefix']); |
217 | 217 | }, $filter); |
218 | 218 | |
219 | - array_walk($filterConfig['include']['files'], static function (string $file, string $key, Filter $filter): void { |
|
219 | + array_walk($filterConfig['include']['files'], static function(string $file, string $key, Filter $filter): void { |
|
220 | 220 | $filter->includeFile($file); |
221 | 221 | }, $filter); |
222 | 222 | |
223 | - array_walk($filterConfig['exclude']['directories'], static function (array $dir, string $path, Filter $filter): void { |
|
223 | + array_walk($filterConfig['exclude']['directories'], static function(array $dir, string $path, Filter $filter): void { |
|
224 | 224 | $filter->excludeDirectory($path, $dir['suffix'], $dir['prefix']); |
225 | 225 | }, $filter); |
226 | 226 | |
227 | - array_walk($filterConfig['exclude']['files'], static function (string $file, string $key, Filter $filter): void { |
|
227 | + array_walk($filterConfig['exclude']['files'], static function(string $file, string $key, Filter $filter): void { |
|
228 | 228 | $filter->excludeFile($file); |
229 | 229 | }, $filter); |
230 | 230 |
@@ -52,7 +52,7 @@ |
||
52 | 52 | } |
53 | 53 | |
54 | 54 | $node = $event->getScenario(); |
55 | - $id = $event->getFeature()->getFile() . ':' . $node->getLine(); |
|
55 | + $id = $event->getFeature()->getFile().':'.$node->getLine(); |
|
56 | 56 | |
57 | 57 | $this->coverage->start($id); |
58 | 58 | } |