From 3d8c526b14d1660c126081636bfb8e4d9fac58f4 Mon Sep 17 00:00:00 2001 From: marco76tv Date: Fri, 19 Jan 2024 10:04:17 +0000 Subject: [PATCH] Lint --- .../Database/Seeders/UIDatabaseSeederTest.php | 12 +++----- Tests/Unit/Filament/Blocks/ImageTest.php | 16 ++++------- Tests/Unit/Filament/Blocks/ParagraphTest.php | 12 +++----- Tests/Unit/Filament/Blocks/TitleTest.php | 12 +++----- .../Forms/Components/ParentSelectTest.php | 13 +++------ .../Pages/Concerns/HandlesTreeBuilderTest.php | 28 ++++++++----------- .../Tables/Columns/GroupColumnTest.php | 14 ++++------ .../Filament/AdminPanelProviderTest.php | 12 +++----- .../Unit/Providers/UIServiceProviderTest.php | 14 ++++------ Tests/Unit/Services/UIServiceTest.php | 12 +++----- Tests/Unit/View/Components/BreadLinkTest.php | 13 +++------ Tests/Unit/View/Components/NavbarTest.php | 10 ++----- .../Unit/View/Components/Render/BlockTest.php | 18 ++++-------- .../View/Components/Render/BlocksTest.php | 18 ++++-------- Tests/Unit/View/Components/StdTest.php | 13 +++------ Tests/Unit/View/Components/SvgTest.php | 13 +++------ .../Unit/View/Composers/ThemeComposerTest.php | 16 ++++------- .../docs/listeners/GenerateSitemapTest.php | 17 ++++------- 18 files changed, 89 insertions(+), 174 deletions(-) diff --git a/Tests/Unit/Database/Seeders/UIDatabaseSeederTest.php b/Tests/Unit/Database/Seeders/UIDatabaseSeederTest.php index cfd52b85..3c3b4f47 100644 --- a/Tests/Unit/Database/Seeders/UIDatabaseSeederTest.php +++ b/Tests/Unit/Database/Seeders/UIDatabaseSeederTest.php @@ -1,5 +1,7 @@ uIDatabaseSeeder = new UIDatabaseSeeder(); } - /** - * {@inheritdoc} - */ protected function tearDown(): void { parent::tearDown(); @@ -37,7 +33,7 @@ protected function tearDown(): void public function testRun(): void { - /** @todo This test is incomplete. */ + /* @todo This test is incomplete. */ self::markTestIncomplete(); } } diff --git a/Tests/Unit/Filament/Blocks/ImageTest.php b/Tests/Unit/Filament/Blocks/ImageTest.php index 678859ca..6751c7de 100644 --- a/Tests/Unit/Filament/Blocks/ImageTest.php +++ b/Tests/Unit/Filament/Blocks/ImageTest.php @@ -1,5 +1,7 @@ image = new Image(); } - /** - * {@inheritdoc} - */ protected function tearDown(): void { parent::tearDown(); @@ -37,19 +33,19 @@ protected function tearDown(): void public function testMake(): void { - /** @todo This test is incomplete. */ + /* @todo This test is incomplete. */ self::markTestIncomplete(); } public function testGetRatios(): void { - /** @todo This test is incomplete. */ + /* @todo This test is incomplete. */ self::markTestIncomplete(); } public function testGetRatioClass(): void { - /** @todo This test is incomplete. */ + /* @todo This test is incomplete. */ self::markTestIncomplete(); } } diff --git a/Tests/Unit/Filament/Blocks/ParagraphTest.php b/Tests/Unit/Filament/Blocks/ParagraphTest.php index 9e673f5e..2799705f 100644 --- a/Tests/Unit/Filament/Blocks/ParagraphTest.php +++ b/Tests/Unit/Filament/Blocks/ParagraphTest.php @@ -1,5 +1,7 @@ paragraph = new Paragraph(); } - /** - * {@inheritdoc} - */ protected function tearDown(): void { parent::tearDown(); @@ -37,7 +33,7 @@ protected function tearDown(): void public function testMake(): void { - /** @todo This test is incomplete. */ + /* @todo This test is incomplete. */ self::markTestIncomplete(); } } diff --git a/Tests/Unit/Filament/Blocks/TitleTest.php b/Tests/Unit/Filament/Blocks/TitleTest.php index 00dacfa6..e3ab2f69 100644 --- a/Tests/Unit/Filament/Blocks/TitleTest.php +++ b/Tests/Unit/Filament/Blocks/TitleTest.php @@ -1,5 +1,7 @@ title = new Title(); } - /** - * {@inheritdoc} - */ protected function tearDown(): void { parent::tearDown(); @@ -37,7 +33,7 @@ protected function tearDown(): void public function testMake(): void { - /** @todo This test is incomplete. */ + /* @todo This test is incomplete. */ self::markTestIncomplete(); } } diff --git a/Tests/Unit/Filament/Forms/Components/ParentSelectTest.php b/Tests/Unit/Filament/Forms/Components/ParentSelectTest.php index 4b47cd40..866033ad 100644 --- a/Tests/Unit/Filament/Forms/Components/ParentSelectTest.php +++ b/Tests/Unit/Filament/Forms/Components/ParentSelectTest.php @@ -1,9 +1,10 @@ parentSelect = new ParentSelect(); } - /** - * {@inheritdoc} - */ protected function tearDown(): void { parent::tearDown(); @@ -39,7 +34,7 @@ protected function tearDown(): void public function testGetOptionValueProperty(): void { $expected = '42'; - $property = (new ReflectionClass(ParentSelect::class)) + $property = (new \ReflectionClass(ParentSelect::class)) ->getProperty('optionValueProperty'); $property->setValue($this->parentSelect, $expected); self::assertSame($expected, $this->parentSelect->getOptionValueProperty()); diff --git a/Tests/Unit/Filament/Resources/TreeResource/Pages/Concerns/HandlesTreeBuilderTest.php b/Tests/Unit/Filament/Resources/TreeResource/Pages/Concerns/HandlesTreeBuilderTest.php index e96cc9c7..55f7c5f5 100644 --- a/Tests/Unit/Filament/Resources/TreeResource/Pages/Concerns/HandlesTreeBuilderTest.php +++ b/Tests/Unit/Filament/Resources/TreeResource/Pages/Concerns/HandlesTreeBuilderTest.php @@ -1,5 +1,7 @@ handlesTreeBuilder = $this->getMockBuilder(HandlesTreeBuilder::class) ->setConstructorArgs([]) ->getMockForTrait(); } - /** - * {@inheritdoc} - */ protected function tearDown(): void { parent::tearDown(); @@ -39,55 +35,55 @@ protected function tearDown(): void public function testSortNavigation(): void { - /** @todo This test is incomplete. */ + /* @todo This test is incomplete. */ self::markTestIncomplete(); } public function testAddChild(): void { - /** @todo This test is incomplete. */ + /* @todo This test is incomplete. */ self::markTestIncomplete(); } public function testRemoveItem(): void { - /** @todo This test is incomplete. */ + /* @todo This test is incomplete. */ self::markTestIncomplete(); } public function testDeleteItem(): void { - /** @todo This test is incomplete. */ + /* @todo This test is incomplete. */ self::markTestIncomplete(); } public function testEditItem(): void { - /** @todo This test is incomplete. */ + /* @todo This test is incomplete. */ self::markTestIncomplete(); } public function testCreateItem(): void { - /** @todo This test is incomplete. */ + /* @todo This test is incomplete. */ self::markTestIncomplete(); } public function testUpdateItem(): void { - /** @todo This test is incomplete. */ + /* @todo This test is incomplete. */ self::markTestIncomplete(); } public function testStoreChildItem(): void { - /** @todo This test is incomplete. */ + /* @todo This test is incomplete. */ self::markTestIncomplete(); } public function testStoreItem(): void { - /** @todo This test is incomplete. */ + /* @todo This test is incomplete. */ self::markTestIncomplete(); } } diff --git a/Tests/Unit/Filament/Tables/Columns/GroupColumnTest.php b/Tests/Unit/Filament/Tables/Columns/GroupColumnTest.php index f16d3784..caa47f0f 100644 --- a/Tests/Unit/Filament/Tables/Columns/GroupColumnTest.php +++ b/Tests/Unit/Filament/Tables/Columns/GroupColumnTest.php @@ -1,5 +1,7 @@ groupColumn = new GroupColumn(); } - /** - * {@inheritdoc} - */ protected function tearDown(): void { parent::tearDown(); @@ -37,13 +33,13 @@ protected function tearDown(): void public function testGetFields(): void { - /** @todo This test is incomplete. */ + /* @todo This test is incomplete. */ self::markTestIncomplete(); } public function testSchema(): void { - /** @todo This test is incomplete. */ + /* @todo This test is incomplete. */ self::markTestIncomplete(); } } diff --git a/Tests/Unit/Providers/Filament/AdminPanelProviderTest.php b/Tests/Unit/Providers/Filament/AdminPanelProviderTest.php index 2b0a17ff..fbd677dd 100644 --- a/Tests/Unit/Providers/Filament/AdminPanelProviderTest.php +++ b/Tests/Unit/Providers/Filament/AdminPanelProviderTest.php @@ -1,5 +1,7 @@ adminPanelProvider = new AdminPanelProvider(); } - /** - * {@inheritdoc} - */ protected function tearDown(): void { parent::tearDown(); @@ -37,7 +33,7 @@ protected function tearDown(): void public function testPanel(): void { - /** @todo This test is incomplete. */ + /* @todo This test is incomplete. */ self::markTestIncomplete(); } } diff --git a/Tests/Unit/Providers/UIServiceProviderTest.php b/Tests/Unit/Providers/UIServiceProviderTest.php index fc6fc337..daba8e94 100644 --- a/Tests/Unit/Providers/UIServiceProviderTest.php +++ b/Tests/Unit/Providers/UIServiceProviderTest.php @@ -1,5 +1,7 @@ uIServiceProvider = new UIServiceProvider(); } - /** - * {@inheritdoc} - */ protected function tearDown(): void { parent::tearDown(); @@ -37,13 +33,13 @@ protected function tearDown(): void public function testBootCallback(): void { - /** @todo This test is incomplete. */ + /* @todo This test is incomplete. */ self::markTestIncomplete(); } public function testRegisterCallback(): void { - /** @todo This test is incomplete. */ + /* @todo This test is incomplete. */ self::markTestIncomplete(); } } diff --git a/Tests/Unit/Services/UIServiceTest.php b/Tests/Unit/Services/UIServiceTest.php index cdc2f927..2cf4796c 100644 --- a/Tests/Unit/Services/UIServiceTest.php +++ b/Tests/Unit/Services/UIServiceTest.php @@ -1,5 +1,7 @@ uIService = new UIService(); } - /** - * {@inheritdoc} - */ protected function tearDown(): void { parent::tearDown(); @@ -37,7 +33,7 @@ protected function tearDown(): void public function testAsset(): void { - /** @todo This test is incomplete. */ + /* @todo This test is incomplete. */ self::markTestIncomplete(); } } diff --git a/Tests/Unit/View/Components/BreadLinkTest.php b/Tests/Unit/View/Components/BreadLinkTest.php index a06a1d82..cfb7fa82 100644 --- a/Tests/Unit/View/Components/BreadLinkTest.php +++ b/Tests/Unit/View/Components/BreadLinkTest.php @@ -1,5 +1,7 @@ breadLink = new BreadLink($this->tpl); } - /** - * {@inheritdoc} - */ protected function tearDown(): void { parent::tearDown(); - unset($this->breadLink); - unset($this->tpl); + unset($this->breadLink, $this->tpl); } public function testRender(): void { - /** @todo This test is incomplete. */ + /* @todo This test is incomplete. */ self::markTestIncomplete(); } } diff --git a/Tests/Unit/View/Components/NavbarTest.php b/Tests/Unit/View/Components/NavbarTest.php index 52b413f0..ecc16c40 100644 --- a/Tests/Unit/View/Components/NavbarTest.php +++ b/Tests/Unit/View/Components/NavbarTest.php @@ -1,5 +1,7 @@ navbar = new Navbar(); } - /** - * {@inheritdoc} - */ protected function tearDown(): void { parent::tearDown(); @@ -36,7 +32,7 @@ protected function tearDown(): void public function testRender(): void { - /** @todo This test is incomplete. */ + /* @todo This test is incomplete. */ self::markTestIncomplete(); } } diff --git a/Tests/Unit/View/Components/Render/BlockTest.php b/Tests/Unit/View/Components/Render/BlockTest.php index 46fb02e5..aef6c3cb 100644 --- a/Tests/Unit/View/Components/Render/BlockTest.php +++ b/Tests/Unit/View/Components/Render/BlockTest.php @@ -1,9 +1,10 @@ block = []; - $this->model = Mockery::mock(Model::class); + $this->model = \Mockery::mock(Model::class); $this->tpl = '42'; $this->block = new Block($this->block, $this->model, $this->tpl); } - /** - * {@inheritdoc} - */ protected function tearDown(): void { parent::tearDown(); - unset($this->block); - unset($this->block); - unset($this->model); - unset($this->tpl); + unset($this->block, $this->block, $this->model, $this->tpl); } public function testRender(): void { - /** @todo This test is incomplete. */ + /* @todo This test is incomplete. */ self::markTestIncomplete(); } } diff --git a/Tests/Unit/View/Components/Render/BlocksTest.php b/Tests/Unit/View/Components/Render/BlocksTest.php index 20ca4686..27a5afb0 100644 --- a/Tests/Unit/View/Components/Render/BlocksTest.php +++ b/Tests/Unit/View/Components/Render/BlocksTest.php @@ -1,9 +1,10 @@ blocks = []; - $this->model = Mockery::mock(Model::class); + $this->model = \Mockery::mock(Model::class); $this->tpl = '42'; $this->blocks = new Blocks($this->blocks, $this->model, $this->tpl); } - /** - * {@inheritdoc} - */ protected function tearDown(): void { parent::tearDown(); - unset($this->blocks); - unset($this->blocks); - unset($this->model); - unset($this->tpl); + unset($this->blocks, $this->blocks, $this->model, $this->tpl); } public function testRender(): void { - /** @todo This test is incomplete. */ + /* @todo This test is incomplete. */ self::markTestIncomplete(); } } diff --git a/Tests/Unit/View/Components/StdTest.php b/Tests/Unit/View/Components/StdTest.php index e48a4b8a..fb2728c1 100644 --- a/Tests/Unit/View/Components/StdTest.php +++ b/Tests/Unit/View/Components/StdTest.php @@ -1,5 +1,7 @@ std = new Std($this->tpl); } - /** - * {@inheritdoc} - */ protected function tearDown(): void { parent::tearDown(); - unset($this->std); - unset($this->tpl); + unset($this->std, $this->tpl); } public function testRender(): void { - /** @todo This test is incomplete. */ + /* @todo This test is incomplete. */ self::markTestIncomplete(); } } diff --git a/Tests/Unit/View/Components/SvgTest.php b/Tests/Unit/View/Components/SvgTest.php index 2291b2c7..cedccdda 100644 --- a/Tests/Unit/View/Components/SvgTest.php +++ b/Tests/Unit/View/Components/SvgTest.php @@ -1,5 +1,7 @@ svg = new Svg($this->tpl); } - /** - * {@inheritdoc} - */ protected function tearDown(): void { parent::tearDown(); - unset($this->svg); - unset($this->tpl); + unset($this->svg, $this->tpl); } public function testRender(): void { - /** @todo This test is incomplete. */ + /* @todo This test is incomplete. */ self::markTestIncomplete(); } } diff --git a/Tests/Unit/View/Composers/ThemeComposerTest.php b/Tests/Unit/View/Composers/ThemeComposerTest.php index 661eaa03..316ddc68 100644 --- a/Tests/Unit/View/Composers/ThemeComposerTest.php +++ b/Tests/Unit/View/Composers/ThemeComposerTest.php @@ -1,5 +1,7 @@ themeComposer = new ThemeComposer(); } - /** - * {@inheritdoc} - */ protected function tearDown(): void { parent::tearDown(); @@ -37,19 +33,19 @@ protected function tearDown(): void public function testMetatags(): void { - /** @todo This test is incomplete. */ + /* @todo This test is incomplete. */ self::markTestIncomplete(); } public function testMetatag(): void { - /** @todo This test is incomplete. */ + /* @todo This test is incomplete. */ self::markTestIncomplete(); } public function testShowScripts(): void { - /** @todo This test is incomplete. */ + /* @todo This test is incomplete. */ self::markTestIncomplete(); } } diff --git a/Tests/Unit/docs/listeners/GenerateSitemapTest.php b/Tests/Unit/docs/listeners/GenerateSitemapTest.php index 33d38de5..a687f632 100644 --- a/Tests/Unit/docs/listeners/GenerateSitemapTest.php +++ b/Tests/Unit/docs/listeners/GenerateSitemapTest.php @@ -1,9 +1,10 @@ generateSitemap = new GenerateSitemap(); } - /** - * {@inheritdoc} - */ protected function tearDown(): void { parent::tearDown(); @@ -39,15 +34,15 @@ protected function tearDown(): void public function testHandle(): void { - $jigsaw = Mockery::mock(Jigsaw::class); + $jigsaw = \Mockery::mock(Jigsaw::class); - /** @todo This test is incomplete. */ + /* @todo This test is incomplete. */ $this->generateSitemap->handle($jigsaw); } public function testIsExcluded(): void { - /** @todo This test is incomplete. */ + /* @todo This test is incomplete. */ self::markTestIncomplete(); } }