@@ -191,7 +191,7 @@ |
||
191 | 191 | */ |
192 | 192 | private function createFile(string $basePath, string $from, string $to, array $tplData) |
193 | 193 | { |
194 | - $r = array_filter($this->tpls, static function (SplFileInfo $f) use ($from) { |
|
194 | + $r = array_filter($this->tpls, static function(SplFileInfo $f) use ($from) { |
|
195 | 195 | return $f->getBasename() === $from; |
196 | 196 | }); |
197 | 197 |
@@ -93,7 +93,7 @@ |
||
93 | 93 | $containerParams = []; |
94 | 94 | |
95 | 95 | if (isset($config['checks'])) { |
96 | - $config['checks'] = array_filter($config['checks'], static function ($i) { |
|
96 | + $config['checks'] = array_filter($config['checks'], static function($i) { |
|
97 | 97 | return $i; |
98 | 98 | }); |
99 | 99 |
@@ -50,7 +50,7 @@ discard block |
||
50 | 50 | $groups = (array) (null === $groups ? [] : (\is_string($groups) ? [$groups] : $groups)); |
51 | 51 | $tags = (array) (null === $tags ? [] : (\is_string($tags) ? [$tags] : $tags)); |
52 | 52 | |
53 | - $check = array_filter($this->toArray(), static function (CheckInterface $c) use ($alias, $groups, $tags) { |
|
53 | + $check = array_filter($this->toArray(), static function(CheckInterface $c) use ($alias, $groups, $tags) { |
|
54 | 54 | $inAlias = ($alias) ? \in_array($c->getId(), $alias, true) : true; |
55 | 55 | $inGroups = ($groups) ? \in_array($c->getGroup(), $groups, true) : true; |
56 | 56 | $inTags = ($tags) ? (bool) array_intersect($c->getTags(), $tags) : true; |
@@ -71,7 +71,7 @@ discard block |
||
71 | 71 | if ($groups) { |
72 | 72 | $groups = \is_string($groups) ? [$groups] : $groups; |
73 | 73 | |
74 | - return array_filter($this->groups, static function ($t) use ($groups) { |
|
74 | + return array_filter($this->groups, static function($t) use ($groups) { |
|
75 | 75 | return \in_array($t->getName(), $groups, true); |
76 | 76 | }); |
77 | 77 | } |
@@ -89,7 +89,7 @@ discard block |
||
89 | 89 | if ($tags) { |
90 | 90 | $tags = \is_string($tags) ? [$tags] : $tags; |
91 | 91 | |
92 | - return array_filter($this->tags, static function ($t) use ($tags) { |
|
92 | + return array_filter($this->tags, static function($t) use ($tags) { |
|
93 | 93 | return \in_array($t->getName(), $tags, true); |
94 | 94 | }); |
95 | 95 | } |
@@ -121,7 +121,7 @@ discard block |
||
121 | 121 | { |
122 | 122 | foreach ($checkServiceMap as $checkId => $check) { |
123 | 123 | $checkServiceId = $check['serviceId']; |
124 | - $checkProxy = new Proxy(function () use ($checkServiceId, $checkId) { |
|
124 | + $checkProxy = new Proxy(function() use ($checkServiceId, $checkId) { |
|
125 | 125 | $this->checks[$checkId] = $this->container->get($checkServiceId); |
126 | 126 | |
127 | 127 | return $this->checks[$checkId]; |
@@ -93,7 +93,7 @@ |
||
93 | 93 | |
94 | 94 | if ($tags) { |
95 | 95 | $tags = $this->manager->findTags($check->getTags()); |
96 | - $tags = array_map(static function ($t) { |
|
96 | + $tags = array_map(static function($t) { |
|
97 | 97 | return $t->getLabel(); |
98 | 98 | }, $tags); |
99 | 99 |
@@ -93,9 +93,9 @@ |
||
93 | 93 | protected function getExpressionLanguage() |
94 | 94 | { |
95 | 95 | $language = new ExpressionLanguage(); |
96 | - $language->register('ini', static function ($value) { |
|
96 | + $language->register('ini', static function($value) { |
|
97 | 97 | return $value; |
98 | - }, static function ($arguments, $value) { |
|
98 | + }, static function($arguments, $value) { |
|
99 | 99 | return ini_get($value); |
100 | 100 | }); |
101 | 101 |
@@ -45,7 +45,7 @@ |
||
45 | 45 | ->isRequired() |
46 | 46 | ->beforeNormalization() |
47 | 47 | ->ifString() |
48 | - ->then(static function ($value) { |
|
48 | + ->then(static function($value) { |
|
49 | 49 | if (\is_string($value)) { |
50 | 50 | $value = [$value]; |
51 | 51 | } |
@@ -45,7 +45,7 @@ |
||
45 | 45 | ->isRequired() |
46 | 46 | ->beforeNormalization() |
47 | 47 | ->ifString() |
48 | - ->then(static function ($value) { |
|
48 | + ->then(static function($value) { |
|
49 | 49 | if (\is_string($value)) { |
50 | 50 | $value = [$value]; |
51 | 51 | } |
@@ -45,7 +45,7 @@ |
||
45 | 45 | ->isRequired() |
46 | 46 | ->beforeNormalization() |
47 | 47 | ->ifString() |
48 | - ->then(static function ($value) { |
|
48 | + ->then(static function($value) { |
|
49 | 49 | if (\is_string($value)) { |
50 | 50 | $value = [$value]; |
51 | 51 | } |
@@ -48,10 +48,10 @@ |
||
48 | 48 | ->thenInvalid('A warningExpression or a criticalExpression must be set.') |
49 | 49 | ->end() |
50 | 50 | ->children() |
51 | - ->scalarNode('criticalExpression')->defaultNull()->example('ini(\'apc.stat\') == 0')->end() |
|
52 | - ->scalarNode('criticalMessage')->defaultNull()->end() |
|
53 | - ->scalarNode('warningExpression')->defaultNull()->example('ini(\'short_open_tag\') == 1')->end() |
|
54 | - ->scalarNode('warningMessage')->defaultNull()->end() |
|
51 | + ->scalarNode('criticalExpression')->defaultNull()->example('ini(\'apc.stat\') == 0')->end() |
|
52 | + ->scalarNode('criticalMessage')->defaultNull()->end() |
|
53 | + ->scalarNode('warningExpression')->defaultNull()->example('ini(\'short_open_tag\') == 1')->end() |
|
54 | + ->scalarNode('warningMessage')->defaultNull()->end() |
|
55 | 55 | ->end() |
56 | 56 | ->end() |
57 | 57 | ->end(); |
@@ -42,7 +42,7 @@ |
||
42 | 42 | ->arrayNode('check') |
43 | 43 | ->addDefaultsIfNotSet() |
44 | 44 | ->validate() |
45 | - ->ifTrue(static function ($value) { |
|
45 | + ->ifTrue(static function($value) { |
|
46 | 46 | return !$value['warningExpression'] && !$value['criticalExpression']; |
47 | 47 | }) |
48 | 48 | ->thenInvalid('A warningExpression or a criticalExpression must be set.') |