From 5e6b8bccbe2e031736d3bd961124a89501b35c3e Mon Sep 17 00:00:00 2001 From: Kevin Frantz Date: Wed, 31 Oct 2018 14:38:31 +0100 Subject: [PATCH] Refactored function --- .../src/Entity/Source/Operation/AbstractOperation.php | 7 +------ application/src/Logic/Operation/OperationInterface.php | 6 +++--- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/application/src/Entity/Source/Operation/AbstractOperation.php b/application/src/Entity/Source/Operation/AbstractOperation.php index b981d07..0508dcb 100644 --- a/application/src/Entity/Source/Operation/AbstractOperation.php +++ b/application/src/Entity/Source/Operation/AbstractOperation.php @@ -18,7 +18,7 @@ use App\Exception\NotProcessedException; * @ORM\DiscriminatorColumn(name="discr", type="string") * @ORM\DiscriminatorMap({"and" = "AndOperation"}) */ -abstract class AbstractOperation extends AbstractSource implements OperandInterface +abstract class AbstractOperation extends AbstractSource implements OperationInterface { use OperandsAttribut; @@ -47,9 +47,4 @@ abstract class AbstractOperation extends AbstractSource implements OperandInterf } throw new NotProcessedException('No result was generated!'); } - - public function setOperators(ArrayCollection $operands): void - { - $this->operands = $operands; - } } diff --git a/application/src/Logic/Operation/OperationInterface.php b/application/src/Logic/Operation/OperationInterface.php index fdd4059..6fff202 100644 --- a/application/src/Logic/Operation/OperationInterface.php +++ b/application/src/Logic/Operation/OperationInterface.php @@ -2,7 +2,7 @@ namespace App\Logic\Operation; -use Doctrine\Common\Collections\ArrayCollection; +use Doctrine\Common\Collections\Collection; /** * @author kevinfrantz @@ -12,9 +12,9 @@ interface OperationInterface extends OperandInterface /** * Sets the Operators the operation has to deal with. * - * @param ArrayCollection $operands | OperandInterface[] + * @param Collection $operands | OperandInterface[] */ - public function setOperators(ArrayCollection $operands): void; + public function setOperands(Collection $operands): void; /** * Process the logic.