@@ -15,7 +15,7 @@ discard block |
||
15 | 15 | |
16 | 16 | $escapeChar = chr('27'); |
17 | 17 | |
18 | - array_map(function ($filter) use ($delimiter, &$semanticGroups, $escapeChar) { |
|
18 | + array_map(function($filter) use ($delimiter, &$semanticGroups, $escapeChar) { |
|
19 | 19 | $isNegation = strpos($filter, FilterUtils::NEGATION_PREFIX) === 0; |
20 | 20 | |
21 | 21 | $escapedFilter = trim( |
@@ -51,7 +51,7 @@ discard block |
||
51 | 51 | |
52 | 52 | public function invertRules(array $filters) |
53 | 53 | { |
54 | - return array_map(function ($filter) { |
|
54 | + return array_map(function($filter) { |
|
55 | 55 | $isNegation = substr($filter, 0, 1) == FilterUtils::NEGATION_PREFIX; |
56 | 56 | |
57 | 57 | return (!$isNegation ? FilterUtils::NEGATION_PREFIX : '') . |
@@ -61,7 +61,7 @@ discard block |
||
61 | 61 | |
62 | 62 | public function trimRules(array $filters) |
63 | 63 | { |
64 | - return array_map(function ($filter) { |
|
64 | + return array_map(function($filter) { |
|
65 | 65 | return ltrim($filter, FilterUtils::NEGATION_PREFIX); |
66 | 66 | }, $filters); |
67 | 67 | } |
@@ -12,7 +12,7 @@ discard block |
||
12 | 12 | $result = array(); |
13 | 13 | |
14 | 14 | foreach ($patterns as $pattern) { |
15 | - preg_match_all('/' . sprintf($pattern, '([^\}]+)'). '/', $template, $usedVariables); |
|
15 | + preg_match_all('/' . sprintf($pattern, '([^\}]+)') . '/', $template, $usedVariables); |
|
16 | 16 | |
17 | 17 | foreach ($usedVariables[1] as $variableName) { |
18 | 18 | if (!preg_match_all('/\(([^\)]+)\)/', $variableName, $valueRules)) { |
@@ -63,7 +63,7 @@ discard block |
||
63 | 63 | |
64 | 64 | foreach ($patterns as $format => $escaper) { |
65 | 65 | $updateGroups[] = array_combine( |
66 | - array_map(function ($item) use ($format) { |
|
66 | + array_map(function($item) use ($format) { |
|
67 | 67 | return sprintf($format, $item); |
68 | 68 | }, array_keys($arguments)), |
69 | 69 | $escaper ? array_map($escaper, $arguments) : $arguments |
@@ -74,7 +74,7 @@ discard block |
||
74 | 74 | |
75 | 75 | $names = array_keys($variables); |
76 | 76 | |
77 | - $values = array_map(function ($value) { |
|
77 | + $values = array_map(function($value) { |
|
78 | 78 | return trim( |
79 | 79 | strtok($value, PHP_EOL) |
80 | 80 | ); |
@@ -1,4 +1,4 @@ discard block |
||
1 | -<?php declare(strict_types = 1); |
|
1 | +<?php declare(strict_types=1); |
|
2 | 2 | /** |
3 | 3 | * Copyright © Vaimo Group. All rights reserved. |
4 | 4 | * See LICENSE_VAIMO.txt for license details. |
@@ -71,7 +71,7 @@ discard block |
||
71 | 71 | |
72 | 72 | private function composePath() |
73 | 73 | { |
74 | - $pathSegments = array_map(function ($item) { |
|
74 | + $pathSegments = array_map(function($item) { |
|
75 | 75 | return rtrim($item, \DIRECTORY_SEPARATOR); |
76 | 76 | }, func_get_args()); |
77 | 77 |
@@ -121,7 +121,7 @@ discard block |
||
121 | 121 | |
122 | 122 | private function expandPathVariables(array $pathVariables, array $mutationNamesMap) |
123 | 123 | { |
124 | - $nameParts = array_map(function ($part) { |
|
124 | + $nameParts = array_map(function($part) { |
|
125 | 125 | $part = strtolower( |
126 | 126 | preg_replace( |
127 | 127 | array('/([A-Z]+)([A-Z][a-z])/', '/([a-z\d])([A-Z])/'), |
@@ -173,19 +173,19 @@ discard block |
||
173 | 173 | private function createMutationAppliers() |
174 | 174 | { |
175 | 175 | return array( |
176 | - function ($value) { |
|
176 | + function($value) { |
|
177 | 177 | return str_replace(' ', '', $value); |
178 | 178 | }, |
179 | - function ($value) { |
|
179 | + function($value) { |
|
180 | 180 | return str_replace(' ', '', ucwords($value)); |
181 | 181 | }, |
182 | - function ($value) { |
|
182 | + function($value) { |
|
183 | 183 | return str_replace(' ', '', ucfirst($value)); |
184 | 184 | }, |
185 | - function ($value) { |
|
185 | + function($value) { |
|
186 | 186 | return str_replace(' ', '-', $value); |
187 | 187 | }, |
188 | - function ($value) { |
|
188 | + function($value) { |
|
189 | 189 | return str_replace(' ', '_', $value); |
190 | 190 | }, |
191 | 191 | ); |