Skip to content

Commit ef3c8eb

Browse files
authored
Improve docblocks for nullable parameters (#56996)
1 parent 22267cb commit ef3c8eb

File tree

10 files changed

+11
-11
lines changed

10 files changed

+11
-11
lines changed

src/Illuminate/Collections/LazyCollection.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1344,7 +1344,7 @@ public function split($numberOfGroups)
13441344
/**
13451345
* Get the first item in the collection, but only if exactly one item exists. Otherwise, throw an exception.
13461346
*
1347-
* @param (callable(TValue, TKey): bool)|string $key
1347+
* @param (callable(TValue, TKey): bool)|string|null $key
13481348
* @param mixed $operator
13491349
* @param mixed $value
13501350
* @return TValue
@@ -1369,7 +1369,7 @@ public function sole($key = null, $operator = null, $value = null)
13691369
/**
13701370
* Get the first item in the collection but throw an exception if no matching items exist.
13711371
*
1372-
* @param (callable(TValue, TKey): bool)|string $key
1372+
* @param (callable(TValue, TKey): bool)|string|null $key
13731373
* @param mixed $operator
13741374
* @param mixed $value
13751375
* @return TValue

src/Illuminate/Database/Eloquent/Relations/HasOneOrManyThrough.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -468,7 +468,7 @@ public function get($columns = ['*'])
468468
* @param int|null $perPage
469469
* @param array $columns
470470
* @param string $pageName
471-
* @param int $page
471+
* @param int|null $page
472472
* @return \Illuminate\Pagination\LengthAwarePaginator
473473
*/
474474
public function paginate($perPage = null, $columns = ['*'], $pageName = 'page', $page = null)

src/Illuminate/Database/Schema/ForeignIdColumnDefinition.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ public function constrained($table = null, $column = null, $indexName = null)
4646
* Specify which column this foreign ID references on another table.
4747
*
4848
* @param string $column
49-
* @param string $indexName
49+
* @param string|null $indexName
5050
* @return \Illuminate\Database\Schema\ForeignKeyDefinition
5151
*/
5252
public function references($column, $indexName = null)

src/Illuminate/Foundation/Testing/Concerns/InteractsWithDatabase.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@ public function castAsJson($value, $connection = null)
285285
* Get the database connection.
286286
*
287287
* @param string|null $connection
288-
* @param \Illuminate\Database\Eloquent\Model|class-string<\Illuminate\Database\Eloquent\Model>|string $table
288+
* @param \Illuminate\Database\Eloquent\Model|class-string<\Illuminate\Database\Eloquent\Model>|string|null $table
289289
* @return \Illuminate\Database\Connection
290290
*/
291291
protected function getConnection($connection = null, $table = null)

src/Illuminate/Http/Concerns/InteractsWithInput.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ public function file($key = null, $default = null)
250250
/**
251251
* Retrieve data from the instance.
252252
*
253-
* @param string $key
253+
* @param string|null $key
254254
* @param mixed $default
255255
* @return mixed
256256
*/

src/Illuminate/Http/Exceptions/HttpResponseException.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ class HttpResponseException extends RuntimeException
1919
* Create a new HTTP response exception instance.
2020
*
2121
* @param \Symfony\Component\HttpFoundation\Response $response
22-
* @param \Throwable $previous
22+
* @param \Throwable|null $previous
2323
*/
2424
public function __construct(Response $response, ?Throwable $previous = null)
2525
{

src/Illuminate/Queue/InteractsWithQueue.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ public function assertNotFailed()
211211
/**
212212
* Assert that the job was released back onto the queue.
213213
*
214-
* @param \DateTimeInterface|\DateInterval|int $delay
214+
* @param \DateTimeInterface|\DateInterval|int|null $delay
215215
* @return $this
216216
*/
217217
public function assertReleased($delay = null)

src/Illuminate/Support/Facades/Http.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ protected static function getFacadeAccessor()
117117
/**
118118
* Register a stub callable that will intercept requests and be able to return stub responses.
119119
*
120-
* @param \Closure|array $callback
120+
* @param \Closure|array|null $callback
121121
* @return \Illuminate\Http\Client\Factory
122122
*/
123123
public static function fake($callback = null)

src/Illuminate/Support/Fluent.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ public function all($keys = null)
153153
/**
154154
* Get data from the fluent instance.
155155
*
156-
* @param string $key
156+
* @param string|null $key
157157
* @param mixed $default
158158
* @return mixed
159159
*/

src/Illuminate/Support/InteractsWithTime.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ protected function currentTime()
6767
* Given a start time, format the total run time for human readability.
6868
*
6969
* @param float $startTime
70-
* @param float $endTime
70+
* @param float|null $endTime
7171
* @return string
7272
*/
7373
protected function runTimeForHumans($startTime, $endTime = null)

0 commit comments

Comments
 (0)