mirror of
https://github.com/kevinveenbirkenbach/infinito.git
synced 2025-09-13 13:57:10 +02:00
Code optimation by PHP-Code Sniffer
This commit is contained in:
@@ -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;
|
||||
|
||||
/**
|
||||
|
@@ -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;
|
||||
|
@@ -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
|
||||
{
|
||||
|
@@ -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;
|
||||
|
@@ -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 = [];
|
||||
|
@@ -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;
|
||||
|
Reference in New Issue
Block a user