@@ -16,7 +16,7 @@ |
||
| 16 | 16 | */ |
| 17 | 17 | public function register() |
| 18 | 18 | { |
| 19 | - $this->app->singleton('events', function ($app) { |
|
| 19 | + $this->app->singleton('events', function($app) { |
|
| 20 | 20 | return new Dispatcher($app); |
| 21 | 21 | }); |
| 22 | 22 | } |
@@ -26,7 +26,7 @@ |
||
| 26 | 26 | */ |
| 27 | 27 | protected function registerNativeFilesystem() |
| 28 | 28 | { |
| 29 | - $this->app->singleton('files', function () { |
|
| 29 | + $this->app->singleton('files', function() { |
|
| 30 | 30 | return new Filesystem(); |
| 31 | 31 | }); |
| 32 | 32 | } |
@@ -127,7 +127,7 @@ |
||
| 127 | 127 | $success = true; |
| 128 | 128 | |
| 129 | 129 | foreach ($paths as $path) { |
| 130 | - if (!@unlink($path)) { |
|
| 130 | + if ( ! @unlink($path)) { |
|
| 131 | 131 | $success = false; |
| 132 | 132 | } |
| 133 | 133 | } |
@@ -72,7 +72,7 @@ |
||
| 72 | 72 | */ |
| 73 | 73 | public function select($query, $bindings = []) |
| 74 | 74 | { |
| 75 | - return $this->run($query, $bindings, function ($me, $query, $bindings) { |
|
| 75 | + return $this->run($query, $bindings, function($me, $query, $bindings) { |
|
| 76 | 76 | list($query, $bindings) = $me->prepareBindings($query, $bindings); |
| 77 | 77 | |
| 78 | 78 | // For select statements, we'll simply execute the query and return an array |
@@ -211,7 +211,7 @@ discard block |
||
| 211 | 211 | { |
| 212 | 212 | $instance = (new static())->setConnection($connection); |
| 213 | 213 | |
| 214 | - $items = array_map(function ($item) use ($instance) { |
|
| 214 | + $items = array_map(function($item) use ($instance) { |
|
| 215 | 215 | return $instance->newFromBuilder($item); |
| 216 | 216 | }, $items); |
| 217 | 217 | |
@@ -331,7 +331,7 @@ discard block |
||
| 331 | 331 | $value = $this->getAttributeFromArray($key); |
| 332 | 332 | |
| 333 | 333 | if (in_array($key, $this->getDates())) { |
| 334 | - if (!is_null($value)) { |
|
| 334 | + if ( ! is_null($value)) { |
|
| 335 | 335 | return $this->asDateTime($value); |
| 336 | 336 | } |
| 337 | 337 | } |
@@ -388,7 +388,7 @@ discard block |
||
| 388 | 388 | { |
| 389 | 389 | $relations = $this->$method(); |
| 390 | 390 | |
| 391 | - if (!$relations instanceof Relation) { |
|
| 391 | + if ( ! $relations instanceof Relation) { |
|
| 392 | 392 | throw new LogicException('Relationship method must return an object of type '.'Magister\Services\Database\Elegant\Relations\Relation'); |
| 393 | 393 | } |
| 394 | 394 | |
@@ -562,7 +562,7 @@ |
||
| 562 | 562 | * |
| 563 | 563 | * @throws \RuntimeException |
| 564 | 564 | * |
| 565 | - * @return void |
|
| 565 | + * @return string |
|
| 566 | 566 | */ |
| 567 | 567 | public function getUrl() |
| 568 | 568 | { |
@@ -17,7 +17,7 @@ |
||
| 17 | 17 | */ |
| 18 | 18 | public function register() |
| 19 | 19 | { |
| 20 | - $this->app->singleton('db', function ($app) { |
|
| 20 | + $this->app->singleton('db', function($app) { |
|
| 21 | 21 | return new DatabaseManager($app); |
| 22 | 22 | }); |
| 23 | 23 | } |
@@ -42,7 +42,7 @@ |
||
| 42 | 42 | { |
| 43 | 43 | $name = $name ?: $this->getDefaultConnection(); |
| 44 | 44 | |
| 45 | - if (!isset($this->connections[$name])) { |
|
| 45 | + if ( ! isset($this->connections[$name])) { |
|
| 46 | 46 | $connection = $this->makeConnection(); |
| 47 | 47 | |
| 48 | 48 | $this->connections[$name] = $connection; |
@@ -16,7 +16,7 @@ |
||
| 16 | 16 | */ |
| 17 | 17 | public function register() |
| 18 | 18 | { |
| 19 | - $this->app->singleton('cookie', function ($app) { |
|
| 19 | + $this->app->singleton('cookie', function($app) { |
|
| 20 | 20 | $cookie = new CookieJar($app['encrypter']); |
| 21 | 21 | |
| 22 | 22 | $config = $app['config']['session']; |
@@ -52,7 +52,7 @@ discard block |
||
| 52 | 52 | */ |
| 53 | 53 | public function has($key) |
| 54 | 54 | { |
| 55 | - return !is_null($this->get($key)); |
|
| 55 | + return ! is_null($this->get($key)); |
|
| 56 | 56 | } |
| 57 | 57 | |
| 58 | 58 | /** |
@@ -67,7 +67,7 @@ discard block |
||
| 67 | 67 | { |
| 68 | 68 | $value = isset($_COOKIE[$key]) ? $_COOKIE[$key] : null; |
| 69 | 69 | |
| 70 | - if (!is_null($value)) { |
|
| 70 | + if ( ! is_null($value)) { |
|
| 71 | 71 | return $this->decrypt($value); |
| 72 | 72 | } |
| 73 | 73 | |