Skip to content

Commit 8a565fa

Browse files
authored
[8.x] Declare that abort(), dd() and kill() never return (#39108)
* abort() never returns * Application::abort() never returns * App::abort() never returns * Queue\Worker::kill() never returns * Database\Query::dd() never returns * Stringable::dd() never returns
1 parent 04fc7c2 commit 8a565fa

File tree

6 files changed

+6
-6
lines changed

6 files changed

+6
-6
lines changed

src/Illuminate/Database/Query/Builder.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3402,7 +3402,7 @@ public function dump()
34023402
/**
34033403
* Die and dump the current SQL and bindings.
34043404
*
3405-
* @return void
3405+
* @return never
34063406
*/
34073407
public function dd()
34083408
{

src/Illuminate/Foundation/Application.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1104,7 +1104,7 @@ public function isDownForMaintenance()
11041104
* @param int $code
11051105
* @param string $message
11061106
* @param array $headers
1107-
* @return void
1107+
* @return never
11081108
*
11091109
* @throws \Symfony\Component\HttpKernel\Exception\HttpException
11101110
* @throws \Symfony\Component\HttpKernel\Exception\NotFoundHttpException

src/Illuminate/Foundation/helpers.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
* @param \Symfony\Component\HttpFoundation\Response|\Illuminate\Contracts\Support\Responsable|int $code
2929
* @param string $message
3030
* @param array $headers
31-
* @return void
31+
* @return never
3232
*
3333
* @throws \Symfony\Component\HttpKernel\Exception\HttpException
3434
* @throws \Symfony\Component\HttpKernel\Exception\NotFoundHttpException

src/Illuminate/Queue/Worker.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -726,7 +726,7 @@ public function stop($status = 0)
726726
* Kill the process.
727727
*
728728
* @param int $status
729-
* @return void
729+
* @return never
730730
*/
731731
public function kill($status = 0)
732732
{

src/Illuminate/Support/Facades/App.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
* @method static string storagePath(string $path = '')
3737
* @method static string version()
3838
* @method static string|bool environment(string|array ...$environments)
39-
* @method static void abort(int $code, string $message = '', array $headers = [])
39+
* @method static never abort(int $code, string $message = '', array $headers = [])
4040
* @method static void boot()
4141
* @method static void booted(callable $callback)
4242
* @method static void booting(callable $callback)

src/Illuminate/Support/Stringable.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -789,7 +789,7 @@ public function dump()
789789
/**
790790
* Dump the string and end the script.
791791
*
792-
* @return void
792+
* @return never
793793
*/
794794
public function dd()
795795
{

0 commit comments

Comments
 (0)