From f0127b3b647c9d38eee635d1777d8fe4722959a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Uzna=C5=84ski?= Date: Wed, 17 Nov 2021 13:14:43 +0100 Subject: [PATCH] [TASK] Fix php cs related to official configuration (#341) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Łukasz Uznański --- Classes/Controller/TeaController.php | 2 +- Classes/Domain/Model/Product/Tea.php | 2 +- .../Domain/Repository/Product/TeaRepositoryTest.php | 4 ++-- Tests/Unit/Controller/TeaControllerTest.php | 6 +++--- Tests/Unit/Domain/Model/Product/TeaTest.php | 2 +- Tests/Unit/Domain/Repository/Product/TeaRepositoryTest.php | 4 ++-- ext_emconf.php | 1 + ext_localconf.php | 1 + 8 files changed, 12 insertions(+), 10 deletions(-) diff --git a/Classes/Controller/TeaController.php b/Classes/Controller/TeaController.php index 7170f26..a4674f5 100644 --- a/Classes/Controller/TeaController.php +++ b/Classes/Controller/TeaController.php @@ -16,7 +16,7 @@ class TeaController extends ActionController /** * @var TeaRepository */ - private $teaRepository = null; + private $teaRepository; public function injectTeaRepository(TeaRepository $teaRepository): void { diff --git a/Classes/Domain/Model/Product/Tea.php b/Classes/Domain/Model/Product/Tea.php index 265c231..2a5fe4d 100644 --- a/Classes/Domain/Model/Product/Tea.php +++ b/Classes/Domain/Model/Product/Tea.php @@ -29,7 +29,7 @@ class Tea extends AbstractEntity * @var \TYPO3\CMS\Extbase\Domain\Model\FileReference|null * @Lazy */ - protected $image = null; + protected $image; public function getTitle(): string { diff --git a/Tests/Functional/Domain/Repository/Product/TeaRepositoryTest.php b/Tests/Functional/Domain/Repository/Product/TeaRepositoryTest.php index 819ed21..dc15799 100644 --- a/Tests/Functional/Domain/Repository/Product/TeaRepositoryTest.php +++ b/Tests/Functional/Domain/Repository/Product/TeaRepositoryTest.php @@ -25,12 +25,12 @@ class TeaRepositoryTest extends FunctionalTestCase /** * @var TeaRepository */ - private $subject = null; + private $subject; /** * @var PersistenceManager */ - private $persistenceManager = null; + private $persistenceManager; protected function setUp(): void { diff --git a/Tests/Unit/Controller/TeaControllerTest.php b/Tests/Unit/Controller/TeaControllerTest.php index e34575c..d2bd72c 100644 --- a/Tests/Unit/Controller/TeaControllerTest.php +++ b/Tests/Unit/Controller/TeaControllerTest.php @@ -22,17 +22,17 @@ class TeaControllerTest extends UnitTestCase /** * @var TeaController */ - private $subject = null; + private $subject; /** * @var ObjectProphecy */ - private $viewProphecy = null; + private $viewProphecy; /** * @var ObjectProphecy */ - private $teaRepositoryProphecy = null; + private $teaRepositoryProphecy; protected function setUp(): void { diff --git a/Tests/Unit/Domain/Model/Product/TeaTest.php b/Tests/Unit/Domain/Model/Product/TeaTest.php index c202853..fe75f15 100644 --- a/Tests/Unit/Domain/Model/Product/TeaTest.php +++ b/Tests/Unit/Domain/Model/Product/TeaTest.php @@ -17,7 +17,7 @@ class TeaTest extends UnitTestCase /** * @var Tea */ - private $subject = null; + private $subject; protected function setUp(): void { diff --git a/Tests/Unit/Domain/Repository/Product/TeaRepositoryTest.php b/Tests/Unit/Domain/Repository/Product/TeaRepositoryTest.php index df521ab..120d05e 100644 --- a/Tests/Unit/Domain/Repository/Product/TeaRepositoryTest.php +++ b/Tests/Unit/Domain/Repository/Product/TeaRepositoryTest.php @@ -18,12 +18,12 @@ class TeaRepositoryTest extends UnitTestCase /** * @var TeaRepository */ - private $subject = null; + private $subject; /** * @var ObjectManagerInterface&ProphecySubjectInterface */ - protected $objectManager = null; + protected $objectManager; protected function setUp(): void { diff --git a/ext_emconf.php b/ext_emconf.php index fc901e7..5ce5fb7 100644 --- a/ext_emconf.php +++ b/ext_emconf.php @@ -1,4 +1,5 @@ 'Tea example', 'description' => 'Example extension for unit testing and best practices', diff --git a/ext_localconf.php b/ext_localconf.php index ee60ac5..67b3c3b 100644 --- a/ext_localconf.php +++ b/ext_localconf.php @@ -1,4 +1,5 @@