From 4f234f10ca473ad8c048902097a2594472817c2a Mon Sep 17 00:00:00 2001 From: aslan Date: Mon, 22 Apr 2024 11:06:10 +0300 Subject: [PATCH] fix lint --- app/Models/User.php | 3 +- composer.json | 6 +- composer.lock | 150 ++++++++++++++++++++++++++++++++-- tests/Feature/ExampleTest.php | 2 +- tests/Unit/ExampleTest.php | 2 +- 5 files changed, 153 insertions(+), 10 deletions(-) diff --git a/app/Models/User.php b/app/Models/User.php index def621f..90155c7 100644 --- a/app/Models/User.php +++ b/app/Models/User.php @@ -9,7 +9,8 @@ use Illuminate\Notifications\Notifiable; class User extends Authenticatable { - use HasFactory, Notifiable; + use HasFactory; + use Notifiable; /** * The attributes that are mass assignable. diff --git a/composer.json b/composer.json index 77b7a5f..281fa5b 100644 --- a/composer.json +++ b/composer.json @@ -16,7 +16,9 @@ "mockery/mockery": "^1.6.11", "nunomaduro/collision": "^8.1.1", "phpunit/phpunit": "^11.1.2", - "spatie/laravel-ignition": "^2.5.2" + "spatie/laravel-ignition": "^2.5.2", + "squizlabs/php_codesniffer": "^3.9.1", + "phpstan/phpstan": "^1.10.67" }, "autoload": { "psr-4": { @@ -31,6 +33,8 @@ } }, "scripts": { + "phpcs": "phpcs", + "phpcbf": "phpcbf", "post-autoload-dump": [ "Illuminate\\Foundation\\ComposerScripts::postAutoloadDump", "@php artisan package:discover --ansi" diff --git a/composer.lock b/composer.lock index d075471..3808b4a 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": "1f8fdc2941dee6a933169ffd1d3f5268", + "content-hash": "a0edf589241e805d917c95a64e045a55", "packages": [ { "name": "brick/math", @@ -1929,16 +1929,16 @@ }, { "name": "nesbot/carbon", - "version": "3.2.4", + "version": "3.3.0", "source": { "type": "git", "url": "https://github.com/briannesbitt/Carbon.git", - "reference": "82c28278c1c8f7b82dcdab25692237f052ffc8d8" + "reference": "7219739c4e01d4680c980545821733b6ed8ee880" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/82c28278c1c8f7b82dcdab25692237f052ffc8d8", - "reference": "82c28278c1c8f7b82dcdab25692237f052ffc8d8", + "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/7219739c4e01d4680c980545821733b6ed8ee880", + "reference": "7219739c4e01d4680c980545821733b6ed8ee880", "shasum": "" }, "require": { @@ -2031,7 +2031,7 @@ "type": "tidelift" } ], - "time": "2024-04-05T09:58:10+00:00" + "time": "2024-04-18T16:35:06+00:00" }, { "name": "nette/schema", @@ -6357,6 +6357,64 @@ }, "time": "2022-02-21T01:04:05+00:00" }, + { + "name": "phpstan/phpstan", + "version": "1.10.67", + "source": { + "type": "git", + "url": "https://github.com/phpstan/phpstan.git", + "reference": "16ddbe776f10da6a95ebd25de7c1dbed397dc493" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/16ddbe776f10da6a95ebd25de7c1dbed397dc493", + "reference": "16ddbe776f10da6a95ebd25de7c1dbed397dc493", + "shasum": "" + }, + "require": { + "php": "^7.2|^8.0" + }, + "conflict": { + "phpstan/phpstan-shim": "*" + }, + "bin": [ + "phpstan", + "phpstan.phar" + ], + "type": "library", + "autoload": { + "files": [ + "bootstrap.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "PHPStan - PHP Static Analysis Tool", + "keywords": [ + "dev", + "static analysis" + ], + "support": { + "docs": "https://phpstan.org/user-guide/getting-started", + "forum": "https://github.com/phpstan/phpstan/discussions", + "issues": "https://github.com/phpstan/phpstan/issues", + "security": "https://github.com/phpstan/phpstan/security/policy", + "source": "https://github.com/phpstan/phpstan-src" + }, + "funding": [ + { + "url": "https://github.com/ondrejmirtes", + "type": "github" + }, + { + "url": "https://github.com/phpstan", + "type": "github" + } + ], + "time": "2024-04-16T07:22:02+00:00" + }, { "name": "phpunit/php-code-coverage", "version": "11.0.3", @@ -8009,6 +8067,86 @@ ], "time": "2024-04-16T08:57:16+00:00" }, + { + "name": "squizlabs/php_codesniffer", + "version": "3.9.1", + "source": { + "type": "git", + "url": "https://github.com/PHPCSStandards/PHP_CodeSniffer.git", + "reference": "267a4405fff1d9c847134db3a3c92f1ab7f77909" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/PHPCSStandards/PHP_CodeSniffer/zipball/267a4405fff1d9c847134db3a3c92f1ab7f77909", + "reference": "267a4405fff1d9c847134db3a3c92f1ab7f77909", + "shasum": "" + }, + "require": { + "ext-simplexml": "*", + "ext-tokenizer": "*", + "ext-xmlwriter": "*", + "php": ">=5.4.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0 || ^8.0 || ^9.3.4" + }, + "bin": [ + "bin/phpcbf", + "bin/phpcs" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.x-dev" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Greg Sherwood", + "role": "Former lead" + }, + { + "name": "Juliette Reinders Folmer", + "role": "Current lead" + }, + { + "name": "Contributors", + "homepage": "https://github.com/PHPCSStandards/PHP_CodeSniffer/graphs/contributors" + } + ], + "description": "PHP_CodeSniffer tokenizes PHP, JavaScript and CSS files and detects violations of a defined set of coding standards.", + "homepage": "https://github.com/PHPCSStandards/PHP_CodeSniffer", + "keywords": [ + "phpcs", + "standards", + "static analysis" + ], + "support": { + "issues": "https://github.com/PHPCSStandards/PHP_CodeSniffer/issues", + "security": "https://github.com/PHPCSStandards/PHP_CodeSniffer/security/policy", + "source": "https://github.com/PHPCSStandards/PHP_CodeSniffer", + "wiki": "https://github.com/PHPCSStandards/PHP_CodeSniffer/wiki" + }, + "funding": [ + { + "url": "https://github.com/PHPCSStandards", + "type": "github" + }, + { + "url": "https://github.com/jrfnl", + "type": "github" + }, + { + "url": "https://opencollective.com/php_codesniffer", + "type": "open_collective" + } + ], + "time": "2024-03-31T21:03:09+00:00" + }, { "name": "symfony/yaml", "version": "v7.0.3", diff --git a/tests/Feature/ExampleTest.php b/tests/Feature/ExampleTest.php index 8364a84..b8ab24a 100644 --- a/tests/Feature/ExampleTest.php +++ b/tests/Feature/ExampleTest.php @@ -10,7 +10,7 @@ class ExampleTest extends TestCase /** * A basic test example. */ - public function test_the_application_returns_a_successful_response(): void + public function testTheApplicationReturnsASuccessfulResponse(): void { $response = $this->get('/'); diff --git a/tests/Unit/ExampleTest.php b/tests/Unit/ExampleTest.php index 5773b0c..b5da561 100644 --- a/tests/Unit/ExampleTest.php +++ b/tests/Unit/ExampleTest.php @@ -9,7 +9,7 @@ class ExampleTest extends TestCase /** * A basic test example. */ - public function test_that_true_is_true(): void + public function testThatTrueIsTrue(): void { $this->assertTrue(true); }