Skip to content

Commit bce1c6e

Browse files
committed
feat: add native return types to helper functions
1 parent 7796b9b commit bce1c6e

File tree

8 files changed

+88
-131
lines changed

8 files changed

+88
-131
lines changed

src/Illuminate/Collections/helpers.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
* @param \Illuminate\Contracts\Support\Arrayable<TKey, TValue>|iterable<TKey, TValue>|null $value
1414
* @return \Illuminate\Support\Collection<TKey, TValue>
1515
*/
16-
function collect($value = [])
16+
function collect($value = []): Collection
1717
{
1818
return new Collection($value);
1919
}

src/Illuminate/Events/functions.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,8 @@
99
* Create a new queued Closure event listener.
1010
*
1111
* @param \Closure $closure
12-
* @return \Illuminate\Events\QueuedClosure
1312
*/
14-
function queueable(Closure $closure)
13+
function queueable(Closure $closure): QueuedClosure
1514
{
1615
return new QueuedClosure($closure);
1716
}

src/Illuminate/Filesystem/functions.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,8 @@
88
*
99
* @param string|null $basePath
1010
* @param string ...$paths
11-
* @return string
1211
*/
13-
function join_paths($basePath, ...$paths)
12+
function join_paths($basePath, ...$paths): string
1413
{
1514
foreach ($paths as $index => $path) {
1615
if (empty($path) && $path !== '0') {

0 commit comments

Comments
 (0)