Skip to content

Commit

Permalink
Fix coding style issues
Browse files Browse the repository at this point in the history
  • Loading branch information
alies-dev committed Feb 3, 2025
1 parent f6d1b30 commit 7c19648
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 6 deletions.
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@
"@test:unit",
"@test:type"
],
"test:app": "./tests/Application/laravel-test.sh",
"test:type": "phpunit --testsuite=type",
"test:unit": "phpunit --testsuite=unit"
}
Expand Down
4 changes: 3 additions & 1 deletion src/Exceptions/UnknownApplicationConfiguration.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<?php declare(strict_types=1);
<?php

declare(strict_types=1);

namespace Psalm\LaravelPlugin\Exceptions;

Expand Down
3 changes: 1 addition & 2 deletions src/Providers/ApplicationProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
use function defined;
use function dirname;
use function file_exists;
use function get_class;
use function getcwd;
use function microtime;

Expand Down Expand Up @@ -53,7 +52,7 @@ public static function getApp(): LaravelApplication
/** @psalm-suppress MixedAssignment */
$app = require $applicationPath;
} else { // Laravel Packages
$app = (new self())->createApplication(); // Orchestra\Testbench
$app = (new self())->createApplication(); // Orchestra\Testbench (e.g., test:type command)
}

if (! $app instanceof LaravelApplication) {
Expand Down
1 change: 1 addition & 0 deletions src/Providers/ModelStubProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
use function glob;
use function method_exists;
use function unlink;
use function is_array;

final class ModelStubProvider implements GeneratesStubs
{
Expand Down
6 changes: 3 additions & 3 deletions tests/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Tests

There are 3 types of tests:
1. Type (main one): Use phpt files to run Psalm over code snippets in the context of fake Laravel app [using orchestra/testbench]
2. Application: create an [almost] empty Laravel app and run Psalm over its codebase.
3. Unit: use PHPUnit to test some internal logic without running Psalm.
1. **Type** (the main one): uses .phpt files to run Psalm over code snippets in the context of a fake Laravel app [using orchestra/testbench]
2. **Application**: creates an empty Laravel app, adds some typical classes of different types and run Psalm over its codebase.
3. **Unit**: uses PHPUnit to test some internal logic without running Psalm.

0 comments on commit 7c19648

Please sign in to comment.