diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index ce3811c66..c541f4514 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -23,9 +23,6 @@ jobs: - name: Check lint run: make lint - - name: Analyse by phpstan - run: make analyse - - name: Execute tests (Unit and Feature tests) via PHPUnit run: make test diff --git a/Makefile b/Makefile index fdc74faf0..36cc3f9b2 100644 --- a/Makefile +++ b/Makefile @@ -13,9 +13,6 @@ start: db-prepare: php artisan migrate --seed -analyse: - composer phpstan analyse - lint: composer phpcs diff --git a/app/Activity.php b/app/Activity.php index be578cda8..ed0f8e301 100644 --- a/app/Activity.php +++ b/app/Activity.php @@ -2,18 +2,6 @@ namespace App; -/** - * @property int $id - * @property string|null $log_name - * @property string $description - * @property int|null $subject_id - * @property string|null $subject_type - * @property int|null $causer_id - * @property string|null $causer_type - * @property \Illuminate\Support\Collection|null $properties - * @property \Illuminate\Support\Carbon|null $created_at - * @property \Illuminate\Support\Carbon|null $updated_at - */ class Activity extends \Spatie\Activitylog\Models\Activity { } diff --git a/app/Http/Middleware/Authenticate.php b/app/Http/Middleware/Authenticate.php index 0ec25e6b8..a1adc0dd3 100644 --- a/app/Http/Middleware/Authenticate.php +++ b/app/Http/Middleware/Authenticate.php @@ -6,6 +6,10 @@ class Authenticate extends Middleware { + /** + * @param \Illuminate\Http\Request $request + * @return string|void + */ protected function redirectTo($request): ?string { if (!$request->expectsJson()) { diff --git a/composer.json b/composer.json index 8e08781a9..18a512ff9 100644 --- a/composer.json +++ b/composer.json @@ -47,7 +47,6 @@ "heroku/heroku-buildpack-php": "^164.0", "mockery/mockery": "^1.3", "nunomaduro/collision": "~4.2", - "nunomaduro/larastan": "^0.5.0", "phpunit/phpunit": "^9.0", "roave/security-advisories": "dev-master", "squizlabs/php_codesniffer": "*" @@ -82,7 +81,6 @@ "phpcs": "phpcs", "phpunit": "phpunit", "phpcbf": "phpcbf", - "phpstan": "phpstan", "post-autoload-dump": [ "Illuminate\\Foundation\\ComposerScripts::postAutoloadDump", "@php artisan package:discover --ansi" diff --git a/composer.lock b/composer.lock index cb6ae3944..cf751d8ec 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "9484a0fff65d6db2783ae4e3ae04f0b9", + "content-hash": "6334c8276c82d7b2205b0684e2f75fd1", "packages": [ { "name": "brick/math", @@ -1263,16 +1263,16 @@ }, { "name": "laravel/framework", - "version": "v7.5.0", + "version": "v7.5.1", "source": { "type": "git", "url": "https://github.com/laravel/framework.git", - "reference": "0e71d781854723d9428e1ae921a7edfe0a10c8ec" + "reference": "b2457b1ddb9c59396313eae4e948bdc5fa5251db" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/framework/zipball/0e71d781854723d9428e1ae921a7edfe0a10c8ec", - "reference": "0e71d781854723d9428e1ae921a7edfe0a10c8ec", + "url": "https://api.github.com/repos/laravel/framework/zipball/b2457b1ddb9c59396313eae4e948bdc5fa5251db", + "reference": "b2457b1ddb9c59396313eae4e948bdc5fa5251db", "shasum": "" }, "require": { @@ -1410,7 +1410,7 @@ "framework", "laravel" ], - "time": "2020-04-07T14:47:48+00:00" + "time": "2020-04-07T18:52:38+00:00" }, { "name": "laravel/helpers", @@ -7363,78 +7363,6 @@ ], "time": "2020-04-04T19:56:08+00:00" }, - { - "name": "nunomaduro/larastan", - "version": "v0.5.5", - "source": { - "type": "git", - "url": "https://github.com/nunomaduro/larastan.git", - "reference": "0a24d9c809185b04d00d8b8c1b58a6581cae6c40" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/nunomaduro/larastan/zipball/0a24d9c809185b04d00d8b8c1b58a6581cae6c40", - "reference": "0a24d9c809185b04d00d8b8c1b58a6581cae6c40", - "shasum": "" - }, - "require": { - "composer/composer": "^1.0", - "ext-json": "*", - "illuminate/console": "^6.0 || ^7.0", - "illuminate/container": "^6.0 || ^7.0", - "illuminate/contracts": "^6.0 || ^7.0", - "illuminate/database": "^6.0 || ^7.0", - "illuminate/http": "^6.0 || ^7.0", - "illuminate/pipeline": "^6.0 || ^7.0", - "illuminate/support": "^6.0 || ^7.0", - "mockery/mockery": "^0.9 || ^1.0", - "php": "^7.2", - "phpstan/phpstan": "^0.12", - "symfony/process": "^4.3 || ^5.0" - }, - "require-dev": { - "orchestra/testbench": "^4.0 || ^5.0", - "phpunit/phpunit": "^7.3 || ^8.2" - }, - "suggest": { - "orchestra/testbench": "^4.0 || ^5.0" - }, - "type": "phpstan-extension", - "extra": { - "phpstan": { - "includes": [ - "extension.neon" - ] - } - }, - "autoload": { - "psr-4": { - "NunoMaduro\\Larastan\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nuno Maduro", - "email": "enunomaduro@gmail.com" - } - ], - "description": "Larastan - Discover bugs in your code without running it. A phpstan/phpstan wrapper for Laravel", - "keywords": [ - "PHPStan", - "code analyse", - "code analysis", - "larastan", - "laravel", - "package", - "php", - "static analysis" - ], - "time": "2020-03-26T18:13:35+00:00" - }, { "name": "phar-io/manifest", "version": "1.0.3", @@ -7751,45 +7679,6 @@ ], "time": "2020-03-05T15:02:03+00:00" }, - { - "name": "phpstan/phpstan", - "version": "0.12.18", - "source": { - "type": "git", - "url": "https://github.com/phpstan/phpstan.git", - "reference": "1ce27fe29c8660a27926127d350d53d80c4d4286" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/1ce27fe29c8660a27926127d350d53d80c4d4286", - "reference": "1ce27fe29c8660a27926127d350d53d80c4d4286", - "shasum": "" - }, - "require": { - "php": "^7.1" - }, - "bin": [ - "phpstan", - "phpstan.phar" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "0.12-dev" - } - }, - "autoload": { - "files": [ - "bootstrap.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "PHPStan - PHP Static Analysis Tool", - "time": "2020-03-22T16:51:47+00:00" - }, { "name": "phpunit/php-code-coverage", "version": "8.0.1", diff --git a/phpstan.neon b/phpstan.neon deleted file mode 100644 index 942a2af64..000000000 --- a/phpstan.neon +++ /dev/null @@ -1,19 +0,0 @@ -includes: - - ./vendor/nunomaduro/larastan/extension.neon - -parameters: - - paths: - - app - - ./_ide_helper_models.php - - # The level 8 is the highest level - level: 5 - - ignoreErrors: - - '#Unsafe usage of new static#' - - excludes_analyse: - - ./*/*/FileToBeExcluded.php - - checkMissingIterableValueType: false