@@ -49,7 +49,7 @@ |
||
| 49 | 49 | |
| 50 | 50 | $filesystem = new Filesystem(); |
| 51 | 51 | |
| 52 | - if (! $filesystem->exists(app()->path().'/Transformers/'.$this->argument('name').'Transformer.php')) { |
|
| 52 | + if (!$filesystem->exists(app()->path().'/Transformers/'.$this->argument('name').'Transformer.php')) { |
|
| 53 | 53 | (new TransformerGenerator([ |
| 54 | 54 | 'name' => $this->argument('name'), |
| 55 | 55 | 'force' => $this->option('force'), |
@@ -76,7 +76,7 @@ |
||
| 76 | 76 | */ |
| 77 | 77 | public function getColumn($rules) |
| 78 | 78 | { |
| 79 | - return array_first(explode('=>', $rules), function ($key, $value) { |
|
| 79 | + return array_first(explode('=>', $rules), function($key, $value) { |
|
| 80 | 80 | return $value; |
| 81 | 81 | }); |
| 82 | 82 | } |
@@ -110,7 +110,7 @@ |
||
| 110 | 110 | */ |
| 111 | 111 | public function getColumn($schema) |
| 112 | 112 | { |
| 113 | - return array_first(explode(':', $schema), function ($key, $value) { |
|
| 113 | + return array_first(explode(':', $schema), function($key, $value) { |
|
| 114 | 114 | return $value; |
| 115 | 115 | }); |
| 116 | 116 | } |
@@ -21,7 +21,7 @@ |
||
| 21 | 21 | } |
| 22 | 22 | |
| 23 | 23 | $builder = new MySqlBuilder($this); |
| 24 | - $builder->blueprintResolver(function ($table, $callback) { |
|
| 24 | + $builder->blueprintResolver(function($table, $callback) { |
|
| 25 | 25 | return new Blueprint($table, $callback); |
| 26 | 26 | }); |
| 27 | 27 | |
@@ -44,7 +44,7 @@ |
||
| 44 | 44 | */ |
| 45 | 45 | public function authenticate(Request $request, Route $route) |
| 46 | 46 | { |
| 47 | - if (! $user = $this->auth->user()) { |
|
| 47 | + if (!$user = $this->auth->user()) { |
|
| 48 | 48 | throw new UnauthorizedHttpException(null, 'Unauthenticated.'); |
| 49 | 49 | } |
| 50 | 50 | |
@@ -28,30 +28,30 @@ |
||
| 28 | 28 | { |
| 29 | 29 | $handler = app('Dingo\Api\Exception\Handler'); |
| 30 | 30 | |
| 31 | - $handler->register(function (AuthorizationException $exception) { |
|
| 31 | + $handler->register(function(AuthorizationException $exception) { |
|
| 32 | 32 | throw new AccessDeniedHttpException($exception->getMessage()); |
| 33 | 33 | }); |
| 34 | 34 | |
| 35 | - $handler->register(function (OAuthServerException $e) { |
|
| 35 | + $handler->register(function(OAuthServerException $e) { |
|
| 36 | 36 | $message = env('API_DEBUG') ? $e->getMessage() : null; |
| 37 | 37 | throw new HttpException($e->getHttpStatusCode(), $message, $e, $e->getHttpHeaders()); |
| 38 | 38 | }); |
| 39 | 39 | |
| 40 | - $handler->register(function (HttpResponseException $e) { |
|
| 40 | + $handler->register(function(HttpResponseException $e) { |
|
| 41 | 41 | $message = env('API_DEBUG') ? $e->getMessage() : null; |
| 42 | 42 | throw new HttpException($e->getResponse()->getStatusCode(), $message, $e); |
| 43 | 43 | }); |
| 44 | 44 | |
| 45 | - $handler->register(function (AuthenticationException $e) { |
|
| 45 | + $handler->register(function(AuthenticationException $e) { |
|
| 46 | 46 | throw new UnauthorizedHttpException(null, $e->getMessage(), $e); |
| 47 | 47 | }); |
| 48 | 48 | |
| 49 | - $handler->register(function (ValidatorException $e) { |
|
| 49 | + $handler->register(function(ValidatorException $e) { |
|
| 50 | 50 | $messageBag = $e->getMessageBag(); |
| 51 | 51 | throw new ResourceException($messageBag->first(), $messageBag->all()); |
| 52 | 52 | }); |
| 53 | 53 | |
| 54 | - $handler->register(function (ModelNotFoundException $e) { |
|
| 54 | + $handler->register(function(ModelNotFoundException $e) { |
|
| 55 | 55 | throw new NotFoundHttpException('No resources found.'); |
| 56 | 56 | }); |
| 57 | 57 | } |
@@ -27,7 +27,7 @@ |
||
| 27 | 27 | */ |
| 28 | 28 | public function cant($ability, $arguments = []) |
| 29 | 29 | { |
| 30 | - return ! $this->can($ability, $arguments); |
|
| 30 | + return !$this->can($ability, $arguments); |
|
| 31 | 31 | } |
| 32 | 32 | |
| 33 | 33 | /** |
@@ -69,7 +69,7 @@ |
||
| 69 | 69 | protected function registerRepository() |
| 70 | 70 | { |
| 71 | 71 | // l5-repository validator |
| 72 | - $this->app->bind('Symfony\Component\Translation\TranslatorInterface', function ($app) { |
|
| 72 | + $this->app->bind('Symfony\Component\Translation\TranslatorInterface', function($app) { |
|
| 73 | 73 | return $app['translator']; |
| 74 | 74 | }); |
| 75 | 75 | } |
@@ -24,7 +24,7 @@ |
||
| 24 | 24 | */ |
| 25 | 25 | public function present($data) |
| 26 | 26 | { |
| 27 | - if (! class_exists('League\Fractal\Manager')) { |
|
| 27 | + if (!class_exists('League\Fractal\Manager')) { |
|
| 28 | 28 | throw new Exception(trans('repository::packages.league_fractal_required')); |
| 29 | 29 | } |
| 30 | 30 | if ($data instanceof Collection) { |