From 35d3fbfffd130c81513ccd52d6595034c5384cf0 Mon Sep 17 00:00:00 2001 From: Oleksii Skorobogatko Date: Mon, 2 Jan 2023 12:09:18 +0200 Subject: [PATCH] set phpstan check level to 5 --- phpstan.neon.dist | 2 +- tests/TestCase.php | 3 +-- tests/Widgets/EntryTest.php | 6 +++--- tests/Widgets/TreeViewTest.php | 4 ++-- 4 files changed, 7 insertions(+), 8 deletions(-) diff --git a/phpstan.neon.dist b/phpstan.neon.dist index ce1dd40..3223525 100644 --- a/phpstan.neon.dist +++ b/phpstan.neon.dist @@ -1,5 +1,5 @@ parameters: - level: 4 + level: 5 paths: - src - tests diff --git a/tests/TestCase.php b/tests/TestCase.php index 73670bb..3d52126 100644 --- a/tests/TestCase.php +++ b/tests/TestCase.php @@ -7,7 +7,6 @@ use PHPUnit\Framework\TestCase as FrameworkTestCase; use Tkui\Application; use Tkui\Evaluator; -use Tkui\Widgets\Widget; use Tkui\Windows\Window; class TestCase extends FrameworkTestCase @@ -36,7 +35,7 @@ protected function createEvalMock() return $this->createMock(Evaluator::class); } - protected function createWindowStub(): Widget + protected function createWindowStub(): Window { /** @var Window|Stub $win */ $win = $this->createStub(Window::class); diff --git a/tests/Widgets/EntryTest.php b/tests/Widgets/EntryTest.php index 5f6bff3..d9d4a6e 100644 --- a/tests/Widgets/EntryTest.php +++ b/tests/Widgets/EntryTest.php @@ -7,13 +7,13 @@ use Tkui\Tests\TestCase; use Tkui\TclTk\Variable; use Tkui\Widgets\Entry; -use Tkui\Widgets\Widget; +use Tkui\Windows\Window; class EntryTest extends TestCase { - protected function createWindowStub(): Widget + protected function createWindowStub(): Window { - /** @var Widget|Stub $win */ + /** @var Window|Stub $win */ $win = parent::createWindowStub(); $var = $this->createStub(Variable::class); diff --git a/tests/Widgets/TreeViewTest.php b/tests/Widgets/TreeViewTest.php index 5da5b81..50eb3cf 100644 --- a/tests/Widgets/TreeViewTest.php +++ b/tests/Widgets/TreeViewTest.php @@ -30,7 +30,7 @@ public function treeview_created(): void /** @test */ public function treeview_can_add_item(): void { - $item = new Item([1,2,3]); + $item = new Item(['1', '2', '3']); $this->tclEvalTest(3, [ ['ttk::treeview', $this->checkWidget('.tv')], @@ -47,7 +47,7 @@ public function treeview_can_add_item(): void /** @test */ public function treeview_item_can_be_deleted(): void { - $item = new Item([1,2,3]); + $item = new Item(['1', '2', '3']); $this->tclEvalTest(4, [ ['ttk::treeview', $this->checkWidget('.tv')],