Passed
Push — develop ( 023af3...f3a945 )
by Johnny
01:58
created
src/helpers.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@
 block discarded – undo
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());
Please login to merge, or discard this patch.
src/Cortex/Triggers/Trigger.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
src/Cortex/ContentLoader/ContentStream.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
      */
77 77
     public function stream_read(int $count): string
78 78
     {
79
-        $p =& $this->position;
79
+        $p = & $this->position;
80 80
         $ret = substr($this->content, $p, $count);
81 81
         $p += strlen($ret);
82 82
         return $ret;
@@ -91,10 +91,10 @@  discard block
 block discarded – undo
91 91
      */
92 92
     public function stream_write(string $data): int
93 93
     {
94
-        $v =& $this->content;
94
+        $v = & $this->content;
95 95
         $l = strlen($data);
96
-        $p =& $this->position;
97
-        $v = substr($v, 0, $p) . $data . substr($v, $p += $l);
96
+        $p = & $this->position;
97
+        $v = substr($v, 0, $p).$data.substr($v, $p += $l);
98 98
         return $l;
99 99
     }
100 100
 
@@ -132,7 +132,7 @@  discard block
 block discarded – undo
132 132
     public function stream_seek(int $offset, int $whence = SEEK_SET): bool
133 133
     {
134 134
         $l = strlen($this->content);
135
-        $p =& $this->position;
135
+        $p = & $this->position;
136 136
         switch ($whence) {
137 137
             case SEEK_SET:
138 138
                 $newPos = $offset;
Please login to merge, or discard this patch.
src/Support/Logger.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@
 block discarded – undo
43 43
     public function __construct()
44 44
     {
45 45
         $this->logger = new Monolog('rivescript');
46
-        $this->logger->pushHandler(new StreamHandler(__DIR__ . '/../../logs/' . date('m-d-y') . '.log', Monolog::DEBUG));
46
+        $this->logger->pushHandler(new StreamHandler(__DIR__.'/../../logs/'.date('m-d-y').'.log', Monolog::DEBUG));
47 47
     }
48 48
 
49 49
     /**
Please login to merge, or discard this patch.
src/Rivescript.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
     {
71 71
         parent::__construct();
72 72
 
73
-        include __DIR__ . '/bootstrap.php';
73
+        include __DIR__.'/bootstrap.php';
74 74
 
75 75
         synapse()->brain->setMaster($this);
76 76
 
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
     private function registerTags(): void
86 86
     {
87 87
         synapse()->tags->each(
88
-            function ($tag) {
88
+            function($tag) {
89 89
                 $class = "\\Axiom\\Rivescript\\Cortex\\Tags\\$tag";
90 90
                 $tagInstance = new $class();
91 91
 
Please login to merge, or discard this patch.
src/Console/ChatCommand.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
             $output->writeln('RiveScript Interpreter (PHP) -- Interactive Console v2.0');
88 88
             $output->writeln('--------------------------------------------------------');
89 89
             $output->writeln('RiveScript Version:       2.0');
90
-            $output->writeln('Currently Loaded Source:  ' . $loadedSource);
90
+            $output->writeln('Currently Loaded Source:  '.$loadedSource);
91 91
             $output->writeln('');
92 92
             $output->writeln('You are now chatting with a RiveScript bot. Type a message and press Return');
93 93
             $output->writeln('to send it. When finished, type "/quit" to exit the interactive console.');
@@ -176,7 +176,7 @@  discard block
 block discarded – undo
176 176
         $reply = $this->rivescript->reply($message);
177 177
         $response = "<info>{$reply}</info>";
178 178
 
179
-        $output->writeln($bot . $response);
179
+        $output->writeln($bot.$response);
180 180
 
181 181
         $this->waitForUserInput($input, $output);
182 182
     }
@@ -193,7 +193,7 @@  discard block
 block discarded – undo
193 193
         if (is_dir($info)) {
194 194
             $directory = realpath($info);
195 195
             $files = [];
196
-            $brains = glob($directory . '/*.rive');
196
+            $brains = glob($directory.'/*.rive');
197 197
 
198 198
             foreach ($brains as $brain) {
199 199
                 $files[] = $brain;
Please login to merge, or discard this patch.
src/Cortex/Node.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -297,16 +297,16 @@
 block discarded – undo
297 297
             }
298 298
 
299 299
             if ($parens) {
300
-                return "Unmatched " . ($parens > 0 ? "left" : "right") . " parenthesis bracket ()";
300
+                return "Unmatched ".($parens > 0 ? "left" : "right")." parenthesis bracket ()";
301 301
             }
302 302
             if ($square) {
303
-                return "Unmatched " . ($square > 0 ? "left" : "right") . " square bracket []";
303
+                return "Unmatched ".($square > 0 ? "left" : "right")." square bracket []";
304 304
             }
305 305
             if ($curly) {
306
-                return "Unmatched " . ($curly > 0 ? "left" : "right") . " curly bracket {}";
306
+                return "Unmatched ".($curly > 0 ? "left" : "right")." curly bracket {}";
307 307
             }
308 308
             if ($chevron) {
309
-                return "Unmatched " . ($chevron > 0 ? "left" : "right") . " angled bracket <>";
309
+                return "Unmatched ".($chevron > 0 ? "left" : "right")." angled bracket <>";
310 310
             }
311 311
         } elseif (starts_with($this->source, '-') || starts_with($this->source, '^')
312 312
             || starts_with($this->source, '/')) {
Please login to merge, or discard this patch.
src/Cortex/Commands/VariableSubstitute.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@
 block discarded – undo
47 47
                 [$key, $value] = explode('=', $value);
48 48
 
49 49
                 $key = trim($key);
50
-                $key = '/\b' . preg_quote($key, '/') . '\b/'; // Convert the "key" to a regular expression ready format
50
+                $key = '/\b'.preg_quote($key, '/').'\b/'; // Convert the "key" to a regular expression ready format
51 51
                 $value = trim($value);
52 52
 
53 53
                 synapse()->memory->substitute()->put($key, $value);
Please login to merge, or discard this patch.
src/Cortex/Brain.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -111,7 +111,7 @@
 block discarded – undo
111 111
                 }
112 112
 
113 113
 
114
-                $commands->each(function ($command) use ($node) {
114
+                $commands->each(function($command) use ($node) {
115 115
                     $class = "\\Axiom\\Rivescript\\Cortex\\Commands\\$command";
116 116
                     $commandClass = new $class();
117 117
                     $commandClass->parse($node);
Please login to merge, or discard this patch.