Passed
Push — master ( af6300...030a8a )
by Johnny
02:39
created
src/Cortex/ResponseQueue/ResponseQueue.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
94 94
     private function sortResponses(Collection $responses): Collection
95 95
     {
96 96
         return $responses->sort(
97
-            function ($current, $previous) {
97
+            function($current, $previous) {
98 98
                 return ($current->order < $previous->order) ? -1 : 1;
99 99
             }
100 100
         )->reverse();
@@ -142,7 +142,7 @@  discard block
 block discarded – undo
142 142
 
143 143
         $continues = Collection::make($responses->all());
144 144
         $continues->each(
145
-            function (ResponseQueueItem $data, $response) use (&$lastData, &$lastResponse, &$continues) {
145
+            function(ResponseQueueItem $data, $response) use (&$lastData, &$lastResponse, &$continues) {
146 146
 
147 147
                 if ($data->type === 'continue') {
148 148
                     $continues->remove($lastResponse);
@@ -196,7 +196,7 @@  discard block
 block discarded – undo
196 196
     private function determineResponseOrder(Collection $responses): Collection
197 197
     {
198 198
         return $responses->each(
199
-            function (ResponseQueueItem $data, $response) use ($responses) {
199
+            function(ResponseQueueItem $data, $response) use ($responses) {
200 200
                 if (isset($data->type)) {
201 201
                     switch ($data->type) {
202 202
                         case 'condition':
Please login to merge, or discard this patch.
src/Cortex/Output.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -98,7 +98,7 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
src/Cortex/Responses/Redirect.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@
 block discarded – undo
38 38
     public function parse()
39 39
     {
40 40
         if ($this->responseQueueItem()->getCommand() === '@') {
41
-           return $this->source();
41
+            return $this->source();
42 42
         }
43 43
 
44 44
         return false;
Please login to merge, or discard this patch.
src/Cortex/Tags/Sentence.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -86,7 +86,7 @@
 block discarded – undo
86 86
                     }
87 87
                 }
88 88
 
89
-               //  $sub = str_replace(["&#60;", "&#62;"], ["<", ">"], $sub);
89
+                //  $sub = str_replace(["&#60;", "&#62;"], ["<", ">"], $sub);
90 90
 
91 91
                 $source = str_replace($match[0], $sub, $source);
92 92
             }
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -75,7 +75,7 @@
 block discarded – undo
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
                         }
Please login to merge, or discard this patch.
src/Cortex/Tags/ArrayTag.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -73,8 +73,8 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
                             }
Please login to merge, or discard this patch.
src/Cortex/Commands/Response.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -40,8 +40,8 @@
 block discarded – undo
40 40
     public function parse(Node $node): void
41 41
     {
42 42
         $types = [
43
-          '-', '*',
44
-          '^', '@'
43
+            '-', '*',
44
+            '^', '@'
45 45
         ];
46 46
 
47 47
         if (in_array($node->command(), $types) === true) {
Please login to merge, or discard this patch.
src/Rivescript.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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);
Please login to merge, or discard this patch.