Skip to content

Instantly share code, notes, and snippets.

View JustSteveKing's full-sized avatar
🐘
Building API tools and educational content

Steve McDougall JustSteveKing

🐘
Building API tools and educational content
View GitHub Profile
@JustSteveKing
JustSteveKing / ApiRenderer.php
Last active September 8, 2023 15:03
Handling Errors in Laravel
<?php
declare(strict_types=1);
namespace App\Exceptions\Rendering;
use Illuminate\Contracts\Support\Responsable;
use Illuminate\Http\Request;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
use Throwable;
@JustSteveKing
JustSteveKing / rector.php
Created January 13, 2024 22:44
Laravel Rector Config
<?php
declare(strict_types=1);
use Rector\CodeQuality\Rector\Class_\InlineConstructorDefaultToPropertyRector;
use Rector\Config\RectorConfig;
use Rector\Set\ValueObject\LevelSetList;
use Rector\Set\ValueObject\SetList;
return static function (RectorConfig $rectorConfig): void {
@JustSteveKing
JustSteveKing / phpstan.neon
Last active February 28, 2024 19:36
Default Laravel PHPStan Config
parameters:
paths:
- app/
level: 9
ignoreErrors:
excludePaths:
@JustSteveKing
JustSteveKing / pint.json
Last active March 1, 2024 19:28
Laravel Pint configuration
{
"preset": "per",
"rules": {
"align_multiline_comment": true,
"array_indentation": true,
"array_syntax": true,
"blank_line_after_namespace": true,
"blank_line_after_opening_tag": true,
"combine_consecutive_issets": true,
"combine_consecutive_unsets": true,