From 1fa93e577a17e5413053f2b6708f1744ac224c6e Mon Sep 17 00:00:00 2001 From: Kevin Frantz Date: Tue, 6 Nov 2018 20:08:28 +0100 Subject: [PATCH] Applied code formator --- application/src/Entity/Meta/Reciever.php | 1 - .../src/Entity/Meta/RecieverInterface.php | 3 +-- .../Attribut/CollectionAttributTest.php | 8 +++++--- .../Entity/Attribut/RecieverAttributTest.php | 20 ++++++++++--------- .../Subscriber/SourceMenuSubscriberTest.php | 15 ++++---------- 5 files changed, 21 insertions(+), 26 deletions(-) diff --git a/application/src/Entity/Meta/Reciever.php b/application/src/Entity/Meta/Reciever.php index 8b8115a..43f1aa5 100644 --- a/application/src/Entity/Meta/Reciever.php +++ b/application/src/Entity/Meta/Reciever.php @@ -4,7 +4,6 @@ namespace App\Entity\Meta; use Doctrine\Common\Collections\ArrayCollection; use Doctrine\ORM\Mapping as ORM; -use App\Entity\Attribut\MembersAttribut; use App\Entity\Source\SourceInterface; use App\Entity\Attribut\RightAttribut; use App\Entity\Attribut\CollectionAttribut; diff --git a/application/src/Entity/Meta/RecieverInterface.php b/application/src/Entity/Meta/RecieverInterface.php index a865221..24deb20 100644 --- a/application/src/Entity/Meta/RecieverInterface.php +++ b/application/src/Entity/Meta/RecieverInterface.php @@ -2,7 +2,6 @@ namespace App\Entity\Meta; -use App\Entity\Attribut\MembersAttributInterface; use App\Entity\Attribut\RightAttributInterface; use App\Entity\Attribut\CollectionAttributInterface; use App\Helper\DimensionHelperInterface; @@ -12,6 +11,6 @@ use App\Helper\DimensionHelperInterface; * * @author kevinfrantz */ -interface RecieverInterface extends MetaInterface, RightAttributInterface,CollectionAttributInterface,DimensionHelperInterface +interface RecieverInterface extends MetaInterface, RightAttributInterface, CollectionAttributInterface, DimensionHelperInterface { } diff --git a/application/tests/Unit/Entity/Attribut/CollectionAttributTest.php b/application/tests/Unit/Entity/Attribut/CollectionAttributTest.php index 52f39b3..d89f68a 100644 --- a/application/tests/Unit/Entity/Attribut/CollectionAttributTest.php +++ b/application/tests/Unit/Entity/Attribut/CollectionAttributTest.php @@ -33,9 +33,11 @@ class CollectionAttributTest extends TestCase $this->assertNull($this->collection->setCollection($collection)); $this->assertEquals($collection, $this->collection->getCollection()); } - - public function testAdd():void{ - $mock = new class{}; + + public function testAdd(): void + { + $mock = new class() { + }; $this->collection->setCollection(new ArrayCollection()); $this->assertTrue($this->collection->getCollection()->add($mock)); $this->assertEquals($mock, $this->collection->getCollection()->get(0)); diff --git a/application/tests/Unit/Entity/Attribut/RecieverAttributTest.php b/application/tests/Unit/Entity/Attribut/RecieverAttributTest.php index ce0dcde..7c644b9 100644 --- a/application/tests/Unit/Entity/Attribut/RecieverAttributTest.php +++ b/application/tests/Unit/Entity/Attribut/RecieverAttributTest.php @@ -1,4 +1,5 @@ reciever = new class implements RecieverAttributInterface{ + + public function setUp(): void + { + $this->reciever = new class() implements RecieverAttributInterface { use RecieverAttribut; }; } - - public function testConstructor():void{ + + public function testConstructor(): void + { $this->expectException(\TypeError::class); $this->reciever->getReciever(); } - - public function testAccessors():void{ + + public function testAccessors(): void + { $reciever = $this->createMock(RecieverInterface::class); $this->assertNull($this->reciever->setReciever($reciever)); $this->assertEquals($reciever, $this->reciever->getReciever()); } } - diff --git a/application/tests/Unit/Subscriber/SourceMenuSubscriberTest.php b/application/tests/Unit/Subscriber/SourceMenuSubscriberTest.php index 9466b26..f270bf4 100644 --- a/application/tests/Unit/Subscriber/SourceMenuSubscriberTest.php +++ b/application/tests/Unit/Subscriber/SourceMenuSubscriberTest.php @@ -1,14 +1,11 @@ subscriber = new SourceMenuSubscriber($translator); } - - public function testOnSourceMenuConfig():void{ + + public function testOnSourceMenuConfig(): void + { $factory = new MenuFactory(); $item = new MenuItem('test', $factory); $request = new Request(); @@ -40,6 +36,3 @@ class SourceMenuSubscriberTest extends TestCase $this->assertNull($this->subscriber->onSourceMenuConfigure($event)); } } - - -