You've already forked Atomcms-edit
refactor: add return type hints to all controller methods
Added proper return types (View, RedirectResponse, JsonResponse, Collection) to 40+ controller methods across 16 controllers. Also added missing imports for Illuminate response types and tightened parameter types (e.g. InstallationController::showStep now uses int instead of mixed).
This commit is contained in:
@@ -4,10 +4,11 @@ namespace App\Http\Controllers\User;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Models\User;
|
||||
use Illuminate\View\View;
|
||||
|
||||
class UserReferralController extends Controller
|
||||
{
|
||||
public function __invoke(string $referralCode)
|
||||
public function __invoke(string $referralCode): View
|
||||
{
|
||||
if (! User::where('referral_code', $referralCode)->exists()) {
|
||||
abort(404);
|
||||
|
||||
Reference in New Issue
Block a user