Code optimation by PHP-Code Sniffer

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

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;