@@ -52,7 +52,7 @@ discard block |
||
| 52 | 52 | * |
| 53 | 53 | * @param \Illuminate\Http\Request $request |
| 54 | 54 | * @param \Closure $next |
| 55 | - * @return mixed |
|
| 55 | + * @return Response |
|
| 56 | 56 | */ |
| 57 | 57 | public function handle($request, Closure $next) |
| 58 | 58 | { |
@@ -139,7 +139,7 @@ discard block |
||
| 139 | 139 | * Duplicate a cookie with a new value. |
| 140 | 140 | * |
| 141 | 141 | * @param \Symfony\Component\HttpFoundation\Cookie $c |
| 142 | - * @param mixed $value |
|
| 142 | + * @param string $value |
|
| 143 | 143 | * @return \Symfony\Component\HttpFoundation\Cookie |
| 144 | 144 | */ |
| 145 | 145 | protected function duplicate(Cookie $c, $value) |
@@ -24,7 +24,7 @@ discard block |
||
| 24 | 24 | * Create a new connection factory instance. |
| 25 | 25 | * |
| 26 | 26 | * @param \Illuminate\Contracts\Container\Container $container |
| 27 | - * @return void |
|
| 27 | + * @return ConnectionFactory |
|
| 28 | 28 | */ |
| 29 | 29 | public function __construct(Container $container) |
| 30 | 30 | { |
@@ -201,7 +201,7 @@ discard block |
||
| 201 | 201 | * Create a new connection instance. |
| 202 | 202 | * |
| 203 | 203 | * @param string $driver |
| 204 | - * @param \PDO|\Closure $connection |
|
| 204 | + * @param \Closure $connection |
|
| 205 | 205 | * @param string $database |
| 206 | 206 | * @param string $prefix |
| 207 | 207 | * @param array $config |
@@ -57,7 +57,7 @@ discard block |
||
| 57 | 57 | */ |
| 58 | 58 | protected function createSingleConnection(array $config) |
| 59 | 59 | { |
| 60 | - $pdo = function () use ($config) { |
|
| 60 | + $pdo = function() use ($config) { |
|
| 61 | 61 | return $this->createConnector($config)->connect($config); |
| 62 | 62 | }; |
| 63 | 63 | |
@@ -172,7 +172,7 @@ discard block |
||
| 172 | 172 | */ |
| 173 | 173 | public function createConnector(array $config) |
| 174 | 174 | { |
| 175 | - if (! isset($config['driver'])) { |
|
| 175 | + if (!isset($config['driver'])) { |
|
| 176 | 176 | throw new InvalidArgumentException('A driver must be specified.'); |
| 177 | 177 | } |
| 178 | 178 | |
@@ -266,7 +266,7 @@ discard block |
||
| 266 | 266 | /** |
| 267 | 267 | * Get all of the support drivers. |
| 268 | 268 | * |
| 269 | - * @return array |
|
| 269 | + * @return string[] |
|
| 270 | 270 | */ |
| 271 | 271 | public function supportedDrivers() |
| 272 | 272 | { |
@@ -276,7 +276,7 @@ discard block |
||
| 276 | 276 | /** |
| 277 | 277 | * Get all of the drivers that are actually available. |
| 278 | 278 | * |
| 279 | - * @return array |
|
| 279 | + * @return string[] |
|
| 280 | 280 | */ |
| 281 | 281 | public function availableDrivers() |
| 282 | 282 | { |
@@ -64,7 +64,7 @@ discard block |
||
| 64 | 64 | // If we haven't created this connection, we'll create it based on the config |
| 65 | 65 | // provided in the application. Once we've created the connections we will |
| 66 | 66 | // set the "fetch mode" for PDO which determines the query return types. |
| 67 | - if (! isset($this->connections[$name])) { |
|
| 67 | + if (!isset($this->connections[$name])) { |
|
| 68 | 68 | $connection = $this->makeConnection($name); |
| 69 | 69 | |
| 70 | 70 | $this->setPdoForType($connection, $type); |
@@ -125,7 +125,7 @@ discard block |
||
| 125 | 125 | { |
| 126 | 126 | $this->disconnect($name = $name ?: $this->getDefaultConnection()); |
| 127 | 127 | |
| 128 | - if (! isset($this->connections[$name])) { |
|
| 128 | + if (!isset($this->connections[$name])) { |
|
| 129 | 129 | return $this->connection($name); |
| 130 | 130 | } |
| 131 | 131 | |
@@ -193,7 +193,7 @@ discard block |
||
| 193 | 193 | // Here we'll set a reconnector callback. This reconnector can be any callable |
| 194 | 194 | // so we will set a Closure to reconnect from this manager with the name of |
| 195 | 195 | // the connection, which will allow us to reconnect from the connections. |
| 196 | - $connection->setReconnector(function ($connection) { |
|
| 196 | + $connection->setReconnector(function($connection) { |
|
| 197 | 197 | $this->reconnect($connection->getName()); |
| 198 | 198 | }); |
| 199 | 199 | |
@@ -91,7 +91,7 @@ discard block |
||
| 91 | 91 | /** |
| 92 | 92 | * Get the results of the relationship. |
| 93 | 93 | * |
| 94 | - * @return mixed |
|
| 94 | + * @return Collection |
|
| 95 | 95 | */ |
| 96 | 96 | public function getResults() |
| 97 | 97 | { |
@@ -957,7 +957,7 @@ discard block |
||
| 957 | 957 | /** |
| 958 | 958 | * Get the attach record ID and extra attributes. |
| 959 | 959 | * |
| 960 | - * @param mixed $key |
|
| 960 | + * @param integer $key |
|
| 961 | 961 | * @param mixed $value |
| 962 | 962 | * @param array $attributes |
| 963 | 963 | * @return array |
@@ -1153,7 +1153,7 @@ discard block |
||
| 1153 | 1153 | /** |
| 1154 | 1154 | * Set the columns on the pivot table to retrieve. |
| 1155 | 1155 | * |
| 1156 | - * @param array|mixed $columns |
|
| 1156 | + * @param string $columns |
|
| 1157 | 1157 | * @return $this |
| 1158 | 1158 | */ |
| 1159 | 1159 | public function withPivot($columns) |
@@ -178,7 +178,7 @@ discard block |
||
| 178 | 178 | */ |
| 179 | 179 | public function firstOrFail($columns = ['*']) |
| 180 | 180 | { |
| 181 | - if (! is_null($model = $this->first($columns))) { |
|
| 181 | + if (!is_null($model = $this->first($columns))) { |
|
| 182 | 182 | return $model; |
| 183 | 183 | } |
| 184 | 184 | |
@@ -266,7 +266,7 @@ discard block |
||
| 266 | 266 | { |
| 267 | 267 | $this->query->addSelect($this->getSelectColumns()); |
| 268 | 268 | |
| 269 | - return $this->query->chunk($count, function ($results) use ($callback) { |
|
| 269 | + return $this->query->chunk($count, function($results) use ($callback) { |
|
| 270 | 270 | $this->hydratePivotRelation($results->all()); |
| 271 | 271 | |
| 272 | 272 | return $callback($results); |
@@ -662,7 +662,7 @@ discard block |
||
| 662 | 662 | if (count($result) == count(array_unique($id))) { |
| 663 | 663 | return $result; |
| 664 | 664 | } |
| 665 | - } elseif (! is_null($result)) { |
|
| 665 | + } elseif (!is_null($result)) { |
|
| 666 | 666 | return $result; |
| 667 | 667 | } |
| 668 | 668 | |
@@ -813,7 +813,7 @@ discard block |
||
| 813 | 813 | if ($detaching && count($detach) > 0) { |
| 814 | 814 | $this->detach($detach); |
| 815 | 815 | |
| 816 | - $changes['detached'] = (array) array_map(function ($v) { |
|
| 816 | + $changes['detached'] = (array) array_map(function($v) { |
|
| 817 | 817 | return is_numeric($v) ? (int) $v : (string) $v; |
| 818 | 818 | }, $detach); |
| 819 | 819 | } |
@@ -843,7 +843,7 @@ discard block |
||
| 843 | 843 | $results = []; |
| 844 | 844 | |
| 845 | 845 | foreach ($records as $id => $attributes) { |
| 846 | - if (! is_array($attributes)) { |
|
| 846 | + if (!is_array($attributes)) { |
|
| 847 | 847 | list($id, $attributes) = [$attributes, []]; |
| 848 | 848 | } |
| 849 | 849 | |
@@ -869,7 +869,7 @@ discard block |
||
| 869 | 869 | // If the ID is not in the list of existing pivot IDs, we will insert a new pivot |
| 870 | 870 | // record, otherwise, we will just update this existing record on this joining |
| 871 | 871 | // table, so that the developers will easily update these records pain free. |
| 872 | - if (! in_array($id, $current)) { |
|
| 872 | + if (!in_array($id, $current)) { |
|
| 873 | 873 | $this->attach($id, $attributes, $touch); |
| 874 | 874 | |
| 875 | 875 | $changes['attached'][] = is_numeric($id) ? (int) $id : (string) $id; |
@@ -1033,7 +1033,7 @@ discard block |
||
| 1033 | 1033 | { |
| 1034 | 1034 | $fresh = $this->parent->freshTimestamp(); |
| 1035 | 1035 | |
| 1036 | - if (! $exists && $this->hasPivotColumn($this->createdAt())) { |
|
| 1036 | + if (!$exists && $this->hasPivotColumn($this->createdAt())) { |
|
| 1037 | 1037 | $record[$this->createdAt()] = $fresh; |
| 1038 | 1038 | } |
| 1039 | 1039 | |
@@ -210,7 +210,7 @@ |
||
| 210 | 210 | /** |
| 211 | 211 | * Get the results of the relationship. |
| 212 | 212 | * |
| 213 | - * @return mixed |
|
| 213 | + * @return Collection |
|
| 214 | 214 | */ |
| 215 | 215 | public function getResults() |
| 216 | 216 | { |
@@ -240,7 +240,7 @@ discard block |
||
| 240 | 240 | */ |
| 241 | 241 | public function firstOrFail($columns = ['*']) |
| 242 | 242 | { |
| 243 | - if (! is_null($model = $this->first($columns))) { |
|
| 243 | + if (!is_null($model = $this->first($columns))) { |
|
| 244 | 244 | return $model; |
| 245 | 245 | } |
| 246 | 246 | |
@@ -300,7 +300,7 @@ discard block |
||
| 300 | 300 | if (count($result) == count(array_unique($id))) { |
| 301 | 301 | return $result; |
| 302 | 302 | } |
| 303 | - } elseif (! is_null($result)) { |
|
| 303 | + } elseif (!is_null($result)) { |
|
| 304 | 304 | return $result; |
| 305 | 305 | } |
| 306 | 306 | |
@@ -141,7 +141,7 @@ discard block |
||
| 141 | 141 | * |
| 142 | 142 | * Called via eager load method of Eloquent query builder. |
| 143 | 143 | * |
| 144 | - * @return mixed |
|
| 144 | + * @return Collection |
|
| 145 | 145 | */ |
| 146 | 146 | public function getEager() |
| 147 | 147 | { |
@@ -193,7 +193,7 @@ discard block |
||
| 193 | 193 | * Gather all of the foreign keys for a given type. |
| 194 | 194 | * |
| 195 | 195 | * @param string $type |
| 196 | - * @return array |
|
| 196 | + * @return \Illuminate\Support\Collection |
|
| 197 | 197 | */ |
| 198 | 198 | protected function gatherKeysByType($type) |
| 199 | 199 | { |
@@ -61,7 +61,7 @@ discard block |
||
| 61 | 61 | */ |
| 62 | 62 | public function getResults() |
| 63 | 63 | { |
| 64 | - if (! $this->otherKey) { |
|
| 64 | + if (!$this->otherKey) { |
|
| 65 | 65 | return; |
| 66 | 66 | } |
| 67 | 67 | |
@@ -199,7 +199,7 @@ discard block |
||
| 199 | 199 | { |
| 200 | 200 | $foreign = $this->foreignKey; |
| 201 | 201 | |
| 202 | - return collect($this->dictionary[$type])->map(function ($models) use ($foreign) { |
|
| 202 | + return collect($this->dictionary[$type])->map(function($models) use ($foreign) { |
|
| 203 | 203 | return head($models)->{$foreign}; |
| 204 | 204 | |
| 205 | 205 | })->values()->unique(); |
@@ -93,7 +93,7 @@ |
||
| 93 | 93 | /** |
| 94 | 94 | * Get the next migration batch number. |
| 95 | 95 | * |
| 96 | - * @return int |
|
| 96 | + * @return double |
|
| 97 | 97 | */ |
| 98 | 98 | public function getNextBatchNumber() |
| 99 | 99 | { |
@@ -119,7 +119,7 @@ |
||
| 119 | 119 | { |
| 120 | 120 | $schema = $this->getConnection()->getSchemaBuilder(); |
| 121 | 121 | |
| 122 | - $schema->create($this->table, function ($table) { |
|
| 122 | + $schema->create($this->table, function($table) { |
|
| 123 | 123 | // The migrations table is responsible for keeping track of which of the |
| 124 | 124 | // migrations have actually run for the application. We'll create the |
| 125 | 125 | // table to hold the migration file's path as well as the batch ID. |
@@ -69,8 +69,8 @@ discard block |
||
| 69 | 69 | /** |
| 70 | 70 | * Register an event listener with the dispatcher. |
| 71 | 71 | * |
| 72 | - * @param string|array $events |
|
| 73 | - * @param mixed $listener |
|
| 72 | + * @param string $events |
|
| 73 | + * @param \Closure $listener |
|
| 74 | 74 | * @param int $priority |
| 75 | 75 | * @return void |
| 76 | 76 | */ |
@@ -335,7 +335,7 @@ discard block |
||
| 335 | 335 | /** |
| 336 | 336 | * Create a class based listener using the IoC container. |
| 337 | 337 | * |
| 338 | - * @param mixed $listener |
|
| 338 | + * @param string $listener |
|
| 339 | 339 | * @return \Closure |
| 340 | 340 | */ |
| 341 | 341 | public function createClassListener($listener) |
@@ -119,7 +119,7 @@ discard block |
||
| 119 | 119 | */ |
| 120 | 120 | public function push($event, $payload = []) |
| 121 | 121 | { |
| 122 | - $this->listen($event.'_pushed', function () use ($event, $payload) { |
|
| 122 | + $this->listen($event.'_pushed', function() use ($event, $payload) { |
|
| 123 | 123 | $this->fire($event, $payload); |
| 124 | 124 | }); |
| 125 | 125 | } |
@@ -207,7 +207,7 @@ discard block |
||
| 207 | 207 | // If an array is not given to us as the payload, we will turn it into one so |
| 208 | 208 | // we can easily use call_user_func_array on the listeners, passing in the |
| 209 | 209 | // payload to each of them so that they receive each of these arguments. |
| 210 | - if (! is_array($payload)) { |
|
| 210 | + if (!is_array($payload)) { |
|
| 211 | 211 | $payload = [$payload]; |
| 212 | 212 | } |
| 213 | 213 | |
@@ -223,7 +223,7 @@ discard block |
||
| 223 | 223 | // If a response is returned from the listener and event halting is enabled |
| 224 | 224 | // we will just return this response, and not call the rest of the event |
| 225 | 225 | // listeners. Otherwise we will add the response on the response list. |
| 226 | - if (! is_null($response) && $halt) { |
|
| 226 | + if (!is_null($response) && $halt) { |
|
| 227 | 227 | array_pop($this->firing); |
| 228 | 228 | |
| 229 | 229 | return $response; |
@@ -273,7 +273,7 @@ discard block |
||
| 273 | 273 | { |
| 274 | 274 | $wildcards = $this->getWildcardListeners($eventName); |
| 275 | 275 | |
| 276 | - if (! isset($this->sorted[$eventName])) { |
|
| 276 | + if (!isset($this->sorted[$eventName])) { |
|
| 277 | 277 | $this->sortListeners($eventName); |
| 278 | 278 | } |
| 279 | 279 | |
@@ -342,7 +342,7 @@ discard block |
||
| 342 | 342 | { |
| 343 | 343 | $container = $this->container; |
| 344 | 344 | |
| 345 | - return function () use ($listener, $container) { |
|
| 345 | + return function() use ($listener, $container) { |
|
| 346 | 346 | return call_user_func_array( |
| 347 | 347 | $this->createClassCallable($listener, $container), func_get_args() |
| 348 | 348 | ); |
@@ -406,7 +406,7 @@ discard block |
||
| 406 | 406 | */ |
| 407 | 407 | protected function createQueuedHandlerCallable($class, $method) |
| 408 | 408 | { |
| 409 | - return function () use ($class, $method) { |
|
| 409 | + return function() use ($class, $method) { |
|
| 410 | 410 | $arguments = $this->cloneArgumentsForQueueing(func_get_args()); |
| 411 | 411 | |
| 412 | 412 | if (method_exists($class, 'queue')) { |
@@ -427,7 +427,7 @@ discard block |
||
| 427 | 427 | */ |
| 428 | 428 | protected function cloneArgumentsForQueueing(array $arguments) |
| 429 | 429 | { |
| 430 | - return array_map(function ($a) { |
|
| 430 | + return array_map(function($a) { |
|
| 431 | 431 | return is_object($a) ? clone $a : $a; |
| 432 | 432 | }, $arguments); |
| 433 | 433 | } |
@@ -66,7 +66,7 @@ discard block |
||
| 66 | 66 | * Write the contents of a file. |
| 67 | 67 | * |
| 68 | 68 | * @param string $path |
| 69 | - * @param string|resource $contents |
|
| 69 | + * @param string $contents |
|
| 70 | 70 | * @param string $visibility |
| 71 | 71 | * @return bool |
| 72 | 72 | */ |
@@ -105,7 +105,7 @@ discard block |
||
| 105 | 105 | * |
| 106 | 106 | * @param string $path |
| 107 | 107 | * @param string $visibility |
| 108 | - * @return void |
|
| 108 | + * @return boolean |
|
| 109 | 109 | */ |
| 110 | 110 | public function setVisibility($path, $visibility) |
| 111 | 111 | { |
@@ -117,7 +117,7 @@ discard block |
||
| 117 | 117 | * |
| 118 | 118 | * @param string $path |
| 119 | 119 | * @param string $data |
| 120 | - * @return int |
|
| 120 | + * @return boolean |
|
| 121 | 121 | */ |
| 122 | 122 | public function prepend($path, $data, $separator = PHP_EOL) |
| 123 | 123 | { |
@@ -133,7 +133,7 @@ discard block |
||
| 133 | 133 | * |
| 134 | 134 | * @param string $path |
| 135 | 135 | * @param string $data |
| 136 | - * @return int |
|
| 136 | + * @return boolean |
|
| 137 | 137 | */ |
| 138 | 138 | public function append($path, $data, $separator = PHP_EOL) |
| 139 | 139 | { |
@@ -211,7 +211,7 @@ discard block |
||
| 211 | 211 | * Get the file's last modification time. |
| 212 | 212 | * |
| 213 | 213 | * @param string $path |
| 214 | - * @return int |
|
| 214 | + * @return string|false |
|
| 215 | 215 | */ |
| 216 | 216 | public function lastModified($path) |
| 217 | 217 | { |