From b6b14b086a81c6023b46d2cd278b84913c1b1373 Mon Sep 17 00:00:00 2001 From: Anders Jenbo Date: Fri, 31 Jan 2025 19:14:18 +0100 Subject: [PATCH 1/3] feat: add type hints for $app in artisan and public/index.php Added PHPDoc type hints for the $app variable to improve static analysis support in PHPStan and PHPStorm. This prevents tools from incorrectly flagging the variable and enhances developer experience. No functional changes; only improves code readability and IDE support. --- artisan | 6 ++++-- public/index.php | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/artisan b/artisan index 8e04b42240f..caaecd6ab03 100755 --- a/artisan +++ b/artisan @@ -1,6 +1,7 @@ #!/usr/bin/env php handleCommand(new ArgvInput); +/** @var Application $app */ +$app = require_once __DIR__.'/bootstrap/app.php'; +$status = $app->handleCommand(new ArgvInput); exit($status); diff --git a/public/index.php b/public/index.php index 947d98963f0..8c61f2cc77e 100644 --- a/public/index.php +++ b/public/index.php @@ -1,5 +1,6 @@ handleRequest(Request::capture()); +/** @var Application $app */ +$app = require_once __DIR__.'/../bootstrap/app.php'; +$app->handleRequest(Request::capture()); From 27742bd494686b19e4313dee4b5f59a0c7f5183c Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Wed, 5 Feb 2025 12:00:34 +0100 Subject: [PATCH 2/3] Update artisan --- artisan | 1 + 1 file changed, 1 insertion(+) diff --git a/artisan b/artisan index caaecd6ab03..c35e31d6a29 100755 --- a/artisan +++ b/artisan @@ -12,6 +12,7 @@ require __DIR__.'/vendor/autoload.php'; // Bootstrap Laravel and handle the command... /** @var Application $app */ $app = require_once __DIR__.'/bootstrap/app.php'; + $status = $app->handleCommand(new ArgvInput); exit($status); From 6a0fe7e821c6359f5a73cdf5865021623dc96510 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Wed, 5 Feb 2025 12:01:00 +0100 Subject: [PATCH 3/3] Update index.php --- public/index.php | 1 + 1 file changed, 1 insertion(+) diff --git a/public/index.php b/public/index.php index 8c61f2cc77e..ee8f07e9938 100644 --- a/public/index.php +++ b/public/index.php @@ -16,4 +16,5 @@ // Bootstrap Laravel and handle the request... /** @var Application $app */ $app = require_once __DIR__.'/../bootstrap/app.php'; + $app->handleRequest(Request::capture());