@@ -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 | |
@@ -132,7 +132,7 @@ discard block |
||
| 132 | 132 | |
| 133 | 133 | private function expandPathVariables(array $pathVariables, array $mutationNamesMap) |
| 134 | 134 | { |
| 135 | - $normalizedVariables = array_map(function ($part) { |
|
| 135 | + $normalizedVariables = array_map(function($part) { |
|
| 136 | 136 | $part = strtolower( |
| 137 | 137 | preg_replace( |
| 138 | 138 | array('/([A-Z]+)([A-Z][a-z])/', '/([a-z\d])([A-Z])/'), |
@@ -184,19 +184,19 @@ discard block |
||
| 184 | 184 | private function createMutationAppliers() |
| 185 | 185 | { |
| 186 | 186 | return array( |
| 187 | - function ($value) { |
|
| 187 | + function($value) { |
|
| 188 | 188 | return str_replace(' ', '', $value); |
| 189 | 189 | }, |
| 190 | - function ($value) { |
|
| 190 | + function($value) { |
|
| 191 | 191 | return str_replace(' ', '', ucwords($value)); |
| 192 | 192 | }, |
| 193 | - function ($value) { |
|
| 193 | + function($value) { |
|
| 194 | 194 | return str_replace(' ', '', ucfirst($value)); |
| 195 | 195 | }, |
| 196 | - function ($value) { |
|
| 196 | + function($value) { |
|
| 197 | 197 | return str_replace(' ', '-', $value); |
| 198 | 198 | }, |
| 199 | - function ($value) { |
|
| 199 | + function($value) { |
|
| 200 | 200 | return str_replace(' ', '_', $value); |
| 201 | 201 | }, |
| 202 | 202 | ); |