Passed
Push — master ( 2ac66a...a3f2ba )
by Johnny
01:51
created
src/Cortex/Responses/Condition.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -51,8 +51,8 @@
 block discarded – undo
51 51
                         $matches = $this->getMatchesFromPattern($pattern, $this->source());
52 52
                         $condition = $matches[0][0];
53 53
 
54
-                        $ret = str_replace($condition, "",  $this->source());
55
-                        return str_replace($condition, "",  $this->source());
54
+                        $ret = str_replace($condition, "", $this->source());
55
+                        return str_replace($condition, "", $this->source());
56 56
                     }
57 57
 
58 58
                 }
Please login to merge, or discard this patch.
src/Console/ChatCommand.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
     public function execute(InputInterface $input, OutputInterface $output): int
76 76
     {
77 77
         try {
78
-            $this->rivescript->onSay = static function (string $msg, int $verbosity) use ($output) {
78
+            $this->rivescript->onSay = static function(string $msg, int $verbosity) use ($output) {
79 79
                 $output->writeln("Say: {$msg}", $verbosity);
80 80
             };
81 81
 
@@ -91,8 +91,8 @@  discard block
 block discarded – undo
91 91
             $output->writeln('RiveScript Interpreter (PHP) -- Interactive Console v2.0');
92 92
             $output->writeln('--------------------------------------------------------');
93 93
             $output->writeln('RiveScript Version:       2.0');
94
-            $output->writeln('Currently Loaded Source:  ' . $loadedSource);
95
-            $output->writeln('Debug mode: ' . $debugMode);
94
+            $output->writeln('Currently Loaded Source:  '.$loadedSource);
95
+            $output->writeln('Debug mode: '.$debugMode);
96 96
 
97 97
             $output->writeln('');
98 98
             $output->writeln('You are now chatting with a RiveScript bot. Type a message and press Return');
@@ -182,7 +182,7 @@  discard block
 block discarded – undo
182 182
         $reply = $this->rivescript->reply($message);
183 183
         $response = "<info>{$reply}</info>";
184 184
 
185
-        $output->writeln($bot . $response);
185
+        $output->writeln($bot.$response);
186 186
 
187 187
         $this->waitForUserInput($input, $output);
188 188
     }
@@ -199,7 +199,7 @@  discard block
 block discarded – undo
199 199
         if (is_dir($info)) {
200 200
             $directory = realpath($info);
201 201
             $files = [];
202
-            $brains = glob($directory . '/*.rive');
202
+            $brains = glob($directory.'/*.rive');
203 203
 
204 204
             foreach ($brains as $brain) {
205 205
                 $files[] = $brain;
Please login to merge, or discard this patch.
src/Cortex/Tags/Tag.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
         $this->sourceType = $sourceType;
72 72
 
73 73
         if (!isset($this->allowedSources)) {
74
-            throw new LogicException(get_class($this) . " must have an \"allowedSources\" property declared.");
74
+            throw new LogicException(get_class($this)." must have an \"allowedSources\" property declared.");
75 75
         }
76 76
     }
77 77
 
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
                 break;
110 110
             } elseif ($content[$i] === '>') {
111 111
                 $reminder = substr($content, $i + 1);
112
-                return ['response' => "<" . $tag . ">", 'reminder' => $reminder];
112
+                return ['response' => "<".$tag.">", 'reminder' => $reminder];
113 113
             }
114 114
 
115 115
             $tag .= $content[$i];
@@ -118,7 +118,7 @@  discard block
 block discarded – undo
118 118
         $result = $this->secureSource($reminder, $tagName, ">");
119 119
         $reminder = $result['reminder'];
120 120
 
121
-        $response = (isset($tags[$tag]) === true) ? $result['response'] : "<" . $tag . " " . $result['response'] . ">";
121
+        $response = (isset($tags[$tag]) === true) ? $result['response'] : "<".$tag." ".$result['response'].">";
122 122
 
123 123
         return ['response' => $response, 'reminder' => $reminder];
124 124
     }
Please login to merge, or discard this patch.
src/Cortex/Tags/Set.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -63,7 +63,7 @@
 block discarded – undo
63 63
 
64 64
             $matches = $this->getMatches($source);
65 65
 
66
-            foreach($matches as $match) {
66
+            foreach ($matches as $match) {
67 67
                 $key = $match[1];
68 68
                 $value = $match[2];
69 69
 
Please login to merge, or discard this patch.
src/Rivescript.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
     {
86 86
         parent::__construct();
87 87
 
88
-        include __DIR__ . '/bootstrap.php';
88
+        include __DIR__.'/bootstrap.php';
89 89
 
90 90
         synapse()->brain->setMaster($this);
91 91
         synapse()->rivescript = $this;
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
     private function registerTags(): void
102 102
     {
103 103
         synapse()->tags->each(
104
-            function ($tag) {
104
+            function($tag) {
105 105
                 $class = "\\Axiom\\Rivescript\\Cortex\\Tags\\$tag";
106 106
                 $tagInstance = new $class();
107 107
 
@@ -241,7 +241,7 @@  discard block
 block discarded – undo
241 241
      */
242 242
     public function warn(string $message, array $args = [], int $verbosity = Rivescript::VERBOSITY_NORMAL): void
243 243
     {
244
-        $message = "[WARNING]: " . $this->formatString($message, $args);
244
+        $message = "[WARNING]: ".$this->formatString($message, $args);
245 245
 
246 246
         if ($this->onSay) {
247 247
             call_user_func($this->onSay, $message, $verbosity);
Please login to merge, or discard this patch.