Skip to content

Commit a837972

Browse files
phpstan OK
1 parent fce53f3 commit a837972

File tree

3 files changed

+29
-27
lines changed

3 files changed

+29
-27
lines changed

.github/workflows/laravel.yml

Lines changed: 27 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -2,34 +2,37 @@ name: Laravel
22

33
on:
44
push:
5-
branches: [ "main" ]
5+
branches: ["main"]
66
pull_request:
7-
branches: [ "main" ]
7+
branches: ["main"]
88

99
jobs:
1010
laravel-tests:
11-
1211
runs-on: ubuntu-latest
1312

1413
steps:
15-
- uses: shivammathur/setup-php@15c43e89cdef867065b0213be354c2841860869e
16-
with:
17-
php-version: '8.2'
18-
- uses: actions/checkout@v4
19-
- name: Copy .env
20-
run: php -r "file_exists('.env') || copy('.env.example', '.env');"
21-
- name: Install Dependencies
22-
run: composer install -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist
23-
- name: Generate key
24-
run: php artisan key:generate
25-
- name: Directory Permissions
26-
run: chmod -R 777 storage bootstrap/cache
27-
- name: Create Database
28-
run: |
29-
mkdir -p database
30-
touch database/database.sqlite
31-
- name: Execute tests (Unit and Feature tests) via PHPUnit/Pest
32-
env:
33-
DB_CONNECTION: sqlite
34-
DB_DATABASE: database/database.sqlite
35-
run: php artisan test
14+
- uses: shivammathur/setup-php@15c43e89cdef867065b0213be354c2841860869e
15+
with:
16+
php-version: "8.2"
17+
- uses: actions/checkout@v4
18+
- name: Copy .env
19+
run: php -r "file_exists('.env') || copy('.env.example', '.env');"
20+
- name: Install Dependencies
21+
run: composer install -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist
22+
- name: Generate key
23+
run: php artisan key:generate
24+
- name: Directory Permissions
25+
run: chmod -R 777 storage bootstrap/cache
26+
- name: Create Database
27+
run: |
28+
mkdir -p database
29+
touch database/database.sqlite
30+
- name: phpstan analyse
31+
run: ./vendor/bin/phpstan analyse
32+
- name: pint format
33+
run: ./vendor/bin/pint
34+
- name: Execute tests (Unit and Feature tests) via PHPUnit/Pest
35+
env:
36+
DB_CONNECTION: sqlite
37+
DB_DATABASE: database/database.sqlite
38+
run: php artisan test

app/helpers.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ function authUser(): User
2828
if (! function_exists('diskPublic')) {
2929
function diskPublic(): FilesystemAdapter
3030
{
31-
// @phpstan-ignore-next-line
3231
return Storage::disk('public');
3332
}
3433
}
@@ -51,7 +50,7 @@ function typeString(mixed $value, string $fallback = ''): string
5150

5251
if (! function_exists('typeArray')) {
5352
/**
54-
* @param array<mixed> $default
53+
* @param array<mixed> $fallback
5554
* @return array<mixed>
5655
*
5756
* @throws BindingResolutionException

phpstan.neon

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ parameters:
1010
level: 9
1111

1212
ignoreErrors:
13-
- '#Unsafe usage of new static#'
13+
# - '#Unsafe usage of new static#'
1414

1515
excludePaths:
1616
- ./*/*/FileToBeExcluded.php

0 commit comments

Comments
 (0)