Completed
Push — master ( 185853...b7deb5 )
by Marcel
01:56
created
src/Storages/Drivers/FileStorage.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@
 block discarded – undo
36 36
 
37 37
         $saved = $this->get($key)->merge($data);
38 38
 
39
-        if (! is_dir(dirname($file))) {
39
+        if ( ! is_dir(dirname($file))) {
40 40
             mkdir(dirname($file), 0777, true);
41 41
         }
42 42
         file_put_contents($file, json_encode($saved->all()));
Please login to merge, or discard this patch.
src/Middleware/Wit.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -109,7 +109,7 @@
 block discarded – undo
109 109
     {
110 110
         $entities = Collection::make($message->getExtras())->get('entities', []);
111 111
 
112
-        if (! empty($entities)) {
112
+        if ( ! empty($entities)) {
113 113
             foreach ($entities as $name => $entity) {
114 114
                 if ($name === 'intent') {
115 115
                     foreach ($entity as $item) {
Please login to merge, or discard this patch.
src/Middleware/MiddlewareManager.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -74,7 +74,7 @@
 block discarded – undo
74 74
      */
75 75
     public function applyMiddleware($method, $payload, array $additionalMiddleware = [], Closure $destination = null)
76 76
     {
77
-        $destination = is_null($destination) ? function ($payload) {
77
+        $destination = is_null($destination) ? function($payload) {
78 78
             return $payload;
79 79
         }
80 80
         : $destination;
Please login to merge, or discard this patch.
src/Messages/Conversations/Conversation.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -119,7 +119,7 @@  discard block
 block discarded – undo
119 119
     {
120 120
         $conversation = $this->bot->getStoredConversation();
121 121
 
122
-        if (! $question instanceof Question && ! $question) {
122
+        if ( ! $question instanceof Question && ! $question) {
123 123
             $question = unserialize($conversation['question']);
124 124
         }
125 125
 
@@ -129,7 +129,7 @@  discard block
 block discarded – undo
129 129
         if (is_string($next)) {
130 130
             $next = unserialize($next)->getClosure();
131 131
         } elseif (is_array($next)) {
132
-            $next = Collection::make($next)->map(function ($callback) {
132
+            $next = Collection::make($next)->map(function($callback) {
133 133
                 if ($this->bot->getDriver()->serializesCallbacks() && ! $this->bot->runsOnSocket()) {
134 134
                     $callback['callback'] = unserialize($callback['callback'])->getClosure();
135 135
                 }
@@ -183,7 +183,7 @@  discard block
 block discarded – undo
183 183
     public function __sleep()
184 184
     {
185 185
         $properties = get_object_vars($this);
186
-        if (! $this instanceof ShouldQueue) {
186
+        if ( ! $this instanceof ShouldQueue) {
187 187
             unset($properties['bot']);
188 188
         }
189 189
 
Please login to merge, or discard this patch.
src/Messages/Incoming/IncomingMessage.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -87,7 +87,7 @@
 block discarded – undo
87 87
      */
88 88
     public function getExtras($key = null)
89 89
     {
90
-        if (! is_null($key)) {
90
+        if ( ! is_null($key)) {
91 91
             return Collection::make($this->extras)->get($key);
92 92
         }
93 93
 
Please login to merge, or discard this patch.
src/Commands/ConversationManager.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -66,7 +66,7 @@
 block discarded – undo
66 66
     public function getMatchingMessages($messages, MiddlewareManager $middleware, Answer $answer, DriverInterface $driver, $withReceivedMiddleware = true) : array
67 67
     {
68 68
         $matcher = new Matcher();
69
-        $messages = Collection::make($messages)->reject(function (IncomingMessage $message) {
69
+        $messages = Collection::make($messages)->reject(function(IncomingMessage $message) {
70 70
             return $message->isFromBot();
71 71
         });
72 72
 
Please login to merge, or discard this patch.
src/Cache/RedisCache.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@
 block discarded – undo
27 27
      */
28 28
     public function __construct($host = '127.0.0.1', $port = 6379, $auth = null)
29 29
     {
30
-        if (! class_exists('Redis')) {
30
+        if ( ! class_exists('Redis')) {
31 31
             throw new RuntimeException('phpredis extension is required for RedisCache');
32 32
         }
33 33
         $this->host = $host;
Please login to merge, or discard this patch.
src/Storages/Drivers/RedisStorage.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@
 block discarded – undo
27 27
      */
28 28
     public function __construct($host = '127.0.0.1', $port = 6379, $auth = null)
29 29
     {
30
-        if (! class_exists(Redis::class)) {
30
+        if ( ! class_exists(Redis::class)) {
31 31
             throw new RuntimeException('phpredis extension is required for RedisStorage');
32 32
         }
33 33
         $this->host = $host;
Please login to merge, or discard this patch.
src/Commands/Command.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
      */
76 76
     public function driver($driver)
77 77
     {
78
-        $this->driver = Collection::make($driver)->transform(function ($driver) {
78
+        $this->driver = Collection::make($driver)->transform(function($driver) {
79 79
             if (class_exists($driver) && is_subclass_of($driver, DriverInterface::class)) {
80 80
                 $driver = basename(str_replace('\\', '/', $driver));
81 81
                 $driver = preg_replace('/(.*)(Driver)$/', '$1', $driver);
@@ -140,11 +140,11 @@  discard block
 block discarded – undo
140 140
      */
141 141
     public function middleware($middleware)
142 142
     {
143
-        if (! is_array($middleware)) {
143
+        if ( ! is_array($middleware)) {
144 144
             $middleware = [$middleware];
145 145
         }
146 146
 
147
-        $this->middleware = Collection::make($middleware)->filter(function ($item) {
147
+        $this->middleware = Collection::make($middleware)->filter(function($item) {
148 148
             return $item instanceof MiddlewareInterface;
149 149
         })->merge($this->middleware)->toArray();
150 150
 
Please login to merge, or discard this patch.