diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index 79a0b4d..4d3af11 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -1,5 +1,15 @@ parameters: ignoreErrors: + - + message: "#^Command \"somake\\:builder\" does not have option \"model\"\\.$#" + count: 2 + path: src/Commands/BuilderCommand.php + + - + message: "#^Left side of && is always false\\.$#" + count: 1 + path: src/Commands/BuilderCommand.php + - message: "#^Method Soyhuce\\\\Somake\\\\Commands\\\\BuilderCommand\\:\\:askModel\\(\\) should return class\\-string\\ but returns array\\|bool\\|string\\.$#" count: 1 @@ -16,7 +26,12 @@ parameters: path: src/Commands/BuilderCommand.php - - message: "#^Method Soyhuce\\\\Somake\\\\Commands\\\\FactoryCommand\\:\\:askModel\\(\\) should return class\\-string\\ but returns array\\|bool\\|string\\.$#" + message: "#^Left side of && is always true\\.$#" + count: 1 + path: src/Commands/FactoryCommand.php + + - + message: "#^Method Soyhuce\\\\Somake\\\\Commands\\\\FactoryCommand\\:\\:askModel\\(\\) should return class\\-string\\ but returns string\\.$#" count: 1 path: src/Commands/FactoryCommand.php @@ -30,6 +45,16 @@ parameters: count: 1 path: src/Commands/FactoryCommand.php + - + message: "#^Command \"somake\\:policy\" does not have option \"model\"\\.$#" + count: 2 + path: src/Commands/PolicyCommand.php + + - + message: "#^Left side of && is always false\\.$#" + count: 1 + path: src/Commands/PolicyCommand.php + - message: "#^Method Soyhuce\\\\Somake\\\\Commands\\\\PolicyCommand\\:\\:askModel\\(\\) should return class\\-string\\ but returns array\\|bool\\|string\\.$#" count: 1 @@ -60,6 +85,16 @@ parameters: count: 1 path: src/Commands/RequestCommand.php + - + message: "#^Command \"somake\\:resource\" does not have option \"model\"\\.$#" + count: 2 + path: src/Commands/ResourceCommand.php + + - + message: "#^Left side of && is always false\\.$#" + count: 1 + path: src/Commands/ResourceCommand.php + - message: "#^Method Soyhuce\\\\Somake\\\\Commands\\\\ResourceCommand\\:\\:askModel\\(\\) should return class\\-string\\ but returns array\\|bool\\|string\\.$#" count: 1 @@ -76,17 +111,17 @@ parameters: path: src/Commands/ResourceCommand.php - - message: "#^Method Soyhuce\\\\Somake\\\\Commands\\\\TestCommand\\:\\:askClass\\(\\) should return class\\-string but returns array\\|bool\\|string\\.$#" + message: "#^Left side of && is always true\\.$#" count: 1 path: src/Commands/TestCommand.php - - message: "#^Method Soyhuce\\\\Somake\\\\Commands\\\\TestCommand\\:\\:askClass\\(\\) should return class\\-string but returns string\\|null\\.$#" + message: "#^Method Soyhuce\\\\Somake\\\\Commands\\\\TestCommand\\:\\:askClass\\(\\) should return class\\-string but returns string\\.$#" count: 1 path: src/Commands/TestCommand.php - - message: "#^Method Soyhuce\\\\Somake\\\\Commands\\\\TestCommand\\:\\:askType\\(\\) should return string but returns array\\|bool\\|string\\|null\\.$#" + message: "#^Method Soyhuce\\\\Somake\\\\Commands\\\\TestCommand\\:\\:askClass\\(\\) should return class\\-string but returns string\\|null\\.$#" count: 1 path: src/Commands/TestCommand.php @@ -95,6 +130,11 @@ parameters: count: 1 path: src/Commands/TestCommand.php + - + message: "#^Method Soyhuce\\\\Somake\\\\Commands\\\\TestCommand\\:\\:askType\\(\\) should return string but returns string\\|null\\.$#" + count: 1 + path: src/Commands/TestCommand.php + - message: "#^Method Soyhuce\\\\Somake\\\\Commands\\\\TestCommand\\:\\:disambiguateClass\\(\\) should return string but returns array\\|string\\.$#" count: 1 diff --git a/resources/stubs/migration.create.stub b/resources/stubs/migration.create.stub index 99f8013..7d06618 100755 --- a/resources/stubs/migration.create.stub +++ b/resources/stubs/migration.create.stub @@ -13,9 +13,4 @@ return new class extends Migration $table->timestamps(); }); } - - public function down(): void - { - Schema::dropIfExists('{{ table }}'); - } }; diff --git a/resources/stubs/migration.stub b/resources/stubs/migration.stub index 8e234cc..85519a0 100755 --- a/resources/stubs/migration.stub +++ b/resources/stubs/migration.stub @@ -10,9 +10,4 @@ return new class extends Migration { // } - - public function down(): void - { - // - } }; diff --git a/resources/stubs/migration.update.stub b/resources/stubs/migration.update.stub index bf44063..033539f 100755 --- a/resources/stubs/migration.update.stub +++ b/resources/stubs/migration.update.stub @@ -12,11 +12,4 @@ return new class extends Migration // }); } - - public function down(): void - { - Schema::table('{{ table }}', function (Blueprint $table) { - // - }); - } }; diff --git a/tests/__snapshots__/files/MigrationCommandTest__it_creates_the_migration_correctly__1.php b/tests/__snapshots__/files/MigrationCommandTest__it_creates_the_migration_correctly__1.php index 6ad81c4..d4fa3a4 100644 --- a/tests/__snapshots__/files/MigrationCommandTest__it_creates_the_migration_correctly__1.php +++ b/tests/__snapshots__/files/MigrationCommandTest__it_creates_the_migration_correctly__1.php @@ -13,9 +13,4 @@ public function up(): void $table->timestamps(); }); } - - public function down(): void - { - Schema::dropIfExists('tests'); - } };