diff --git a/.github/workflows/fix-php-code-style-issues.yml b/.github/workflows/fix-php-code-style-issues.yml index 1d74a65a..7f61fce2 100644 --- a/.github/workflows/fix-php-code-style-issues.yml +++ b/.github/workflows/fix-php-code-style-issues.yml @@ -13,7 +13,7 @@ jobs: ref: ${{ github.head_ref }} - name: Fix PHP code style issues - uses: aglipanci/laravel-pint-action@2.3.0 + uses: aglipanci/laravel-pint-action@2.3.1 - name: Commit changes uses: stefanzweifel/git-auto-commit-action@v5 diff --git a/src/Commands/SeoScan.php b/src/Commands/SeoScan.php index 806fde25..62927512 100644 --- a/src/Commands/SeoScan.php +++ b/src/Commands/SeoScan.php @@ -165,7 +165,7 @@ private static function getRoutes(): Collection return $routes; } - private function calculateScoreForModel(string $model, string $scope = null): void + private function calculateScoreForModel(string $model, ?string $scope = null): void { $items = new $model; @@ -198,7 +198,7 @@ private function calculateScoreForModel(string $model, string $scope = null): vo }); } - private function saveScoreToDatabase(SeoScore $seo, string $url, object $model = null): void + private function saveScoreToDatabase(SeoScore $seo, string $url, ?object $model = null): void { $score = $seo->getScore(); diff --git a/src/Helpers/TransitionWords.php b/src/Helpers/TransitionWords.php index 6c0a5838..c7df4104 100644 --- a/src/Helpers/TransitionWords.php +++ b/src/Helpers/TransitionWords.php @@ -54,7 +54,7 @@ public static function getTransitionWords(): array return self::$transitionWords; } - public static function getTransitionWordsOnly(string $locale = null): array + public static function getTransitionWordsOnly(?string $locale = null): array { $transitionWords = self::$transitionWords; diff --git a/src/Jobs/Scan.php b/src/Jobs/Scan.php index 59752a64..b466327c 100644 --- a/src/Jobs/Scan.php +++ b/src/Jobs/Scan.php @@ -17,7 +17,7 @@ class Scan implements ShouldQueue public $timeout = 60 * 60 * 3; - public function handle(string $url = null): void + public function handle(?string $url = null): void { if (! $url) { Artisan::call('seo:scan'); diff --git a/src/Seo.php b/src/Seo.php index 2ccd5aaf..539ed53e 100755 --- a/src/Seo.php +++ b/src/Seo.php @@ -29,7 +29,7 @@ public function __construct( ) { } - public function check(string $url, ProgressBar $progress = null, bool $useJavascript = false): SeoScore + public function check(string $url, ?ProgressBar $progress = null, bool $useJavascript = false): SeoScore { $this->progress = $progress; $this->url = $url; @@ -80,7 +80,7 @@ private function visitPage(string $url): object return $response; } - private function runChecks(Response $response, string $javascriptResponse = null): void + private function runChecks(Response $response, ?string $javascriptResponse = null): void { $checks = self::orderedCheckClasses(); diff --git a/src/helpers.php b/src/helpers.php index efb74644..97b53896 100644 --- a/src/helpers.php +++ b/src/helpers.php @@ -132,7 +132,7 @@ function bytesToHumanReadable(int $bytes): string } if (! function_exists('addBaseIfRelativeUrl')) { - function addBaseIfRelativeUrl(string $url, string $checkedUrl = null): string + function addBaseIfRelativeUrl(string $url, ?string $checkedUrl = null): string { if (! Str::startsWith($url, '/')) { return $url;