@@ -61,7 +61,7 @@ |
||
61 | 61 | continue; |
62 | 62 | } |
63 | 63 | |
64 | - $commands->each(function ($command) use ($node) { |
|
64 | + $commands->each(function($command) use ($node) { |
|
65 | 65 | $class = "\\Axiom\\Rivescript\\Cortex\\Commands\\$command"; |
66 | 66 | $commandClass = new $class(); |
67 | 67 | $commandClass->parse($node); |
@@ -35,7 +35,7 @@ |
||
35 | 35 | */ |
36 | 36 | protected function parseTags(string $source): string |
37 | 37 | { |
38 | - // $source = $this->escapeUnknownTags($source); |
|
38 | + // $source = $this->escapeUnknownTags($source); |
|
39 | 39 | |
40 | 40 | $tags = synapse()->memory->tags(); |
41 | 41 | foreach ($tags as $tag) { |
@@ -77,7 +77,7 @@ discard block |
||
77 | 77 | { |
78 | 78 | parent::__construct(); |
79 | 79 | |
80 | - include __DIR__ . '/bootstrap.php'; |
|
80 | + include __DIR__.'/bootstrap.php'; |
|
81 | 81 | |
82 | 82 | synapse()->brain->setMaster($this); |
83 | 83 | synapse()->rivescript = $this; |
@@ -93,7 +93,7 @@ discard block |
||
93 | 93 | private function registerTags(): void |
94 | 94 | { |
95 | 95 | synapse()->tags->each( |
96 | - function ($tag) { |
|
96 | + function($tag) { |
|
97 | 97 | $class = "\\Axiom\\Rivescript\\Cortex\\Tags\\$tag"; |
98 | 98 | $tagInstance = new $class(); |
99 | 99 |
@@ -78,7 +78,7 @@ discard block |
||
78 | 78 | protected function searchTriggers(string $trigger): void |
79 | 79 | { |
80 | 80 | synapse()->triggers->each( |
81 | - function ($class) use ($trigger) { |
|
81 | + function($class) use ($trigger) { |
|
82 | 82 | $triggerClass = "\\Axiom\\Rivescript\\Cortex\\Triggers\\$class"; |
83 | 83 | $triggerClass = new $triggerClass(synapse()->input); |
84 | 84 | |
@@ -154,7 +154,7 @@ discard block |
||
154 | 154 | protected function parseResponse(string $response): string |
155 | 155 | { |
156 | 156 | synapse()->tags->each( |
157 | - function ($tag) use (&$response) { |
|
157 | + function($tag) use (&$response) { |
|
158 | 158 | $class = "\\Axiom\\Rivescript\\Cortex\\Tags\\$tag"; |
159 | 159 | $tagClass = new $class(); |
160 | 160 |
@@ -42,7 +42,7 @@ |
||
42 | 42 | */ |
43 | 43 | protected function parseTags(string $trigger, Input $input): string |
44 | 44 | { |
45 | - synapse()->tags->each(function ($tag) use (&$trigger, $input) { |
|
45 | + synapse()->tags->each(function($tag) use (&$trigger, $input) { |
|
46 | 46 | $class = "\\Axiom\\Rivescript\\Cortex\\Tags\\$tag"; |
47 | 47 | $tagClass = new $class("trigger"); |
48 | 48 |
@@ -52,13 +52,13 @@ |
||
52 | 52 | ]; |
53 | 53 | |
54 | 54 | foreach ($wildcards as $pattern => $replacement) { |
55 | - $parsedTrigger = preg_replace($pattern, '(' . $replacement . ')', $trigger); |
|
55 | + $parsedTrigger = preg_replace($pattern, '('.$replacement.')', $trigger); |
|
56 | 56 | |
57 | 57 | if ($parsedTrigger === $trigger) { |
58 | 58 | continue; |
59 | 59 | } |
60 | 60 | |
61 | - if (@preg_match_all('/' . $parsedTrigger . '$/iu', $input->source(), $wildcards)) { |
|
61 | + if (@preg_match_all('/'.$parsedTrigger.'$/iu', $input->source(), $wildcards)) { |
|
62 | 62 | array_shift($wildcards); |
63 | 63 | |
64 | 64 | $wildcards = Collection::make($wildcards)->flatten()->all(); |