@@ -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 | } |
@@ -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 | } |
@@ -69,7 +69,7 @@ |
||
| 69 | 69 | } |
| 70 | 70 | } |
| 71 | 71 | |
| 72 | - $res = array_filter($res, static function ($v) { |
|
| 72 | + $res = array_filter($res, static function($v) { |
|
| 73 | 73 | return \is_array($v) ? !empty($v) : (null !== $v); |
| 74 | 74 | }); |
| 75 | 75 | |
@@ -93,7 +93,7 @@ |
||
| 93 | 93 | |
| 94 | 94 | if ($tags) { |
| 95 | 95 | $tags = $this->runnerManager->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 | |
@@ -77,11 +77,11 @@ discard block |
||
| 77 | 77 | |
| 78 | 78 | $checkPligins = $this->getCheckPligins(); |
| 79 | 79 | |
| 80 | - $addChecks = function ($rootNode) use ($checkPligins, $builder) { |
|
| 80 | + $addChecks = function($rootNode) use ($checkPligins, $builder) { |
|
| 81 | 81 | foreach ($checkPligins as $checkPligin) { |
| 82 | 82 | $checkPligin = new $checkPligin(); |
| 83 | 83 | |
| 84 | - $confMethods = array_filter(get_class_methods($checkPligin), static function ($n) { |
|
| 84 | + $confMethods = array_filter(get_class_methods($checkPligin), static function($n) { |
|
| 85 | 85 | return preg_match('/Conf$/', $n); |
| 86 | 86 | }); |
| 87 | 87 | |
@@ -102,7 +102,7 @@ discard block |
||
| 102 | 102 | $node = $builder |
| 103 | 103 | ->root('checks', 'array') |
| 104 | 104 | ->beforeNormalization() |
| 105 | - ->always(static function ($value) { |
|
| 105 | + ->always(static function($value) { |
|
| 106 | 106 | foreach ($value as $k => $v) { |
| 107 | 107 | $newK = str_replace('(s)', '_factory', $k); |
| 108 | 108 | if ($newK !== $k) { |
@@ -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]; |
@@ -50,7 +50,7 @@ discard block |
||
| 50 | 50 | ->setName('tvi:monitor:check:generator') |
| 51 | 51 | ->setDescription('Generate health check skeleton') |
| 52 | 52 | ->addArgument('check', InputArgument::REQUIRED, 'Check name') |
| 53 | - ->addOption('check-sapce', 's', InputOption::VALUE_REQUIRED, 'Check spase', 'core') |
|
| 53 | + ->addOption('check-sapce', 's', InputOption::VALUE_REQUIRED, 'Check spase', 'core') |
|
| 54 | 54 | ->addOption('group', 'g', InputOption::VALUE_OPTIONAL, 'Check group') |
| 55 | 55 | ->addOption('no-backup', 'b', InputOption::VALUE_NONE, 'Do not backup existing check files.') |
| 56 | 56 | ->setHelp( |
@@ -137,11 +137,11 @@ discard block |
||
| 137 | 137 | |
| 138 | 138 | $checkSapce = $input->getOption('check-sapce'); |
| 139 | 139 | $checkSapce = trim($checkSapce); |
| 140 | - if(preg_match('/[^\w:]/', $checkSapce, $m)) { |
|
| 140 | + if (preg_match('/[^\w:]/', $checkSapce, $m)) { |
|
| 141 | 141 | $output->writeln('<error>Bad check-sapce foramt</error>, check-sapce has to be like [:\w+]+.'); |
| 142 | 142 | exit(1); |
| 143 | 143 | } |
| 144 | - if($checkSapce == '') { |
|
| 144 | + if ($checkSapce == '') { |
|
| 145 | 145 | $output->writeln('<error>Check-sapce requeaerd</error>. Use --check-sapce=... to set it'); |
| 146 | 146 | exit(1); |
| 147 | 147 | } |
@@ -197,7 +197,7 @@ discard block |
||
| 197 | 197 | */ |
| 198 | 198 | private function createFile(string $basePath, string $from, string $to, array $tplData) |
| 199 | 199 | { |
| 200 | - $r = array_filter($this->tpls, static function (SplFileInfo $f) use ($from) { |
|
| 200 | + $r = array_filter($this->tpls, static function(SplFileInfo $f) use ($from) { |
|
| 201 | 201 | return $f->getBasename() === $from; |
| 202 | 202 | }); |
| 203 | 203 | |