@@ -35,7 +35,7 @@ |
||
35 | 35 | */ |
36 | 36 | function dd() |
37 | 37 | { |
38 | - array_map(function ($x) { |
|
38 | + array_map(function($x) { |
|
39 | 39 | print_r($x); |
40 | 40 | echo "\n"; |
41 | 41 | }, func_get_args()); |
@@ -30,7 +30,7 @@ |
||
30 | 30 | */ |
31 | 31 | protected function parseTags(string $trigger, Input $input): string |
32 | 32 | { |
33 | - synapse()->tags->each(function ($tag) use (&$trigger, $input) { |
|
33 | + synapse()->tags->each(function($tag) use (&$trigger, $input) { |
|
34 | 34 | $class = "\\Axiom\\Rivescript\\Cortex\\Tags\\$tag"; |
35 | 35 | $tagClass = new $class('trigger'); |
36 | 36 |
@@ -58,7 +58,7 @@ |
||
58 | 58 | continue; |
59 | 59 | } |
60 | 60 | |
61 | - $commands->each(function ($command) use ($node) { |
|
61 | + $commands->each(function($command) use ($node) { |
|
62 | 62 | $class = "\\Axiom\\Rivescript\\Cortex\\Commands\\$command"; |
63 | 63 | $commandClass = new $class(); |
64 | 64 | $commandClass->parse($node); |
@@ -60,7 +60,7 @@ |
||
60 | 60 | if (strpos($sub, '.') > -1) { |
61 | 61 | $parts = explode('.', $sub); |
62 | 62 | if (count($parts) !== 0) { |
63 | - array_walk($parts, function (&$part) { |
|
63 | + array_walk($parts, function(&$part) { |
|
64 | 64 | $part = ucfirst(trim($part)); |
65 | 65 | }); |
66 | 66 | } |
@@ -84,7 +84,7 @@ discard block |
||
84 | 84 | { |
85 | 85 | $triggers = $this->determineWordCount($triggers); |
86 | 86 | $triggers = $this->determineTypeCount($triggers); |
87 | - $triggers = $triggers->sort(function ($current, $previous) { |
|
87 | + $triggers = $triggers->sort(function($current, $previous) { |
|
88 | 88 | return ($current['order'] < $previous['order']) ? -1 : 1; |
89 | 89 | })->reverse(); |
90 | 90 | |
@@ -101,7 +101,7 @@ discard block |
||
101 | 101 | protected function determineTypeCount(Collection $triggers): Collection |
102 | 102 | { |
103 | 103 | // @phpstan-ignore-next-line |
104 | - return $triggers->each(function ($data, $trigger) use ($triggers) { |
|
104 | + return $triggers->each(function($data, $trigger) use ($triggers) { |
|
105 | 105 | if (isset($data['type'])) { |
106 | 106 | switch ($data['type']) { |
107 | 107 | case 'atomic': |
@@ -134,7 +134,7 @@ discard block |
||
134 | 134 | protected function determineWordCount(Collection $triggers): Collection |
135 | 135 | { |
136 | 136 | // @phpstan-ignore-next-line |
137 | - return $triggers->each(function ($data, $trigger) use ($triggers) { |
|
137 | + return $triggers->each(function($data, $trigger) use ($triggers) { |
|
138 | 138 | $data['order'] = count(explode(' ', $trigger)); |
139 | 139 | |
140 | 140 | $triggers->put($trigger, $data); |