@@ -98,7 +98,7 @@ |
||
| 98 | 98 | $triggers = synapse()->brain->topic($topic)->triggers(); |
| 99 | 99 | |
| 100 | 100 | if ($recursion == 200) { |
| 101 | - synapse()->rivescript->warn("Top many recursive calls to :func", ["func" => __CLASS__ . "::" . __FUNCTION__]); |
|
| 101 | + synapse()->rivescript->warn("Top many recursive calls to :func", ["func" => __CLASS__."::".__FUNCTION__]); |
|
| 102 | 102 | exit; |
| 103 | 103 | } |
| 104 | 104 | |
@@ -75,7 +75,7 @@ |
||
| 75 | 75 | if (strpos($sub, '.') > -1) { |
| 76 | 76 | $parts = explode('.', $sub); |
| 77 | 77 | if (count($parts) !== 0) { |
| 78 | - array_walk($parts, static function (&$part) { |
|
| 78 | + array_walk($parts, static function(&$part) { |
|
| 79 | 79 | $part = ucfirst(trim($part)); |
| 80 | 80 | }); |
| 81 | 81 | } |
@@ -73,8 +73,8 @@ discard block |
||
| 73 | 73 | /** |
| 74 | 74 | * Find the match |
| 75 | 75 | */ |
| 76 | - $regex = "(" . implode('|', $array) . ")"; |
|
| 77 | - if (@preg_match_all('/' . $regex . '/ui', $input->source(), $wildcards)) { |
|
| 76 | + $regex = "(".implode('|', $array).")"; |
|
| 77 | + if (@preg_match_all('/'.$regex.'/ui', $input->source(), $wildcards)) { |
|
| 78 | 78 | array_shift($wildcards); |
| 79 | 79 | |
| 80 | 80 | if ($wildcards) { |
@@ -90,9 +90,9 @@ discard block |
||
| 90 | 90 | /** |
| 91 | 91 | * Find the match |
| 92 | 92 | */ |
| 93 | - $regex = "(?:" . implode('|', $array) . ")"; |
|
| 93 | + $regex = "(?:".implode('|', $array).")"; |
|
| 94 | 94 | |
| 95 | - if (@preg_match_all('/' . $regex . '/ui', $source, $results)) { |
|
| 95 | + if (@preg_match_all('/'.$regex.'/ui', $source, $results)) { |
|
| 96 | 96 | foreach ($results as $result) { |
| 97 | 97 | $source = str_replace("@{$name}", $result[0], $source); |
| 98 | 98 | } |
@@ -94,7 +94,7 @@ discard block |
||
| 94 | 94 | { |
| 95 | 95 | parent::__construct(); |
| 96 | 96 | |
| 97 | - include __DIR__ . '/bootstrap.php'; |
|
| 97 | + include __DIR__.'/bootstrap.php'; |
|
| 98 | 98 | |
| 99 | 99 | synapse()->brain->setMaster($this); |
| 100 | 100 | synapse()->rivescript = $this; |
@@ -111,7 +111,7 @@ discard block |
||
| 111 | 111 | private function registerTags(): void |
| 112 | 112 | { |
| 113 | 113 | synapse()->tags->each( |
| 114 | - function ($tag) { |
|
| 114 | + function($tag) { |
|
| 115 | 115 | $class = "\\Axiom\\Rivescript\\Cortex\\Tags\\$tag"; |
| 116 | 116 | $tagInstance = new $class(); |
| 117 | 117 | |
@@ -259,7 +259,7 @@ discard block |
||
| 259 | 259 | */ |
| 260 | 260 | public function warn(string $message, array $args = [], int $verbosity = Rivescript::VERBOSITY_DEBUG): void |
| 261 | 261 | { |
| 262 | - $message = "[WARNING]: " . $this->formatString($message, $args); |
|
| 262 | + $message = "[WARNING]: ".$this->formatString($message, $args); |
|
| 263 | 263 | |
| 264 | 264 | if ($this->onWarn) { |
| 265 | 265 | call_user_func($this->onWarn, $message, $verbosity); |
@@ -277,7 +277,7 @@ discard block |
||
| 277 | 277 | */ |
| 278 | 278 | public function debug(string $message, array $args = [], int $verbosity = Rivescript::VERBOSITY_NORMAL): void |
| 279 | 279 | { |
| 280 | - $message = "[DEBUG]: " . $this->formatString($message, $args); |
|
| 280 | + $message = "[DEBUG]: ".$this->formatString($message, $args); |
|
| 281 | 281 | |
| 282 | 282 | if ($this->onDebug) { |
| 283 | 283 | call_user_func($this->onDebug, $message, $verbosity); |