Completed
Push — master ( 07b837...249141 )
by Nathan
04:05
created
src/QRCodeServiceProvider.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@  discard block
 block discarded – undo
13 13
      */
14 14
     public function boot()
15 15
     {
16
-        $this->app->booted(function () {
16
+        $this->app->booted(function() {
17 17
             $this->defineRoutes();
18 18
         });
19 19
     }
@@ -35,11 +35,11 @@  discard block
 block discarded – undo
35 35
      */
36 36
     protected function defineRoutes()
37 37
     {
38
-        if (! $this->app->routesAreCached()) {
38
+        if (!$this->app->routesAreCached()) {
39 39
             $router = app('router');
40 40
 
41
-            $router->group(['namespace' => 'Nathanmac\QRCode\Controllers'], function ($router) {
42
-                require __DIR__.'/routes.php';
41
+            $router->group(['namespace' => 'Nathanmac\QRCode\Controllers'], function($router) {
42
+                require __DIR__ . '/routes.php';
43 43
             });
44 44
         }
45 45
     }
Please login to merge, or discard this patch.
src/Generator.php 3 patches
Doc Comments   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
      *
78 78
      * @codeCoverageIgnore
79 79
      *
80
-     * @return Generator
80
+     * @return QrCode
81 81
      */
82 82
     public static function generate(
83 83
         $content,
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
     /**
93 93
      * Gets the content
94 94
      *
95
-     * @return mixed
95
+     * @return string
96 96
      */
97 97
     public function getContent()
98 98
     {
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
     /**
103 103
      * Sets the content
104 104
      *
105
-     * @param mixed $content
105
+     * @param string $content
106 106
      */
107 107
     public function setContent($content)
108 108
     {
@@ -172,8 +172,8 @@  discard block
 block discarded – undo
172 172
     /**
173 173
      * Process the Color Value
174 174
      *
175
-     * @param mixed $color
176
-     * @param mixed $default
175
+     * @param string|boolean $color
176
+     * @param string|false $default
177 177
      *
178 178
      * @return array
179 179
      */
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
      */
107 107
     public function setContent($content)
108 108
     {
109
-        $this->content = str_replace('+', ' ', $content);;
109
+        $this->content = str_replace('+', ' ', $content); ;
110 110
     }
111 111
 
112 112
     /**
@@ -126,7 +126,7 @@  discard block
 block discarded – undo
126 126
      */
127 127
     public function setSize($size)
128 128
     {
129
-        if (is_numeric($size) && $size > 0) $this->size =  (int) $size;
129
+        if (is_numeric($size) && $size > 0) $this->size = (int) $size;
130 130
     }
131 131
 
132 132
     /**
@@ -184,7 +184,7 @@  discard block
 block discarded – undo
184 184
             return array('r' => 255, 'g' => 255, 'b' => 255, 'a' => 255);
185 185
         }
186 186
 
187
-        if (! preg_match("/^([0-9a-fA-F]{6}|[0-9a-fA-F]{3})$/", $color)) {
187
+        if (!preg_match("/^([0-9a-fA-F]{6}|[0-9a-fA-F]{3})$/", $color)) {
188 188
             $color = $default;
189 189
         }
190 190
 
Please login to merge, or discard this patch.
Braces   +6 added lines, -3 removed lines patch added patch discarded remove patch
@@ -126,7 +126,9 @@  discard block
 block discarded – undo
126 126
      */
127 127
     public function setSize($size)
128 128
     {
129
-        if (is_numeric($size) && $size > 0) $this->size =  (int) $size;
129
+        if (is_numeric($size) && $size > 0) {
130
+            $this->size =  (int) $size;
131
+        }
130 132
     }
131 133
 
132 134
     /**
@@ -234,8 +236,9 @@  discard block
 block discarded – undo
234 236
      */
235 237
     protected function getGenerator()
236 238
     {
237
-        if (is_null($this->QRGenerator))
238
-            $this->QRGenerator = new QrCode();
239
+        if (is_null($this->QRGenerator)) {
240
+                    $this->QRGenerator = new QrCode();
241
+        }
239 242
 
240 243
         return $this->QRGenerator;
241 244
     }
Please login to merge, or discard this patch.