diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index d60fac4..1eede53 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -1,6 +1,21 @@ parameters: ignoreErrors: + - + message: "#^Method Orchestra\\\\Canvas\\\\Core\\\\Contracts\\\\GeneratesCodeListener\\:\\:codeAlreadyExists\\(\\) has no return type specified\\.$#" + count: 1 + path: src/Contracts/GeneratesCodeListener.php + + - + message: "#^Method Orchestra\\\\Canvas\\\\Core\\\\Contracts\\\\GeneratesCodeListener\\:\\:codeHasBeenGenerated\\(\\) has no return type specified\\.$#" + count: 1 + path: src/Contracts/GeneratesCodeListener.php + - message: "#^Call to an undefined method Illuminate\\\\Contracts\\\\Container\\\\Container\\:\\:basePath\\(\\)\\.$#" count: 1 path: src/LaravelServiceProvider.php + + - + message: "#^Method Orchestra\\\\Canvas\\\\Core\\\\Presets\\\\Preset\\:\\:config\\(\\) has no return type specified\\.$#" + count: 1 + path: src/Presets/Preset.php diff --git a/src/Presets/Preset.php b/src/Presets/Preset.php index ae1b851..c62a001 100644 --- a/src/Presets/Preset.php +++ b/src/Presets/Preset.php @@ -33,7 +33,6 @@ public function is(string $name): bool * Get configuration. * * @param mixed|null $default - * @return mixed */ public function config(?string $key = null, $default = null) { diff --git a/tests/Unit/Presets/LaravelTest.php b/tests/Unit/Presets/LaravelTest.php index 50f55c3..ae4bb50 100644 --- a/tests/Unit/Presets/LaravelTest.php +++ b/tests/Unit/Presets/LaravelTest.php @@ -4,7 +4,7 @@ use Illuminate\Filesystem\Filesystem; use Mockery as m; -use Orchestra\Canvas\Commands; +use Orchestra\Canvas\Core\Commands\Generators; use Orchestra\Canvas\Core\Presets\Laravel; use PHPUnit\Framework\TestCase; use Symfony\Component\Console\Application; @@ -79,14 +79,14 @@ public function it_can_configure_provider_namespace() public function it_can_add_additional_commands() { Laravel::commands([ - Commands\Code::class, + Generators\Code::class, ]); $app = m::mock(Application::class); $app->shouldReceive('add') ->once() - ->with(m::type(Commands\Code::class)) - ->andReturnUsing(fn ($generator) => $this->assertInstanceOf(Commands\Code::class, $generator)); + ->with(m::type(Generators\Code::class)) + ->andReturnUsing(fn ($generator) => $this->assertInstanceOf(Generators\Code::class, $generator)); $directory = __DIR__; $preset = new Laravel(['namespace' => 'App', 'provider' => ['namespace' => 'App']], $directory, new Filesystem()); diff --git a/tests/Unit/Presets/PackageTest.php b/tests/Unit/Presets/PackageTest.php index 57b2b08..38655e3 100644 --- a/tests/Unit/Presets/PackageTest.php +++ b/tests/Unit/Presets/PackageTest.php @@ -4,7 +4,7 @@ use Illuminate\Filesystem\Filesystem; use Mockery as m; -use Orchestra\Canvas\Commands; +use Orchestra\Canvas\Core\Commands\Generators; use Orchestra\Canvas\Core\Presets\Package; use PHPUnit\Framework\TestCase; use Symfony\Component\Console\Application; @@ -82,14 +82,14 @@ public function it_requires_root_namespace_to_be_configured() public function it_can_add_additional_commands() { Package::commands([ - Commands\Code::class, + Generators\Code::class, ]); $app = m::mock(Application::class); $app->shouldReceive('add') ->once() - ->with(m::type(Commands\Code::class)) - ->andReturnUsing(fn ($generator) => $this->assertInstanceOf(Commands\Code::class, $generator)); + ->with(m::type(Generators\Code::class)) + ->andReturnUsing(fn ($generator) => $this->assertInstanceOf(Generators\Code::class, $generator)); $directory = __DIR__; $preset = new Package(['namespace' => 'App', 'provider' => ['namespace' => 'App']], $directory, new Filesystem());