| @@ -186,7 +186,7 @@ discard block | ||
| 186 | 186 | $this->session = $session; | 
| 187 | 187 | $this->hasher = $hasher; | 
| 188 | 188 | $this->str = $str; | 
| 189 | -        $this->characters = config('captcha.characters','2346789abcdefghjmnpqrtuxyzABCDEFGHJMNPQRTUXYZ'); | |
| 189 | +        $this->characters = config('captcha.characters', '2346789abcdefghjmnpqrtuxyzABCDEFGHJMNPQRTUXYZ'); | |
| 190 | 190 | } | 
| 191 | 191 | |
| 192 | 192 | /** | 
| @@ -195,9 +195,9 @@ discard block | ||
| 195 | 195 | */ | 
| 196 | 196 | protected function configure($config) | 
| 197 | 197 |      { | 
| 198 | -        if ($this->config->has('captcha.' . $config)) | |
| 198 | +        if ($this->config->has('captcha.'.$config)) | |
| 199 | 199 |          { | 
| 200 | -            foreach($this->config->get('captcha.' . $config) as $key => $val) | |
| 200 | +            foreach ($this->config->get('captcha.'.$config) as $key => $val) | |
| 201 | 201 |              { | 
| 202 | 202 |                  $this->{$key} = $val; | 
| 203 | 203 | } | 
| @@ -212,8 +212,8 @@ discard block | ||
| 212 | 212 | */ | 
| 213 | 213 | public function create($config = 'default') | 
| 214 | 214 |      { | 
| 215 | - $this->backgrounds = $this->files->files(__DIR__ . '/../assets/backgrounds'); | |
| 216 | - $this->fonts = $this->files->files(__DIR__ . '/../assets/fonts'); | |
| 215 | + $this->backgrounds = $this->files->files(__DIR__.'/../assets/backgrounds'); | |
| 216 | + $this->fonts = $this->files->files(__DIR__.'/../assets/fonts'); | |
| 217 | 217 |          $this->fonts = array_map(function($file) { | 
| 218 | 218 | return $file->getPathName(); | 
| 219 | 219 | }, $this->fonts); | 
| @@ -287,7 +287,7 @@ discard block | ||
| 287 | 287 | $characters = str_split($this->characters); | 
| 288 | 288 | |
| 289 | 289 | $bag = ''; | 
| 290 | - for($i = 0; $i < $this->length; $i++) | |
| 290 | + for ($i = 0; $i < $this->length; $i++) | |
| 291 | 291 |          { | 
| 292 | 292 | $bag .= $characters[rand(0, count($characters) - 1)]; | 
| 293 | 293 | } | 
| @@ -308,7 +308,7 @@ discard block | ||
| 308 | 308 | $marginTop = $this->image->height() / $this->length; | 
| 309 | 309 | |
| 310 | 310 | $i = 0; | 
| 311 | - foreach(str_split($this->text) as $char) | |
| 311 | + foreach (str_split($this->text) as $char) | |
| 312 | 312 |          { | 
| 313 | 313 | $marginLeft = ($i * $this->image->width() / $this->length); | 
| 314 | 314 | |
| @@ -381,14 +381,14 @@ discard block | ||
| 381 | 381 | */ | 
| 382 | 382 | protected function lines() | 
| 383 | 383 |      { | 
| 384 | - for($i = 0; $i <= $this->lines; $i++) | |
| 384 | + for ($i = 0; $i <= $this->lines; $i++) | |
| 385 | 385 |          { | 
| 386 | 386 | $this->image->line( | 
| 387 | 387 | rand(0, $this->image->width()) + $i * rand(0, $this->image->height()), | 
| 388 | 388 | rand(0, $this->image->height()), | 
| 389 | 389 | rand(0, $this->image->width()), | 
| 390 | 390 | rand(0, $this->image->height()), | 
| 391 | -                function ($draw) { | |
| 391 | +                function($draw) { | |
| 392 | 392 | $draw->color($this->fontColor()); | 
| 393 | 393 | } | 
| 394 | 394 | ); | 
| @@ -429,7 +429,7 @@ discard block | ||
| 429 | 429 | */ | 
| 430 | 430 | public function src($config = null) | 
| 431 | 431 |      { | 
| 432 | -        return url('captcha' . ($config ? '/' . $config : '/default')) . '?' . $this->str->random(8); | |
| 432 | +        return url('captcha'.($config ? '/'.$config : '/default')).'?'.$this->str->random(8); | |
| 433 | 433 | } | 
| 434 | 434 | |
| 435 | 435 | /** | 
| @@ -440,7 +440,7 @@ discard block | ||
| 440 | 440 | */ | 
| 441 | 441 | public function img($config = null) | 
| 442 | 442 |      { | 
| 443 | - return '<img src="' . $this->src($config) . '" alt="captcha">'; | |
| 443 | + return '<img src="'.$this->src($config).'" alt="captcha">'; | |
| 444 | 444 | } | 
| 445 | 445 | |
| 446 | 446 | } |