Code optimation by PHP-Code Sniffer

This commit is contained in:
Kevin Veen-Birkenbach 2020-04-02 21:13:35 +02:00
parent 725ca5b149
commit ac5a3f1d5a
314 changed files with 665 additions and 1688 deletions

View File

@ -18,8 +18,6 @@ trait ActionTypeAttribut
protected $actionType;
/**
* @param string $actionType
*
* @throws InvalidChoiceTypeException
*/
public function setActionType(string $actionType): void
@ -30,9 +28,6 @@ trait ActionTypeAttribut
$this->actionType = $actionType;
}
/**
* @return string
*/
public function getActionType(): string
{
return $this->actionType;

View File

@ -13,15 +13,11 @@ interface ActionTypeAttributInterface
{
/**
* @see ActionType
*
* @param string $actionType
*/
public function setActionType(string $actionType): void;
/**
* @see ActionType
*
* @return string
*/
public function getActionType(): string;
}

View File

@ -16,9 +16,6 @@ trait ClassAttribut
*/
private $class;
/**
* @param string $class
*/
public function setClass(string $class): void
{
if (class_exists($class)) {
@ -29,17 +26,11 @@ trait ClassAttribut
throw new NotFoundHttpException('Class '.$class.' couldn\'t be found!');
}
/**
* @return string
*/
public function getClass(): string
{
return $this->class;
}
/**
* @return bool
*/
public function hasClass(): bool
{
return isset($this->class);

View File

@ -9,14 +9,8 @@ interface ClassAttributInterface
{
const CLASS_ATTRIBUT_NAME = 'class';
/**
* @param string $class
*/
public function setClass(string $class): void;
/**
* @return string
*/
public function getClass(): string;
/**

View File

@ -11,17 +11,11 @@ trait CollectionAttribut
*/
protected $collection;
/**
* @return Collection
*/
public function getCollection(): Collection
{
return $this->collection;
}
/**
* @param Collection $collection
*/
public function setCollection(Collection $collection): void
{
$this->collection = $collection;

View File

@ -16,17 +16,11 @@ trait CreatorRelationAttribut
*/
protected $creatorRelation;
/**
* @param CreatorRelationInterface $creatorRelation
*/
public function setCreatorRelation(CreatorRelationInterface $creatorRelation)
{
$this->creatorRelation = $creatorRelation;
}
/**
* @return CreatorRelationInterface
*/
public function getCreatorRelation(): CreatorRelationInterface
{
return $this->creatorRelation;

View File

@ -11,13 +11,7 @@ interface CreatorRelationAttributInterface
{
const CREATORRELATION_ATTRIBUT_NAME = 'creatorRelation';
/**
* @param CreatorRelationInterface $creatorRelation
*/
public function setCreatorRelation(CreatorRelationInterface $creatorRelation);
/**
* @return CreatorRelationInterface
*/
public function getCreatorRelation(): CreatorRelationInterface;
}

View File

@ -19,9 +19,6 @@ trait CrudAttribut
*/
protected $crud;
/**
* @param string $crud
*/
public function setCrud(string $crud): void
{
if (!in_array($crud, CRUDType::getValues())) {
@ -30,9 +27,6 @@ trait CrudAttribut
$this->crud = $crud;
}
/**
* @return string
*/
public function getCrud(): string
{
return $this->crud;

View File

@ -14,17 +14,11 @@ trait GrantAttribut
*/
protected $grant;
/**
* @param bool $grant
*/
public function setGrant(bool $grant): void
{
$this->grant = $grant;
}
/**
* @return bool
*/
public function getGrant(): bool
{
return $this->grant;

View File

@ -12,13 +12,7 @@ interface GrantAttributInterface
*/
const GRANT_ATTRIBUT_NAME = 'grant';
/**
* @param bool $grant
*/
public function setGrant(bool $grant): void;
/**
* @return bool
*/
public function getGrant(): bool;
}

View File

@ -14,25 +14,16 @@ trait IdAttribut
*/
protected $id;
/**
* @param int $id
*/
public function setId(int $id): void
{
$this->id = $id;
}
/**
* @return int|null
*/
public function getId(): ?int
{
return $this->id;
}
/**
* @return bool
*/
public function hasId(): bool
{
return isset($this->id);

View File

@ -9,9 +9,6 @@ interface IdAttributInterface
{
const ID_ATTRIBUT_NAME = 'id';
/**
* @param int $id
*/
public function setId(int $id): void;
/**
@ -19,8 +16,6 @@ interface IdAttributInterface
* Use instead:.
*
* @see self::hasId()
*
* @return int|null
*/
public function getId(): ?int;

View File

@ -16,17 +16,11 @@ trait LawAttribut
*/
protected $law;
/**
* @param LawInterface $law
*/
public function setLaw(LawInterface $law): void
{
$this->law = $law;
}
/**
* @return LawInterface
*/
public function getLaw(): LawInterface
{
return $this->law;

View File

@ -20,8 +20,6 @@ trait LayerAttribut
protected $layer;
/**
* @param string $layer
*
* @throws InvalidChoiceTypeException
*/
public function setLayer(string $layer): void
@ -32,9 +30,6 @@ trait LayerAttribut
$this->layer = $layer;
}
/**
* @return string
*/
public function getLayer(): string
{
return $this->layer;

View File

@ -7,13 +7,7 @@ namespace Infinito\Attribut;
*/
interface LayerAttributInterface
{
/**
* @param string $layer
*/
public function setLayer(string $layer): void;
/**
* @return string
*/
public function getLayer(): string;
}

View File

@ -16,17 +16,11 @@ trait LayerRepositoryFactoryServiceAttribut
*/
protected $layerRepositoryFactoryService;
/**
* @param LayerRepositoryFactoryServiceInterface $layerRepositoryFactoryService
*/
public function setLayerRepositoryFactoryService(LayerRepositoryFactoryServiceInterface $layerRepositoryFactoryService): void
{
$this->layerRepositoryFactoryService = $layerRepositoryFactoryService;
}
/**
* @return LayerRepositoryFactoryServiceInterface
*/
public function getLayerRepositoryFactoryService(): LayerRepositoryFactoryServiceInterface
{
return $this->layerRepositoryFactoryService;

View File

@ -9,13 +9,7 @@ use Infinito\Domain\Repository\LayerRepositoryFactoryServiceInterface;
*/
interface LayerRepositoryFactoryServiceAttributInterface
{
/**
* @param LayerRepositoryFactoryServiceInterface $layerRepositoryFactoryService
*/
public function setLayerRepositoryFactoryService(LayerRepositoryFactoryServiceInterface $layerRepositoryFactoryService): void;
/**
* @return LayerRepositoryFactoryServiceInterface
*/
public function getLayerRepositoryFactoryService(): LayerRepositoryFactoryServiceInterface;
}

View File

@ -24,17 +24,11 @@ trait RecieverAttribut
$this->reciever = $reciever;
}
/**
* @return SourceInterface
*/
public function getReciever(): SourceInterface
{
return $this->reciever;
}
/**
* @return bool
*/
public function hasReciever(): bool
{
return isset($this->reciever);

View File

@ -14,9 +14,6 @@ interface RecieverAttributInterface
*/
public function setReciever(?SourceInterface $reciever): void;
/**
* @return SourceInterface
*/
public function getReciever(): SourceInterface;
/**

View File

@ -17,8 +17,6 @@ trait RelationAttribut
protected $relation;
/**
* @param RelationInterface $relation
*
* @see RelationAttributInterface
*/
public function setRelation(RelationInterface $relation): void
@ -28,8 +26,6 @@ trait RelationAttribut
/**
* @see RelationAttributInterface
*
* @return RelationInterface
*/
public function getRelation(): RelationInterface
{

View File

@ -9,13 +9,7 @@ use Infinito\Entity\Meta\Relation\RelationInterface;
*/
interface RelationAttributInterface
{
/**
* @param RelationInterface $relation
*/
public function setRelation(RelationInterface $relation): void;
/**
* @return RelationInterface
*/
public function getRelation(): RelationInterface;
}

View File

@ -16,17 +16,11 @@ trait RequestAttribut
*/
protected $request;
/**
* @param Request $request
*/
public function setRequest(Request $request): void
{
$this->request = $request;
}
/**
* @return Request
*/
public function getRequest(): Request
{
return $this->request;

View File

@ -9,13 +9,7 @@ use Symfony\Component\HttpFoundation\Request;
*/
interface RequestAttributInterface
{
/**
* @param Request $request
*/
public function setRequest(Request $request): void;
/**
* @return Request
*/
public function getRequest(): Request;
}

View File

@ -16,25 +16,16 @@ trait RequestedEntityAttribut
*/
private $requestedEntity;
/**
* @return RequestedEntityInterface
*/
public function getRequestedEntity(): RequestedEntityInterface
{
return $this->requestedEntity;
}
/**
* @param RequestedEntityInterface $requestedEntity
*/
public function setRequestedEntity(RequestedEntityInterface $requestedEntity): void
{
$this->requestedEntity = $requestedEntity;
}
/**
* @return bool
*/
public function hasRequestedEntity(): bool
{
return isset($this->requestedEntity);

View File

@ -9,18 +9,9 @@ use Infinito\Domain\Request\Entity\RequestedEntityInterface;
*/
interface RequestedEntityAttributInterface
{
/**
* @return bool
*/
public function hasRequestedEntity(): bool;
/**
* @return RequestedEntityInterface
*/
public function getRequestedEntity(): RequestedEntityInterface;
/**
* @param RequestedEntityInterface $requestedEntity
*/
public function setRequestedEntity(RequestedEntityInterface $requestedEntity): void;
}

View File

@ -16,25 +16,16 @@ trait RequestedRightAttribut
*/
protected $requestedRight;
/**
* @param RequestedRightInterface $requestedRight
*/
public function setRequestedRight(RequestedRightInterface $requestedRight): void
{
$this->requestedRight = $requestedRight;
}
/**
* @return bool
*/
public function hasRequestedRight(): bool
{
return isset($this->requestedRight);
}
/**
* @return RequestedRightInterface
*/
public function getRequestedRight(): RequestedRightInterface
{
return $this->requestedRight;

View File

@ -9,18 +9,9 @@ use Infinito\Domain\Request\Right\RequestedRightInterface;
*/
interface RequestedRightAttributInterface
{
/**
* @return bool
*/
public function hasRequestedRight(): bool;
/**
* @param RequestedRightInterface $requestedRight
*/
public function setRequestedRight(RequestedRightInterface $requestedRight): void;
/**
* @return RequestedRightInterface
*/
public function getRequestedRight(): RequestedRightInterface;
}

View File

@ -19,8 +19,6 @@ trait SlugAttribut
/**
* @todo Maybe throw an other Exception here?
*
* @param string $slug
*
* @throws ValueInvalidException
*/
public function setSlug(string $slug): void
@ -31,17 +29,11 @@ trait SlugAttribut
$this->slug = $slug;
}
/**
* @return string|null
*/
public function getSlug(): ?string
{
return $this->slug;
}
/**
* @return bool
*/
public function hasSlug(): bool
{
return isset($this->slug);

View File

@ -9,9 +9,6 @@ interface SlugAttributInterface
{
const SLUG_ATTRIBUT_NAME = 'slug';
/**
* @param string $slug
*/
public function setSlug(string $slug): void;
/**
@ -19,8 +16,6 @@ interface SlugAttributInterface
* Use instead:.
*
* @see self::hasSlug()
*
* @return string|null
*/
public function getSlug(): ?string;

View File

@ -16,17 +16,11 @@ trait SourceAttribut
*/
protected $source;
/**
* @return SourceInterface
*/
public function getSource(): SourceInterface
{
return $this->source;
}
/**
* @param SourceInterface $source
*/
public function setSource(SourceInterface $source): void
{
$this->source = $source;

View File

@ -14,13 +14,7 @@ interface SourceAttributInterface
*/
const SOURCE_ATTRIBUT_NAME = 'source';
/**
* @return SourceInterface
*/
public function getSource(): SourceInterface;
/**
* @param SourceInterface $source
*/
public function setSource(SourceInterface $source): void;
}

View File

@ -14,17 +14,11 @@ trait TextAttribut
*/
protected $text;
/**
* @return string
*/
public function getText(): string
{
return $this->text;
}
/**
* @param string $text
*/
public function setText(string $text): void
{
$this->text = $text;

View File

@ -27,9 +27,6 @@ trait TimestampAttribut
$this->timestamp = $timestamp;
}
/**
* @return \DateTime
*/
public function getTimestamp(): \DateTime
{
return $this->timestamp;

View File

@ -17,8 +17,5 @@ interface TimestampAttributInterface
*/
public function setTimestamp(\DateTime $timestamp): void;
/**
* @return \DateTime
*/
public function getTimestamp(): \DateTime;
}

View File

@ -17,25 +17,16 @@ trait UserAttribut
*/
protected $user;
/**
* @param UserInterface $user
*/
public function setUser(UserInterface $user): void
{
$this->user = $user;
}
/**
* @return UserInterface
*/
public function getUser(): UserInterface
{
return $this->user;
}
/**
* @return bool
*/
public function hasUser(): bool
{
return isset($this->user);

View File

@ -14,14 +14,8 @@ interface UserAttributInterface
*/
public const USER_ATTRIBUT_NAME = 'user';
/**
* @param UserInterface $user
*/
public function setUser(UserInterface $user): void;
/**
* @return UserInterface
*/
public function getUser(): UserInterface;
/**

View File

@ -14,17 +14,11 @@ trait VersionAttribut
*/
protected $version;
/**
* @param int $version
*/
public function setVersion(int $version): void
{
$this->version = $version;
}
/**
* @return int
*/
public function getVersion(): int
{
return $this->version;

View File

@ -19,15 +19,11 @@ interface VersionAttributInterface
/**
* Returns the revision version of the entity.
*
* @return int
*/
public function getVersion(): int;
/**
* Sets the revision version of the entity.
*
* @param int $version
*/
public function setVersion(int $version): void;
}

View File

@ -2,14 +2,14 @@
namespace Infinito\Controller\API\Rest;
use Infinito\Attribut\ClassAttributInterface;
use Infinito\Controller\API\AbstractAPIController;
use Infinito\DBAL\Types\ActionType;
use Infinito\Domain\Core\CoreServiceInterface;
use Infinito\Domain\Request\Action\RequestedActionServiceInterface;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Annotation\Route;
use Symfony\Component\HttpFoundation\Request;
use Infinito\Controller\API\AbstractAPIController;
use Infinito\Domain\Request\Action\RequestedActionServiceInterface;
use Infinito\Domain\Core\CoreServiceInterface;
use Infinito\DBAL\Types\ActionType;
use Infinito\Attribut\ClassAttributInterface;
/**
* @author kevinfrantz

View File

@ -2,11 +2,11 @@
namespace Infinito\Controller;
use Symfony\Component\Routing\Annotation\Route;
use Symfony\Component\HttpFoundation\Response;
use Infinito\Domain\Fixture\FixtureSource\HomepageFixtureSource;
use Infinito\DBAL\Types\Meta\Right\LayerType;
use Infinito\DBAL\Types\RESTResponseType;
use Infinito\Domain\Fixture\FixtureSource\HomepageFixtureSource;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Annotation\Route;
/**
* This controller offers the standart routes for the template.

View File

@ -2,9 +2,9 @@
namespace Infinito\Controller;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpFoundation\RedirectResponse;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Annotation\Route;
/**

View File

@ -4,11 +4,11 @@ namespace Infinito\DataFixtures;
use Doctrine\Bundle\FixturesBundle\Fixture;
use Doctrine\Common\Persistence\ObjectManager;
use Infinito\Entity\User;
use FOS\UserBundle\Doctrine\UserManager;
use Infinito\Entity\User;
use Infinito\Entity\UserInterface;
use Symfony\Component\DependencyInjection\ContainerInterface;
use Symfony\Component\DependencyInjection\ContainerAwareInterface;
use Symfony\Component\DependencyInjection\ContainerInterface;
/**
* Never execute this fixture on a livesystem!

View File

@ -3,22 +3,16 @@
namespace Infinito\Domain\Action;
use Infinito\Entity\EntityInterface;
use Infinito\Exception\Validation\FormInvalidException;
use Infinito\Exception\Permission\NoPermissionException;
use Infinito\Exception\Validation\FormInvalidException;
/**
* @author kevinfrantz
*/
abstract class AbstractAction extends AbstractActionConstructor implements ActionInterface
{
/**
* @return bool
*/
abstract protected function isSecure(): bool;
/**
* @return bool
*/
abstract protected function isValid(): bool;
/**

View File

@ -15,9 +15,6 @@ abstract class AbstractActionConstructor
*/
protected $actionService;
/**
* @param ActionDependenciesDAOServiceInterface $actionService
*/
final public function __construct(ActionDependenciesDAOServiceInterface $actionService)
{
$this->actionService = $actionService;

View File

@ -2,16 +2,16 @@
namespace Infinito\Domain\Action;
use Infinito\Domain\Request\Action\RequestedActionInterface;
use Infinito\Domain\Repository\LayerRepositoryFactoryServiceInterface;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\RequestStack;
use Infinito\Repository\RepositoryInterface;
use Symfony\Component\Form\FormBuilderInterface;
use Doctrine\ORM\EntityManagerInterface;
use Infinito\Domain\Form\RequestedActionFormBuilderServiceInterface;
use Infinito\Domain\Repository\LayerRepositoryFactoryServiceInterface;
use Infinito\Domain\Request\Action\RequestedActionInterface;
use Infinito\Domain\Request\Action\RequestedActionServiceInterface;
use Infinito\Domain\Secure\SecureRequestedRightCheckerServiceInterface;
use Infinito\Repository\RepositoryInterface;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\RequestStack;
/**
* @author kevinfrantz
@ -81,9 +81,6 @@ final class ActionDependenciesDAOService implements ActionDependenciesDAOService
return $this->secureRequestedRightCheckerService->check($this->requestedAction);
}
/**
* @return FormBuilderInterface
*/
public function getCurrentFormBuilder(): FormBuilderInterface
{
return $this->requestedActionFormBuilderService->createByService();

View File

@ -2,11 +2,11 @@
namespace Infinito\Domain\Action;
use Doctrine\ORM\EntityManagerInterface;
use Infinito\Domain\Request\Action\RequestedActionInterface;
use Symfony\Component\HttpFoundation\Request;
use Infinito\Repository\RepositoryInterface;
use Symfony\Component\Form\FormBuilderInterface;
use Doctrine\ORM\EntityManagerInterface;
use Symfony\Component\HttpFoundation\Request;
/**
* This interface offers all classes for managing an Action.
@ -25,23 +25,11 @@ interface ActionDependenciesDAOServiceInterface
*/
public function isRequestedActionSecure(): bool;
/**
* @return Request
*/
public function getRequest(): Request;
/**
* @return RepositoryInterface
*/
public function getRepository(): RepositoryInterface;
/**
* @return FormBuilderInterface
*/
public function getCurrentFormBuilder(): FormBuilderInterface;
/**
* @return EntityManagerInterface
*/
public function getEntityManager(): EntityManagerInterface;
}

View File

@ -19,41 +19,21 @@ final class ActionFactoryService extends AbstractActionConstructor implements Ac
*/
private const CLASS_SUFFIX = 'Action';
/**
* @param string $name
*
* @return string
*/
private function ucfirst(string $name): string
{
return ucfirst(strtolower($name));
}
/**
* @param string $action
* @param string $layer
*
* @return string
*/
private function getClassName(string $action, string $layer = ''): string
{
return $this->ucfirst($action).$this->ucfirst($layer).self::CLASS_SUFFIX;
}
/**
* @param string $layer
* @param string $action
*
* @return string
*/
private function getActionNamespace(string $action, string $layer = ''): string
{
return self::BASE_NAMESPACE.$this->ucfirst($action).'\\'.$this->getClassName($action, $layer);
}
/**
* @return string
*/
private function generateFullClassName(): string
{
$requestedAction = $this->actionService->getRequestedAction();

View File

@ -9,8 +9,5 @@ namespace Infinito\Domain\Action;
*/
interface ActionFactoryServiceInterface
{
/**
* @return ActionInterface
*/
public function create(): ActionInterface;
}

View File

@ -14,9 +14,6 @@ final class ActionHandlerService implements ActionHandlerServiceInterface
*/
private $actionFactoryService;
/**
* @param ActionFactoryServiceInterface $actionFactoryService
*/
public function __construct(ActionFactoryServiceInterface $actionFactoryService)
{
$this->actionFactoryService = $actionFactoryService;

View File

@ -13,8 +13,6 @@ interface ActionHandlerServiceInterface
* Process an action an returns the results.
*
* @todo Implement that also results can be returned
*
* @return EntityInterface|null
*/
public function handle(): ?EntityInterface;
}

View File

@ -13,8 +13,6 @@ interface ActionInterface
* Executes the action.
*
* @todo Implement that also results can be returned
*
* @return EntityInterface|null
*/
public function execute(): ?EntityInterface;
}

View File

@ -2,10 +2,10 @@
namespace Infinito\Domain\Action\Create;
use Infinito\Domain\Parameter\Parameter\ClassParameter;
use Infinito\Domain\Source\SourceClassInformationService;
use Infinito\Entity\Source\AbstractSource;
use Symfony\Component\Form\Form;
use Infinito\Domain\Parameter\Parameter\ClassParameter;
/**
* @author kevinfrantz

View File

@ -4,8 +4,8 @@ namespace Infinito\Domain\Core;
use FOS\RestBundle\View\View;
use Infinito\Attribut\ActionTypeAttribut;
use Infinito\Domain\View\ViewServiceInterface;
use Infinito\Domain\Process\ProcessServiceInterface;
use Infinito\Domain\View\ViewServiceInterface;
/**
* @author kevinfrantz
@ -27,10 +27,6 @@ final class CoreService implements CoreServiceInterface
*/
private $processService;
/**
* @param ViewServiceInterface $viewBuilder
* @param ProcessServiceInterface $processService
*/
public function __construct(ViewServiceInterface $viewBuilder, ProcessServiceInterface $processService)
{
$this->viewService = $viewBuilder;

View File

@ -14,8 +14,6 @@ interface CoreServiceInterface extends ActionTypeAttributInterface
{
/**
* Process through the layers.
*
* @return View
*/
public function process(): View;
}

View File

@ -10,21 +10,14 @@ use Doctrine\Common\Collections\Collection;
interface ActionsDAOInterface
{
/**
* @param string $actionType
*
* @return mixed The needed data
*/
public function getData(string $actionType);
/**
* @param string $actionType
*
* @return bool True if the data is set
*/
public function isDataStored(string $actionType): bool;
/**
* @return Collection
*/
public function getAllStoredData(): Collection;
}

View File

@ -24,11 +24,9 @@ final class ActionsResultsDAOService extends AbstractActionsDAO implements Actio
private $processedData;
/**
* @param string $actionType
* @param EntityInterface|ResultInterface|null $data
*
* @return bool True if the data is valid
* @return bool
*/
private function isValidActionData(string $actionType, $data): bool
{
@ -47,8 +45,6 @@ final class ActionsResultsDAOService extends AbstractActionsDAO implements Actio
}
/**
* @param string $actionType
*
* @throws InvalidChoiceTypeException
*/
private function throwNoValidActionTypeException(string $actionType): void
@ -56,19 +52,11 @@ final class ActionsResultsDAOService extends AbstractActionsDAO implements Actio
throw new InvalidChoiceTypeException("The action type <<$actionType>> is not defined and not valid!");
}
/**
* @param string $actionType
*
* @return bool
*/
private function isValidActionType(string $actionType): bool
{
return in_array($actionType, ActionType::getValues());
}
/**
* @param string $actionType
*/
private function validateActionType(string $actionType): void
{
if (!$this->isValidActionType($actionType)) {
@ -79,7 +67,6 @@ final class ActionsResultsDAOService extends AbstractActionsDAO implements Actio
/**
* This function describes which data is expected.
*
* @param string $actionType
* @param mixed $data
*
* @throws ValueInvalidException For false a exception is thrown
@ -92,8 +79,6 @@ final class ActionsResultsDAOService extends AbstractActionsDAO implements Actio
}
/**
* @param string $actionType
*
* @throws ContainsElementException
*/
private function validateNotSet(string $actionType): void
@ -104,8 +89,6 @@ final class ActionsResultsDAOService extends AbstractActionsDAO implements Actio
}
/**
* @param string $actionType
*
* @throws NotSetElementException
*/
private function validateSet(string $actionType): void

View File

@ -8,7 +8,6 @@ namespace Infinito\Domain\DataAccess;
interface ActionsResultsDAOServiceInterface extends ActionsDAOInterface
{
/**
* @param string $actionType
* @param mixed $data The data which a Template needs to be handled
*/
public function setData(string $actionType, $data): void;

View File

@ -2,10 +2,10 @@
namespace Infinito\Domain\DataAccess;
use Doctrine\Common\Collections\Collection;
use Doctrine\Common\Collections\ArrayCollection;
use Infinito\Domain\Form\RequestedActionFormBuilderServiceInterface;
use Doctrine\Common\Collections\Collection;
use Infinito\DBAL\Types\ActionType;
use Infinito\Domain\Form\RequestedActionFormBuilderServiceInterface;
/**
* @author kevinfrantz
@ -22,9 +22,6 @@ final class ActionsViewsDAOService extends AbstractActionsDAO implements Actions
*/
private $requestedActionFormBuilderService;
/**
* @param ActionsResultsDAOServiceInterface $actionsResultsDAO
*/
public function __construct(ActionsResultsDAOServiceInterface $actionsResultsDAO, RequestedActionFormBuilderServiceInterface $requestedActionFormBuilderService)
{
$this->actionsResultsDAO = $actionsResultsDAO;

View File

@ -2,14 +2,14 @@
namespace Infinito\Domain\Dom;
use Infinito\Entity\EntityInterface;
use Doctrine\Common\Collections\Collection;
use Infinito\Domain\Request\Entity\RequestedEntityServiceInterface;
use FOS\UserBundle\Model\UserInterface;
use Infinito\DBAL\Types\Meta\Right\LayerType;
use Infinito\Domain\Layer\LayerInterfaceMap;
use FOS\UserBundle\Model\UserInterface;
use Infinito\Exception\Core\NotCorrectInstanceCoreException;
use Infinito\Domain\Method\MethodPrefixType;
use Infinito\Domain\Request\Entity\RequestedEntityServiceInterface;
use Infinito\Entity\EntityInterface;
use Infinito\Exception\Core\NotCorrectInstanceCoreException;
/**
* This class is not ready and not tested!
@ -47,9 +47,6 @@ final class EntityDomService implements EntityDomServiceInterface
*/
private $domDocument;
/**
* @param RequestedEntityServiceInterface $requestedEntity
*/
public function __construct(RequestedEntityServiceInterface $requestedEntity)
{
$this->requestedEntity = $requestedEntity;
@ -65,19 +62,12 @@ final class EntityDomService implements EntityDomServiceInterface
$this->domDocument = new \DOMDocument();
}
/**
* @param string $method
*
* @return bool
*/
private function methodExist(string $method): bool
{
return $this->entityReflectionClass->hasMethod($method);
}
/**
* @param string $method
*
* @return mixed
*/
private function getMethodResult(string $method)
@ -86,8 +76,6 @@ final class EntityDomService implements EntityDomServiceInterface
}
/**
* @param string $propertyName
*
* @return mixed
*/
private function getPropertyValue(string $propertyName)
@ -104,7 +92,6 @@ final class EntityDomService implements EntityDomServiceInterface
/**
* @param mixed|EntityInterface $value
* @param \DOMElement $domElement
*/
private function mappValue($value, \DOMElement $domElement): void
{
@ -129,11 +116,6 @@ final class EntityDomService implements EntityDomServiceInterface
return;
}
/**
* @param \DOMElement $domElement
* @param string $layer
* @param EntityInterface $entity
*/
private function setLayerDomElement(\DOMElement $domElement, string $layer, EntityInterface $entity): void
{
$domElement->setAttribute('layer', $layer);
@ -141,31 +123,17 @@ final class EntityDomService implements EntityDomServiceInterface
$domElement->setAttribute('name', LayerType::getReadableValue($layer));
}
/**
* @param \DomElement $domElement
*/
private function setUserDomElement(\DomElement $domElement, \Infinito\Entity\UserInterface $user): void
{
$domElement->setAttribute('value', $user->getId());
$domElement->setAttribute('name', 'user');
}
/**
* @param string $method
* @param string $propertyName
*
* @return string
*/
private function getMethodName(string $method, string $propertyName): string
{
return $method.ucfirst($propertyName);
}
/**
* @param string $propertyName
*
* @return bool
*/
private function isPropertyAccessible(string $propertyName): bool
{
$getMethod = $this->getMethodName(MethodPrefixType::GET, $propertyName);

View File

@ -11,8 +11,5 @@ namespace Infinito\Domain\Dom;
*/
interface EntityDomServiceInterface
{
/**
* @return \DOMDocument
*/
public function getDomDocument(): \DOMDocument;
}

View File

@ -2,31 +2,24 @@
namespace Infinito\Domain\Fixture;
use Infinito\Entity\Meta\Right;
use Infinito\DBAL\Types\Meta\Right\LayerType;
use Infinito\DBAL\Types\ActionType;
use Infinito\Entity\Source\SourceInterface;
use Infinito\Entity\Meta\RightInterface;
use Infinito\DBAL\Types\Meta\Right\LayerType;
use Infinito\Entity\Meta\LawInterface;
use Infinito\Entity\Meta\Right;
use Infinito\Entity\Meta\RightInterface;
use Infinito\Entity\Source\SourceInterface;
/**
* @author kevinfrantz
*/
final class EntityTemplateFactory extends Right
{
/**
* @param LawInterface $law
* @param RightInterface $right
*/
private static function addRightToLaw(LawInterface $law, RightInterface $right)
{
$right->setLaw($law);
$law->getRights()->add($right);
}
/**
* @param SourceInterface $source
*/
public static function createStandartPublicRights(SourceInterface $source): void
{
$law = $source->getLaw();

View File

@ -24,9 +24,6 @@ abstract class AbstractFixtureSource implements FixtureSourceInterface
return $this->name ?? self::getSlug();
}
/**
* @return string
*/
public static function getSlug(): string
{
$className = get_called_class();

View File

@ -2,8 +2,8 @@
namespace Infinito\Domain\Fixture\FixtureSource;
use Infinito\Entity\Source\SourceInterface;
use Infinito\Attribut\SlugAttributInterface;
use Infinito\Entity\Source\SourceInterface;
/**
* This interface allows to save the configuration values of an fixture in a class.

View File

@ -2,9 +2,9 @@
namespace Infinito\Domain\Fixture\FixtureSource;
use Infinito\Entity\Source\SourceInterface;
use Infinito\Entity\Source\Complex\UserSource;
use Infinito\Domain\Fixture\EntityTemplateFactory;
use Infinito\Entity\Source\Complex\UserSource;
use Infinito\Entity\Source\SourceInterface;
/**
* This class containes the guest user.
@ -32,9 +32,6 @@ final class GuestUserFixtureSource extends AbstractFixtureSource
return $userSource;
}
/**
* @return string
*/
public static function getIcon(): string
{
return 'fas fa-user';

View File

@ -2,9 +2,9 @@
namespace Infinito\Domain\Fixture\FixtureSource;
use Infinito\Entity\Source\SourceInterface;
use Infinito\Entity\Source\Primitive\Text\TextSource;
use Infinito\Domain\Fixture\EntityTemplateFactory;
use Infinito\Entity\Source\Primitive\Text\TextSource;
use Infinito\Entity\Source\SourceInterface;
/**
* @author kevinfrantz
@ -26,9 +26,6 @@ final class HelpFixtureSource extends AbstractFixtureSource
return $helpSource;
}
/**
* @return string
*/
public static function getIcon(): string
{
return 'fas fa-question';

View File

@ -2,9 +2,9 @@
namespace Infinito\Domain\Fixture\FixtureSource;
use Infinito\Entity\Source\SourceInterface;
use Infinito\Entity\Source\Primitive\Text\TextSource;
use Infinito\Domain\Fixture\EntityTemplateFactory;
use Infinito\Entity\Source\Primitive\Text\TextSource;
use Infinito\Entity\Source\SourceInterface;
/**
* @author kevinfrantz

View File

@ -2,9 +2,9 @@
namespace Infinito\Domain\Fixture\FixtureSource;
use Infinito\Entity\Source\SourceInterface;
use Infinito\Entity\Source\Primitive\Text\TextSource;
use Infinito\Domain\Fixture\EntityTemplateFactory;
use Infinito\Entity\Source\Primitive\Text\TextSource;
use Infinito\Entity\Source\SourceInterface;
/**
* @author kevinfrantz
@ -26,9 +26,6 @@ final class ImpressumFixtureSource extends AbstractFixtureSource
return $impressumSource;
}
/**
* @return string
*/
public static function getIcon(): string
{
return 'fas fa-address-card';

View File

@ -2,9 +2,9 @@
namespace Infinito\Domain\Fixture\FixtureSource;
use Infinito\Entity\Source\SourceInterface;
use Infinito\Entity\Source\Primitive\Text\TextSource;
use Infinito\Domain\Fixture\EntityTemplateFactory;
use Infinito\Entity\Source\Primitive\Text\TextSource;
use Infinito\Entity\Source\SourceInterface;
/**
* @author kevinfrantz
@ -26,9 +26,6 @@ final class InformationFixtureSource extends AbstractFixtureSource
return $informationSource;
}
/**
* @return string
*/
public static function getIcon(): string
{
return 'fas fa-info';

View File

@ -57,9 +57,6 @@ final class FixtureSourceFactory implements FixtureSourceFactoryInterface
return $objects;
}
/**
* @return array
*/
public static function getAllFixtureSources(): array
{
$unfilteredClasses = self::getAllClassesInSourceFixtureNamespace();

View File

@ -2,10 +2,10 @@
namespace Infinito\Domain\Form;
use Symfony\Component\Form\FormBuilderInterface;
use Infinito\Domain\Request\Action\RequestedActionInterface;
use Symfony\Component\Form\FormFactoryInterface;
use Infinito\Exception\Attribut\UndefinedAttributException;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\Form\FormFactoryInterface;
/**
* @author kevinfrantz
@ -23,8 +23,6 @@ class RequestedActionFormBuilder implements RequestedActionFormBuilderInterface
private $formClassNameService;
/**
* @param RequestedActionInterface $requestedAction
*
* @throws UndefinedAttributException If the requested action can't be processed
*/
private function validateRequestedAction(RequestedActionInterface $requestedAction): void
@ -34,21 +32,12 @@ class RequestedActionFormBuilder implements RequestedActionFormBuilderInterface
}
}
/**
* @param FormFactoryInterface $formFactory
* @param FormClassNameServiceInterface $formClassNameService
*/
public function __construct(FormFactoryInterface $formFactory, FormClassNameServiceInterface $formClassNameService)
{
$this->formFactory = $formFactory;
$this->formClassNameService = $formClassNameService;
}
/**
* @param RequestedActionInterface $requestedAction
*
* @return FormBuilderInterface
*/
public function create(RequestedActionInterface $requestedAction): FormBuilderInterface
{
$this->validateRequestedAction($requestedAction);

View File

@ -2,8 +2,8 @@
namespace Infinito\Domain\Form;
use Symfony\Component\Form\FormBuilderInterface;
use Infinito\Domain\Request\Action\RequestedActionInterface;
use Symfony\Component\Form\FormBuilderInterface;
/**
* Allowes to create an form which fits to an entity.
@ -12,10 +12,5 @@ use Infinito\Domain\Request\Action\RequestedActionInterface;
*/
interface RequestedActionFormBuilderInterface
{
/**
* @param RequestedActionInterface $requestedAction
*
* @return FormBuilderInterface
*/
public function create(RequestedActionInterface $requestedAction): FormBuilderInterface;
}

View File

@ -2,8 +2,8 @@
namespace Infinito\Domain\Form;
use Symfony\Component\Form\FormBuilderInterface;
use Infinito\Domain\Request\Action\RequestedActionServiceInterface;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\Form\FormFactoryInterface;
/**

View File

@ -2,15 +2,15 @@
namespace Infinito\Domain\Law;
use PhpCollection\CollectionInterface;
use Doctrine\Common\Collections\ArrayCollection;
use Infinito\Entity\Meta\RightInterface;
use Doctrine\Common\Collections\Collection;
use Infinito\Entity\Meta\LawInterface;
use Infinito\Domain\Right\RightChecker;
use Infinito\Entity\Source\SourceInterface;
use Infinito\Domain\Source\SourceMemberInformation;
use Infinito\Domain\Method\MethodPrefixType;
use Infinito\Domain\Right\RightChecker;
use Infinito\Domain\Source\SourceMemberInformation;
use Infinito\Entity\Meta\LawInterface;
use Infinito\Entity\Meta\RightInterface;
use Infinito\Entity\Source\SourceInterface;
use PhpCollection\CollectionInterface;
/**
* @todo Implement checking by operation sources
@ -27,8 +27,6 @@ final class LawPermissionChecker implements LawPermissionCheckerInterface
/**
* @param Collection|RightInterface[] $rights
* @param string $value
* @param string $attribut
*
* @return Collection|RightInterface[]
*/
@ -46,7 +44,6 @@ final class LawPermissionChecker implements LawPermissionCheckerInterface
/**
* @param Collection|RightInterface[] $rights
* @param string $type
*
* @return Collection|RightInterface[]
*/
@ -56,8 +53,6 @@ final class LawPermissionChecker implements LawPermissionCheckerInterface
}
/**
* @param RightInterface $right
*
* @return bool True if right applies to all
*/
private function doesRightApplyToAll(RightInterface $right): bool
@ -67,7 +62,6 @@ final class LawPermissionChecker implements LawPermissionCheckerInterface
/**
* @param Collection|RightInterface[] $rights
* @param RightInterface $requestedRight
*
* @return Collection|RightInterface[]
*/
@ -85,11 +79,6 @@ final class LawPermissionChecker implements LawPermissionCheckerInterface
/**
* @todo Implement!
*
* @param RightInterface $right
* @param SourceInterface $recieverSource
*
* @return bool
*/
private function memberExist(RightInterface $right, SourceInterface $recieverSource): bool
{
@ -106,7 +95,6 @@ final class LawPermissionChecker implements LawPermissionCheckerInterface
/**
* @param Collection|RightInterface[] $rights
* @param string $layer
*
* @return Collection|RightInterface[]
*/
@ -139,8 +127,6 @@ final class LawPermissionChecker implements LawPermissionCheckerInterface
/**
* @param CollectionInterface|RightInterface[] $rights
* the rights which exist
*
* @return bool
*/
private function isGranted(Collection $rights, RightInterface $client): bool
{
@ -153,9 +139,6 @@ final class LawPermissionChecker implements LawPermissionCheckerInterface
return $rightChecker->isGranted($client->getLayer(), $client->getActionType(), $client->getReciever());
}
/**
* @param LawInterface $law
*/
public function __construct(LawInterface $law)
{
$this->law = $law;

View File

@ -13,8 +13,6 @@ interface LawPermissionCheckerInterface
{
/**
* Checks if the client has the right for executing.
*
* @return bool
*/
public function hasPermission(RightInterface $clientRight): bool;
}

View File

@ -2,8 +2,8 @@
namespace Infinito\Domain\Layer;
use Infinito\DBAL\Types\Meta\Right\LayerType;
use Infinito\DBAL\Types\ActionType;
use Infinito\DBAL\Types\Meta\Right\LayerType;
use Infinito\Domain\Map\AbstractMap;
/**

View File

@ -10,15 +10,11 @@ namespace Infinito\Domain\Layer;
interface LayerActionMapInterface
{
/**
* @param string $action
*
* @return array|string[]
*/
public static function getLayers(string $action): array;
/**
* @param string $layer
*
* @return array|string[]
*/
public static function getActions(string $layer): array;

View File

@ -3,13 +3,13 @@
namespace Infinito\Domain\Layer;
use Infinito\DBAL\Types\Meta\Right\LayerType;
use Infinito\Entity\Source\AbstractSource;
use Infinito\Exception\Collection\NotSetElementException;
use Infinito\Entity\Meta\Law;
use Infinito\Entity\Meta\Right;
use Infinito\Entity\Meta\Relation\Parent\HeredityRelation;
use Infinito\Entity\Meta\Relation\Member\MemberRelation;
use Infinito\Entity\Meta\Relation\Parent\CreatorRelation;
use Infinito\Entity\Meta\Relation\Parent\HeredityRelation;
use Infinito\Entity\Meta\Right;
use Infinito\Entity\Source\AbstractSource;
use Infinito\Exception\Collection\NotSetElementException;
/**
* @author kevinfrantz
@ -29,11 +29,7 @@ final class LayerClassMap implements LayerClassMapInterface
];
/**
* @param string $layer
*
* @throws NotSetElementException
*
* @return string
*/
public static function getClass(string $layer): string
{

View File

@ -8,8 +8,6 @@ namespace Infinito\Domain\Layer;
interface LayerClassMapInterface
{
/**
* @param string $layer
*
* @return string The class which belongs to an Layer
*/
public static function getClass(string $layer): string;

View File

@ -21,11 +21,6 @@ final class LayerInterfaceMap implements LayerInterfaceMapInterface
*/
const INTERFACE_SUFFIX = 'Interface';
/**
* @param string $shortClass
*
* @return string
*/
private static function filterAbstractClassName(string $shortClass): string
{
if (self::ABSTRACT_CLASS_PREFIX === substr($shortClass, 0, strlen(self::ABSTRACT_CLASS_PREFIX))) {
@ -35,21 +30,11 @@ final class LayerInterfaceMap implements LayerInterfaceMapInterface
return $shortClass;
}
/**
* @param string $class
*
* @return string
*/
private static function addInterfaceSuffix(string $class): string
{
return $class.self::INTERFACE_SUFFIX;
}
/**
* @param string $layer
*
* @return string
*/
public static function getInterface(string $layer): string
{
$className = LayerClassMap::getClass($layer);
@ -62,9 +47,6 @@ final class LayerInterfaceMap implements LayerInterfaceMapInterface
return $interfaceName;
}
/**
* @return array
*/
public static function getAllInterfaces(): array
{
$allInterfaces = [];

View File

@ -13,8 +13,6 @@ interface LayerInterfaceMapInterface
public static function getAllInterfaces(): array;
/**
* @param string $layer
*
* @return string The interface which belongs to an Layer
*/
public static function getInterface(string $layer): string;

View File

@ -10,7 +10,6 @@ namespace Infinito\Domain\Map;
abstract class AbstractMap implements MapInterface
{
/**
* @param string $index
* @param array|string[] $map
*
* @return array|string[]
@ -25,7 +24,6 @@ abstract class AbstractMap implements MapInterface
}
/**
* @param string $value
* @param array|string[] $map
*
* @return array|string[]

View File

@ -10,15 +10,11 @@ namespace Infinito\Domain\Map;
interface ActionHttpMethodMapInterface
{
/**
* @param string $httpMethod
*
* @return array|string[] The Http-Methods which belong to an action
*/
public static function getActions(string $httpMethod): array;
/**
* @param string $action
*
* @return array|string[] The Http-Methods which are possible for an action
*/
public static function getHttpMethods(string $action): array;

View File

@ -18,9 +18,6 @@ final class MemberManager implements MemberManagerInterface
*/
private $memberRelation;
/**
* @param MemberRelationInterface $memberRelation
*/
public function __construct(MemberRelationInterface $memberRelation)
{
$this->memberRelation = $memberRelation;

View File

@ -9,23 +9,11 @@ use Infinito\Entity\Meta\Relation\Member\MemberRelationInterface;
*/
interface MemberManagerInterface
{
/**
* @param MemberRelationInterface $member
*/
public function addMember(MemberRelationInterface $member): void;
/**
* @param MemberRelationInterface $member
*/
public function removeMember(MemberRelationInterface $member): void;
/**
* @param MemberRelationInterface $membership
*/
public function addMembership(MemberRelationInterface $membership): void;
/**
* @param MemberRelationInterface $membership
*/
public function removeMembership(MemberRelationInterface $membership): void;
}

View File

@ -2,9 +2,9 @@
namespace Infinito\Domain\Parameter;
use Symfony\Component\HttpFoundation\RequestStack;
use Symfony\Component\HttpFoundation\Request;
use Infinito\Exception\Collection\NotSetElementException;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\RequestStack;
/**
* This class exists out of refactoring reasons.
@ -19,14 +19,8 @@ abstract class AbstractGetParameterService implements GetParameterServiceInterfa
*/
protected $currentRequest;
/**
* @param string $key
*/
abstract protected function validateParameter(string $key): void;
/**
* @param RequestStack $requestStack
*/
private function setCurrentRequest(RequestStack $requestStack): void
{
$this->currentRequest = $requestStack->getCurrentRequest();
@ -39,9 +33,6 @@ abstract class AbstractGetParameterService implements GetParameterServiceInterfa
}
}
/**
* @param RequestStack $requestStack
*/
public function __construct(RequestStack $requestStack)
{
$this->setCurrentRequest($requestStack);

View File

@ -10,15 +10,11 @@ namespace Infinito\Domain\Parameter;
interface GetParameterServiceInterface
{
/**
* @param string $key
*
* @return bool True if the version parameter in the request is set
*/
public function hasParameter(string $key): bool;
/**
* @param string $key
*
* @return mixed
*/
public function getParameter(string $key);

View File

@ -2,8 +2,8 @@
namespace Infinito\Domain\Parameter\Parameter;
use Symfony\Component\Validator\Constraints as Assert;
use Infinito\Exception\Validation\GetParameterInvalidException;
use Symfony\Component\Validator\Constraints as Assert;
/**
* @author kevinfrantz

View File

@ -24,8 +24,6 @@ final class ParameterFactory implements ParameterFactoryInterface
private $parameters;
/**
* @param string $class
*
* @return bool True if an initialisation of the class is possible
*/
private function initPossible(string $class): bool

View File

@ -2,19 +2,14 @@
namespace Infinito\Domain\Parameter;
use Infinito\Domain\Parameter\Parameter\ParameterInterface;
use Doctrine\Common\Collections\Collection;
use Infinito\Domain\Parameter\Parameter\ParameterInterface;
/**
* @author kevinfrantz
*/
interface ParameterFactoryInterface
{
/**
* @param string $key
*
* @return ParameterInterface
*/
public function getParameter(string $key): ParameterInterface;
/**

View File

@ -2,9 +2,9 @@
namespace Infinito\Domain\Parameter;
use Infinito\Exception\Validation\GetParameterInvalidException;
use Symfony\Component\HttpFoundation\RequestStack;
use Symfony\Component\Validator\Validator\ValidatorInterface;
use Infinito\Exception\Validation\GetParameterInvalidException;
/**
* @author kevinfrantz
@ -21,11 +21,6 @@ final class ValidGetParametersService extends AbstractGetParameterService implem
*/
private $validator;
/**
* @param RequestStack $requestStack
* @param ParameterFactoryInterface $parameterFactory
* @param ValidatorInterface $validator
*/
public function __construct(RequestStack $requestStack, ParameterFactoryInterface $parameterFactory, ValidatorInterface $validator)
{
$this->parameterFactory = $parameterFactory;
@ -33,9 +28,6 @@ final class ValidGetParametersService extends AbstractGetParameterService implem
parent::__construct($requestStack);
}
/**
* @param string $key
*/
protected function validateParameter(string $key): void
{
$parameter = $this->parameterFactory->getParameter($key);

View File

@ -9,24 +9,12 @@ namespace Infinito\Domain\Path;
*/
interface NamespacePathMapInterface
{
/**
* @param string $namespace
*/
public function setNamespace(string $namespace): void;
/**
* @param string $path
*/
public function setPath(string $path): void;
/**
* @return string
*/
public function getNamespace(): string;
/**
* @return string
*/
public function getPath(): string;
/**

View File

@ -2,12 +2,12 @@
namespace Infinito\Domain\Process;
use Infinito\Domain\Request\Action\RequestedActionServiceInterface;
use Infinito\Domain\Secure\SecureRequestedRightCheckerServiceInterface;
use Infinito\Domain\Action\ActionHandlerServiceInterface;
use Infinito\Entity\Source\Primitive\Text\TextSource;
use Infinito\Domain\DataAccess\ActionsResultsDAOServiceInterface;
use Infinito\Domain\Parameter\ValidGetParameterServiceInterface;
use Infinito\Domain\Request\Action\RequestedActionServiceInterface;
use Infinito\Domain\Secure\SecureRequestedRightCheckerServiceInterface;
use Infinito\Entity\Source\Primitive\Text\TextSource;
use Symfony\Component\Finder\Exception\AccessDeniedException;
/**
@ -70,12 +70,6 @@ final class ProcessService implements ProcessServiceInterface
return;
}
/**
* @param ActionHandlerServiceInterface $actionHandlerService
* @param ActionsResultsDAOServiceInterface $actionTemplateDataStore
* @param RequestedActionServiceInterface $requestedActionService
* @param SecureRequestedRightCheckerServiceInterface $secureRequestedRightCheckerService
*/
public function __construct(ActionHandlerServiceInterface $actionHandlerService, ActionsResultsDAOServiceInterface $actionTemplateDataStore, RequestedActionServiceInterface $requestedActionService, SecureRequestedRightCheckerServiceInterface $secureRequestedRightCheckerService, ValidGetParameterServiceInterface $validGetParameterService)
{
$this->actionHandlerService = $actionHandlerService;

View File

@ -2,9 +2,9 @@
namespace Infinito\Domain\Repository;
use Infinito\Repository\RepositoryInterface;
use Doctrine\ORM\EntityManagerInterface;
use Infinito\Domain\Layer\LayerClassMap;
use Infinito\Repository\RepositoryInterface;
/**
* @author kevinfrantz
@ -16,9 +16,6 @@ final class LayerRepositoryFactoryService implements LayerRepositoryFactoryServi
*/
private $entityManager;
/**
* @param EntityManagerInterface $entityManager
*/
public function __construct(EntityManagerInterface $entityManager)
{
$this->entityManager = $entityManager;

View File

@ -11,10 +11,5 @@ use Infinito\Repository\RepositoryInterface;
*/
interface LayerRepositoryFactoryServiceInterface
{
/**
* @param string $layer
*
* @return RepositoryInterface
*/
public function getRepository(string $layer): RepositoryInterface;
}

View File

@ -10,9 +10,6 @@ use Infinito\Domain\Request\User\RequestedUserInterface;
*/
class RequestedAction extends RequestedUser implements RequestedActionInterface
{
/**
* @param RequestedUserInterface $requestedUser
*/
public function __construct(RequestedUserInterface $requestedUser)
{
parent::__construct($requestedUser->getUserSourceDirector(), $requestedUser);

View File

@ -9,9 +9,6 @@ use Infinito\Domain\Request\User\RequestedUserServiceInterface;
*/
final class RequestedActionService extends RequestedAction implements RequestedActionServiceInterface
{
/**
* @param RequestedUserServiceInterface $requestedUserService
*/
public function __construct(RequestedUserServiceInterface $requestedUserService)
{
parent::__construct($requestedUserService);

View File

@ -2,8 +2,8 @@
namespace Infinito\Domain\Request\Action;
use Doctrine\Common\Collections\Collection;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Infinito\Exception\Collection\ContainsElementException;
use Infinito\Exception\Collection\NotSetElementException;

View File

@ -9,16 +9,8 @@ use Doctrine\Common\Collections\Collection;
*/
interface RequestedActionStackInterface
{
/**
* @param RequestedActionInterface $requestedAction
*/
public function addRequestedAction(RequestedActionInterface $requestedAction): void;
/**
* @param string $actionType
*
* @return RequestedActionInterface
*/
public function getRequestedAction(string $actionType): RequestedActionInterface;
/**
@ -27,8 +19,6 @@ interface RequestedActionStackInterface
public function getAllRequestedActions(): Collection;
/**
* @param string $actionType
*
* @return bool True if the stack containes an RequestedAction to this action type
*/
public function containesRequestedAction(string $actionType): bool;

View File

@ -2,8 +2,8 @@
namespace Infinito\Domain\Request\Entity;
use Infinito\Entity\EntityInterface;
use Infinito\Attribut\SlugAttributInterface;
use Infinito\Entity\EntityInterface;
/**
* This class allows to use the RequestedEntity via LazyLoading
@ -28,9 +28,6 @@ class LazyRequestedEntity extends RequestedEntity
return $this->lazyLoadEntity();
}
/**
* @return EntityInterface|null
*/
private function lazyLoadEntity(): ?EntityInterface
{
if ($this->isLazyLoadNeccessary()) {
@ -41,9 +38,6 @@ class LazyRequestedEntity extends RequestedEntity
return self::$lazyLoadedEntity;
}
/**
* @return bool
*/
private function isLazyLoadNeccessary(): bool
{
if (self::$lazyLoadedEntity) {

View File

@ -2,23 +2,23 @@
namespace Infinito\Domain\Request\Entity;
use Infinito\Attribut\ClassAttribut;
use Infinito\Attribut\RequestedRightAttribut;
use Infinito\Attribut\SlugAttribut;
use Infinito\Domain\Repository\LayerRepositoryFactoryService;
use Infinito\Domain\Repository\LayerRepositoryFactoryServiceInterface;
use Infinito\Domain\Request\Right\RequestedRightInterface;
use Infinito\Entity\AbstractEntity;
use Infinito\Entity\EntityInterface;
use Infinito\Attribut\SlugAttribut;
use Infinito\Attribut\RequestedRightAttribut;
use Infinito\Domain\Repository\LayerRepositoryFactoryServiceInterface;
use Infinito\Repository\Source\SourceRepositoryInterface;
use Infinito\Entity\Source\AbstractSource;
use Infinito\Repository\RepositoryInterface;
use Infinito\Entity\Source\SourceInterface;
use Infinito\Attribut\ClassAttribut;
use Infinito\Domain\Request\Right\RequestedRightInterface;
use Infinito\Domain\Repository\LayerRepositoryFactoryService;
use Infinito\Exception\Attribut\UndefinedAttributException;
use Infinito\Exception\Core\NotCorrectInstanceCoreException;
use Infinito\Exception\Attribut\AllreadyDefinedAttributException;
use Infinito\Exception\Attribut\UndefinedAttributException;
use Infinito\Exception\Core\NoIdentityCoreException;
use Infinito\Exception\Core\NotCorrectInstanceCoreException;
use Infinito\Exception\NotFound\EntityNotFoundException;
use Infinito\Repository\RepositoryInterface;
use Infinito\Repository\Source\SourceRepositoryInterface;
/**
* @author kevinfrantz
@ -84,9 +84,6 @@ class RequestedEntity extends AbstractEntity implements RequestedEntityInterface
throw new NotCorrectInstanceCoreException('To read an entity by slug is just allowed for entitys of type '.AbstractSource::class);
}
/**
* @return EntityInterface|null
*/
private function loadById(): ?EntityInterface
{
$repository = $this->getEntityRepository();
@ -104,9 +101,6 @@ class RequestedEntity extends AbstractEntity implements RequestedEntityInterface
}
}
/**
* @return RepositoryInterface
*/
private function getEntityRepository(): RepositoryInterface
{
$this->validateLayerRepositoryFactoryService();
@ -116,17 +110,11 @@ class RequestedEntity extends AbstractEntity implements RequestedEntityInterface
return $repository;
}
/**
* @return EntityInterface|null
*/
protected function loadEntity(): ?EntityInterface
{
return $this->loadEntityBySlugOrId();
}
/**
* @param LayerRepositoryFactoryServiceInterface|null $layerRepositoryFactoryService
*/
public function __construct(?LayerRepositoryFactoryServiceInterface $layerRepositoryFactoryService = null)
{
$this->layerRepositoryFactoryService = $layerRepositoryFactoryService;

Some files were not shown because too many files have changed in this diff Show More