@@ -34,7 +34,7 @@ |
||
34 | 34 | ], $options); |
35 | 35 | |
36 | 36 | if ($options['escape']) { |
37 | - $words = array_map(function ($word) { |
|
37 | + $words = array_map(function($word) { |
|
38 | 38 | return preg_quote($word, '/'); |
39 | 39 | }, $words); |
40 | 40 | } |
@@ -45,14 +45,14 @@ |
||
45 | 45 | |
46 | 46 | public static function rearrange(array $array, array $keys) |
47 | 47 | { |
48 | - return array_combine($keys, array_map(function ($key) use ($array) { |
|
48 | + return array_combine($keys, array_map(function($key) use ($array) { |
|
49 | 49 | return $array[$key]; |
50 | 50 | }, $keys)); |
51 | 51 | } |
52 | 52 | |
53 | 53 | public static function column(array $array, $index) |
54 | 54 | { |
55 | - return array_map(function ($e) use ($index) { return $e[$index]; }, $array); |
|
55 | + return array_map(function($e) use ($index) { return $e[$index]; }, $array); |
|
56 | 56 | } |
57 | 57 | |
58 | 58 | public static function find(array $array, callable $tester) |
@@ -40,7 +40,7 @@ |
||
40 | 40 | 'INTERSECT', 'INTERVAL', 'INTO', 'IS', 'ITERATE', 'LANGUAGE', 'LARGE', 'LATERAL', 'LEADING', |
41 | 41 | 'LEAVE', 'LEFT', 'LIKE', 'LOCAL', 'LOOP', 'MATCH', 'MEMBER', 'MERGE', 'METHOD', 'MODIFIES', |
42 | 42 | 'MODULE', 'MONTH', 'MULTISET', 'NATIONAL', 'NATURAL', 'NCHAR', 'NCLOB', 'NEW', 'NO', 'NONE', 'NOT', |
43 | - 'OF', 'OLD', 'ON', 'ONLY', 'OPEN', 'OR', 'ORDER', 'OUT','OUTER', 'OUTPUT', 'OVER', |
|
43 | + 'OF', 'OLD', 'ON', 'ONLY', 'OPEN', 'OR', 'ORDER', 'OUT', 'OUTER', 'OUTPUT', 'OVER', |
|
44 | 44 | 'OVERLAPS', 'PARAMETER', 'PARTITION', 'PRECISION', 'PREPARE', 'PRIMARY', 'PROCEDURE', 'RANGE', 'READS', |
45 | 45 | 'RECURSIVE', 'REF', 'REFERENCES', 'REFERENCING', 'RELEASE', |
46 | 46 | 'REPEAT', 'RESIGNAL', 'RESULT', 'RETURN', 'RETURNS', 'REVOKE', 'RIGHT', 'ROLLBACK', 'ROLLUP', 'ROW', |
@@ -107,7 +107,7 @@ |
||
107 | 107 | public function all() |
108 | 108 | { |
109 | 109 | $items = $this->getArrayCopy(); |
110 | - if(empty($items)) return []; |
|
110 | + if (empty($items)) return []; |
|
111 | 111 | |
112 | 112 | return call_user_func_array('array_merge', $items); |
113 | 113 | } |
@@ -43,7 +43,7 @@ |
||
43 | 43 | $this->_end->_valid = false; |
44 | 44 | } |
45 | 45 | } else { |
46 | - if (!$this->rule->validator->validate($context, [ $this->name => Validator::CONTEXT_IN ])) { |
|
46 | + if (!$this->rule->validator->validate($context, [$this->name => Validator::CONTEXT_IN])) { |
|
47 | 47 | $this->setValid(false); |
48 | 48 | } else { |
49 | 49 | $this->_valid = false; |
@@ -45,7 +45,7 @@ |
||
45 | 45 | |
46 | 46 | protected function processEnd(Context $context, Language $language, Result $result, TokenIterator $tokens) |
47 | 47 | { |
48 | - foreach(array_filter($context->stack, function ($name) { |
|
48 | + foreach (array_filter($context->stack, function($name) { |
|
49 | 49 | return in_array($name, $this->closes); |
50 | 50 | }) as $hash => $name) { |
51 | 51 | $end = new Token([$name, 'pos' => $this->pos]); |
@@ -30,7 +30,7 @@ |
||
30 | 30 | |
31 | 31 | public function find($needle) { |
32 | 32 | foreach (array_reverse($this->stack, true) as $id => $name) { |
33 | - if($name === $needle) { |
|
33 | + if ($name === $needle) { |
|
34 | 34 | return $id; |
35 | 35 | } |
36 | 36 | } |
@@ -28,7 +28,7 @@ |
||
28 | 28 | $this->_source = $source; |
29 | 29 | $this->_start = $start; |
30 | 30 | |
31 | - parent::__construct($start !== null ? [ $start->id => $start ] : [], 0, \ArrayIterator::class); |
|
31 | + parent::__construct($start !== null ? [$start->id => $start] : [], 0, \ArrayIterator::class); |
|
32 | 32 | } |
33 | 33 | |
34 | 34 | public function getSource() |
@@ -31,7 +31,7 @@ discard block |
||
31 | 31 | public function __construct(array $singleLine = null, array $multiLine = null) |
32 | 32 | { |
33 | 33 | $this->singleLine = $singleLine ?: []; |
34 | - $this->multiLine = $multiLine ?: []; |
|
34 | + $this->multiLine = $multiLine ?: []; |
|
35 | 35 | } |
36 | 36 | |
37 | 37 | |
@@ -49,7 +49,7 @@ discard block |
||
49 | 49 | $all = []; |
50 | 50 | |
51 | 51 | foreach ($this->multiLine as $name => $comment) { |
52 | - $comment = array_map(function ($e) { return preg_quote($e, '/'); }, $comment); |
|
52 | + $comment = array_map(function($e) { return preg_quote($e, '/'); }, $comment); |
|
53 | 53 | |
54 | 54 | $all[] = [$name, "/{$comment[0]}(.*?){$comment[1]}/ms"]; |
55 | 55 | } |