@@ -23,10 +23,10 @@ discard block |
||
| 23 | 23 | * @param $var mixed variable |
| 24 | 24 | * @return bool result of the checkout |
| 25 | 25 | */ |
| 26 | - final public static function is($var): bool |
|
| 27 | - { |
|
| 28 | - return is_iterable($var) && static::isThis($var); |
|
| 29 | - } |
|
| 26 | + final public static function is($var): bool |
|
| 27 | + { |
|
| 28 | + return is_iterable($var) && static::isThis($var); |
|
| 29 | + } |
|
| 30 | 30 | |
| 31 | 31 | /** |
| 32 | 32 | * Checks the type of the variable. |
@@ -34,5 +34,5 @@ discard block |
||
| 34 | 34 | * @param $var mixed variable |
| 35 | 35 | * @return bool result of the checkout |
| 36 | 36 | */ |
| 37 | - abstract protected static function isThis($var): bool; |
|
| 37 | + abstract protected static function isThis($var): bool; |
|
| 38 | 38 | } |
@@ -37,11 +37,11 @@ discard block |
||
| 37 | 37 | */ |
| 38 | 38 | public function processThis(): self |
| 39 | 39 | { |
| 40 | - $expression = preg_replace_callback('/"[^"]"|\'[^\']\'/', function (array $matches) { |
|
| 40 | + $expression = preg_replace_callback('/"[^"]"|\'[^\']\'/', function(array $matches) { |
|
| 41 | 41 | return str_replace('$.', '\\$.', $matches[0]); |
| 42 | 42 | }, $this->expression); |
| 43 | 43 | $expression = preg_replace('/\$\./', '$this->', $expression); |
| 44 | - $expression = preg_replace_callback('/"[^"]"|\'[^\']\'/', function (array $matches) { |
|
| 44 | + $expression = preg_replace_callback('/"[^"]"|\'[^\']\'/', function(array $matches) { |
|
| 45 | 45 | return str_replace('\\$.', '$.', $matches[0]); |
| 46 | 46 | }, $expression); |
| 47 | 47 | $this->expression = $expression; |
@@ -57,11 +57,11 @@ discard block |
||
| 57 | 57 | */ |
| 58 | 58 | public function resolveClassNames(string $namespace): self |
| 59 | 59 | { |
| 60 | - $expression = preg_replace_callback('/"[^"]"|\'[^\']\'/', function (array $matches) { |
|
| 60 | + $expression = preg_replace_callback('/"[^"]"|\'[^\']\'/', function(array $matches) { |
|
| 61 | 61 | return str_replace(':', ':\\', $matches[0]); |
| 62 | 62 | }, $this->expression); |
| 63 | 63 | $expression = preg_replace('/(?<!:):(?=([a-zA-Z_][a-zA-Z0-9_]*))/', "$namespace\\", $expression); |
| 64 | - $expression = preg_replace_callback('/"[^"]"|\'[^\']\'/', function (array $matches) { |
|
| 64 | + $expression = preg_replace_callback('/"[^"]"|\'[^\']\'/', function(array $matches) { |
|
| 65 | 65 | return str_replace(':\\', ':', $matches[0]); |
| 66 | 66 | }, $expression); |
| 67 | 67 | $this->expression = $expression; |
@@ -79,7 +79,7 @@ discard block |
||
| 79 | 79 | { |
| 80 | 80 | $this->expression = preg_replace_callback( |
| 81 | 81 | '/`([^`]|\\\\`)+((?<!\\\\)`)/', |
| 82 | - function (array $matches) use($charlist): string { |
|
| 82 | + function(array $matches) use($charlist): string { |
|
| 83 | 83 | return addcslashes($matches[0], $charlist); |
| 84 | 84 | }, |
| 85 | 85 | $this->expression |
@@ -55,14 +55,14 @@ discard block |
||
| 55 | 55 | ->get(); |
| 56 | 56 | $axsConditions = preg_replace_callback( |
| 57 | 57 | '/(((>|<)=?)|(=|!)=)\s*\d+/', |
| 58 | - function (array $matches): string { |
|
| 58 | + function(array $matches): string { |
|
| 59 | 59 | return sprintf('\%s::count($var) %s', ConditionsRunner::class, $matches[0]); |
| 60 | 60 | }, |
| 61 | 61 | $axsConditions |
| 62 | 62 | ); |
| 63 | 63 | $axsConditions = preg_replace_callback( |
| 64 | 64 | '/\d+\.\.\d+/', |
| 65 | - function (array $matches): string { |
|
| 65 | + function(array $matches): string { |
|
| 66 | 66 | list($min, $max) = explode('..', $matches[0]); |
| 67 | 67 | return sprintf('\%s::count($var) >= %d' |
| 68 | 68 | . ' && \%s::count($var) <= %d', ConditionsRunner::class, $min, ConditionsRunner::class, $max); |
@@ -71,14 +71,14 @@ discard block |
||
| 71 | 71 | ); |
| 72 | 72 | $axsConditions = preg_replace_callback( |
| 73 | 73 | '/\\\\[<>!=]/', |
| 74 | - function (array $matches): string { |
|
| 74 | + function(array $matches): string { |
|
| 75 | 75 | return substr($matches[0], 1); |
| 76 | 76 | }, |
| 77 | 77 | $axsConditions |
| 78 | 78 | ); |
| 79 | 79 | $axsConditions = preg_replace_callback( |
| 80 | 80 | '/`[^`]+`/', |
| 81 | - function (array $matches): string { |
|
| 81 | + function(array $matches): string { |
|
| 82 | 82 | $subject = substr($matches[0], 1, strlen($matches[0]) - 2); |
| 83 | 83 | return sprintf('(function($var){return %s;})($var)', $subject); |
| 84 | 84 | }, |