Completed
Pull Request — master (#2)
by Craig
02:58
created
src/ServiceProvider.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@
 block discarded – undo
25 25
             'laravel-yourls-plugin'
26 26
         );
27 27
 
28
-        $this->app->singleton(LaravelYourlsPlugin::class, function ($app) {
28
+        $this->app->singleton(LaravelYourlsPlugin::class, function($app) {
29 29
             return new LaravelYourlsPlugin($app['config']['laravel-yourls-plugin']);
30 30
         });
31 31
     }
Please login to merge, or discard this patch.
src/Response.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@
 block discarded – undo
50 50
 
51 51
     protected function parseResponseBody($body)
52 52
     {
53
-        if(empty($body)) {
53
+        if (empty($body)) {
54 54
             throw new \Exception('No response recieved');
55 55
         }
56 56
 
Please login to merge, or discard this patch.
src/LaravelYourlsPlugin.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -158,14 +158,14 @@  discard block
 block discarded – undo
158 158
      */
159 159
     public function stats(string $filter = null, int $limit = null, string $format = null)
160 160
     {
161
-        $filter = empty($filter) || ! in_array($filter, $this->filters) ? $this->filter : $filter;
161
+        $filter = empty($filter) || !in_array($filter, $this->filters) ? $this->filter : $filter;
162 162
 
163 163
         $params = [
164 164
             'action' => 'stats',
165 165
             'filter' => $filter,
166 166
             'format' => $this->setFormat($format),
167 167
         ];
168
-        if (! empty($limit)) {
168
+        if (!empty($limit)) {
169 169
             $params = array_merge($params, ['limit' => $limit]);
170 170
         }
171 171
 
@@ -203,7 +203,7 @@  discard block
 block discarded – undo
203 203
         $form_params = array_merge($request, $this->authParam);
204 204
 
205 205
         $result = $this->client->request('POST', 'yourls-api.php', ['form_params' => $form_params]);
206
-        if (! $result || '200' != $result->getStatusCode()) {
206
+        if (!$result || '200' != $result->getStatusCode()) {
207 207
             throw new \Exception('Failed to process request');
208 208
         }
209 209
 
@@ -233,6 +233,6 @@  discard block
 block discarded – undo
233 233
      */
234 234
     protected function setFormat(string $format = NULL)
235 235
     {
236
-        return empty($format) || ! in_array($format, $this->formats) ? $this->format : $format;
236
+        return empty($format) || !in_array($format, $this->formats) ? $this->format : $format;
237 237
     }
238 238
 }
Please login to merge, or discard this patch.