mirror of
				https://github.com/kevinveenbirkenbach/infinito.git
				synced 2025-10-31 09:19:08 +00:00 
			
		
		
		
	Optimized namespaes
This commit is contained in:
		| @@ -3,12 +3,12 @@ | ||||
| namespace App\Controller; | ||||
|  | ||||
| use Symfony\Component\HttpFoundation\Response; | ||||
| use App\Entity\AbstractSource; | ||||
| use App\Entity\Method; | ||||
| use Symfony\Component\Routing\Annotation\Route; | ||||
| use Symfony\Component\HttpFoundation\Request; | ||||
| use App\Creator\Factory\Template\Source\SourceTemplateFactory; | ||||
| use FOS\RestBundle\Controller\FOSRestController; | ||||
| use App\Entity\SourceInterface; | ||||
| use App\Entity\Source\SourceInterface; | ||||
| use App\Creator\Factory\Template\Source\SourceTemplateFormFactory; | ||||
| use App\Creator\Factory\Form\Source\SourceFormFactory; | ||||
| use Symfony\Component\HttpFoundation\RedirectResponse; | ||||
|   | ||||
| @@ -2,7 +2,7 @@ | ||||
|  | ||||
| namespace App\Creator\Factory; | ||||
|  | ||||
| use App\Entity\SourceInterface; | ||||
| use App\Entity\Source\SourceInterface; | ||||
|  | ||||
| /** | ||||
|  * @author kevinfrantz | ||||
|   | ||||
| @@ -2,7 +2,7 @@ | ||||
|  | ||||
| namespace App\Creator\Factory\Template\Source; | ||||
|  | ||||
| use App\Entity\SourceInterface; | ||||
| use App\Entity\Source\SourceInterface; | ||||
| use Symfony\Component\HttpFoundation\Request; | ||||
| use Creator\Factory\AbstractSourceFactory; | ||||
|  | ||||
|   | ||||
| @@ -1,6 +1,6 @@ | ||||
| <?php | ||||
|  | ||||
| namespace App\Entity\Attribut\Interfaces; | ||||
| namespace App\Entity\Attribut; | ||||
|  | ||||
| /** | ||||
|  * @author kevinfrantz | ||||
|   | ||||
| @@ -1,6 +1,6 @@ | ||||
| <?php | ||||
|  | ||||
| namespace App\Entity\Attribut\Interfaces; | ||||
| namespace App\Entity\Attribut; | ||||
|  | ||||
| use Doctrine\Common\Collections\Collection; | ||||
|  | ||||
|   | ||||
| @@ -1,6 +1,6 @@ | ||||
| <?php | ||||
|  | ||||
| namespace App\Entity\Attribut\Interfaces; | ||||
| namespace App\Entity\Attribut; | ||||
|  | ||||
| use App\Logic\Operation\OperationInterface; | ||||
|  | ||||
|   | ||||
| @@ -1,6 +1,6 @@ | ||||
| <?php | ||||
|  | ||||
| namespace App\Entity\Attribut\Interfaces; | ||||
| namespace App\Entity\Attribut; | ||||
|  | ||||
| /** | ||||
|  * @author kevinfrantz | ||||
|   | ||||
| @@ -1,6 +1,6 @@ | ||||
| <?php | ||||
|  | ||||
| namespace App\Entity\Attribut\Interfaces; | ||||
| namespace App\Entity\Attribut; | ||||
|  | ||||
| /** | ||||
|  * @author kevinfrantz | ||||
|   | ||||
| @@ -1,6 +1,6 @@ | ||||
| <?php | ||||
|  | ||||
| namespace App\Entity\Attribut\Interfaces; | ||||
| namespace App\Entity\Attribut; | ||||
|  | ||||
| use App\Entity\LawInterface; | ||||
|  | ||||
|   | ||||
| @@ -1,6 +1,6 @@ | ||||
| <?php | ||||
|  | ||||
| namespace App\Entity\Attribut\Interfaces; | ||||
| namespace App\Entity\Attribut; | ||||
|  | ||||
| /** | ||||
|  * @author kevinfrantz | ||||
|   | ||||
| @@ -1,6 +1,6 @@ | ||||
| <?php | ||||
|  | ||||
| namespace App\Entity\Attribut\Interfaces; | ||||
| namespace App\Entity\Attribut; | ||||
|  | ||||
| /** | ||||
|  * @author kevinfrantz | ||||
|   | ||||
| @@ -2,7 +2,7 @@ | ||||
|  | ||||
| namespace App\Entity\Attribut; | ||||
|  | ||||
| use App\Entity\NameSourceInterface; | ||||
| use App\Entity\Source\NameSourceInterface; | ||||
|  | ||||
| /** | ||||
|  * @author kevinfrantz | ||||
|   | ||||
| @@ -1,8 +1,8 @@ | ||||
| <?php | ||||
|  | ||||
| namespace App\Entity\Attribut\Interfaces; | ||||
| namespace App\Entity\Attribut; | ||||
|  | ||||
| use App\Entity\NameSourceInterface; | ||||
| use App\Entity\Source\NameSourceInterface; | ||||
|  | ||||
| /** | ||||
|  * @author kevinfrantz | ||||
|   | ||||
| @@ -1,6 +1,6 @@ | ||||
| <?php | ||||
|  | ||||
| namespace App\Entity\Attribut\Interfaces; | ||||
| namespace App\Entity\Attribut; | ||||
|  | ||||
| use App\Entity\NodeInterface; | ||||
|  | ||||
|   | ||||
| @@ -2,7 +2,7 @@ | ||||
|  | ||||
| namespace Entity\Attribut; | ||||
|  | ||||
| use App\Entity\Attribut\Interfaces\ParentAttributInterface; | ||||
| use App\Entity\Attribut\ParentAttributInterface; | ||||
|  | ||||
| /** | ||||
|  * @author kevinfrantz | ||||
|   | ||||
| @@ -1,6 +1,6 @@ | ||||
| <?php | ||||
|  | ||||
| namespace App\Entity\Attribut\Interfaces; | ||||
| namespace App\Entity\Attribut; | ||||
|  | ||||
| /** | ||||
|  * @author kevinfrantz | ||||
|   | ||||
| @@ -1,6 +1,6 @@ | ||||
| <?php | ||||
|  | ||||
| namespace App\Entity\Attribut\Interfaces; | ||||
| namespace App\Entity\Attribut; | ||||
|  | ||||
| use Doctrine\Common\Collections\Collection; | ||||
|  | ||||
|   | ||||
| @@ -1,6 +1,6 @@ | ||||
| <?php | ||||
|  | ||||
| namespace App\Entity\Attribut\Interfaces; | ||||
| namespace App\Entity\Attribut; | ||||
|  | ||||
| /** | ||||
|  * @author kevinfrantz | ||||
|   | ||||
| @@ -1,6 +1,6 @@ | ||||
| <?php | ||||
|  | ||||
| namespace App\Entity\Attribut\Interfaces; | ||||
| namespace App\Entity\Attribut; | ||||
|  | ||||
| use App\Entity\RecieverGroupInterface; | ||||
|  | ||||
|   | ||||
| @@ -1,6 +1,6 @@ | ||||
| <?php | ||||
|  | ||||
| namespace App\Entity\Attribut\Interfaces; | ||||
| namespace App\Entity\Attribut; | ||||
|  | ||||
| use App\Entity\RightInterface; | ||||
|  | ||||
|   | ||||
| @@ -1,6 +1,6 @@ | ||||
| <?php | ||||
|  | ||||
| namespace App\Entity\Attribut\Interfaces; | ||||
| namespace App\Entity\Attribut; | ||||
|  | ||||
| use Doctrine\Common\Collections\Collection; | ||||
|  | ||||
|   | ||||
| @@ -2,7 +2,7 @@ | ||||
|  | ||||
| namespace App\Entity\Attribut; | ||||
|  | ||||
| use App\Entity\SourceInterface; | ||||
| use App\Entity\Source\SourceInterface; | ||||
|  | ||||
| /** | ||||
|  * @author kevinfrantz | ||||
|   | ||||
| @@ -1,8 +1,8 @@ | ||||
| <?php | ||||
|  | ||||
| namespace App\Entity\Attribut\Interfaces; | ||||
| namespace App\Entity\Attribut; | ||||
|  | ||||
| use App\Entity\SourceInterface; | ||||
| use App\Entity\Source\SourceInterface; | ||||
|  | ||||
| /** | ||||
|  * @author kevinfrantz | ||||
|   | ||||
| @@ -1,6 +1,6 @@ | ||||
| <?php | ||||
|  | ||||
| namespace App\Entity\Attribut\Interfaces; | ||||
| namespace App\Entity\Attribut; | ||||
|  | ||||
| /** | ||||
|  * @author kevinfrantz | ||||
|   | ||||
| @@ -1,6 +1,6 @@ | ||||
| <?php | ||||
|  | ||||
| namespace App\Entity\Attribut\Interfaces; | ||||
| namespace App\Entity\Attribut; | ||||
|  | ||||
| use App\Entity\UserInterface; | ||||
|  | ||||
|   | ||||
| @@ -2,7 +2,7 @@ | ||||
|  | ||||
| namespace Entity\Attribut; | ||||
|  | ||||
| use App\Entity\UserSourceInterface; | ||||
| use App\Entity\Source\UserSourceInterface; | ||||
|  | ||||
| /** | ||||
|  * @author kevinfrantz | ||||
|   | ||||
| @@ -1,8 +1,8 @@ | ||||
| <?php | ||||
|  | ||||
| namespace App\Entity\Attribut\Interfaces; | ||||
| namespace App\Entity\Attribut; | ||||
|  | ||||
| use App\Entity\UserSourceInterface; | ||||
| use App\Entity\Source\UserSourceInterface; | ||||
|  | ||||
| /** | ||||
|  * @author kevinfrantz | ||||
|   | ||||
| @@ -1,6 +1,6 @@ | ||||
| <?php | ||||
|  | ||||
| namespace App\Entity\Attribut\Interfaces; | ||||
| namespace App\Entity\Attribut; | ||||
|  | ||||
| /** | ||||
|  * @author kevinfrantz | ||||
|   | ||||
| @@ -2,9 +2,9 @@ | ||||
|  | ||||
| namespace App\Entity; | ||||
|  | ||||
| use App\Entity\Attribut\Interfaces\RightsAttributInterface; | ||||
| use App\Entity\Method\Interfaces\NodeGrantedInterface; | ||||
| use App\Entity\Attribut\Interfaces\NodeAttributInterface; | ||||
| use App\Entity\Attribut\RightsAttributInterface; | ||||
| use App\Entity\Method\NodeGrantedInterface; | ||||
| use App\Entity\Attribut\NodeAttributInterface; | ||||
|  | ||||
| /** | ||||
|  * @author kevinfrantz | ||||
|   | ||||
| @@ -1,6 +1,6 @@ | ||||
| <?php | ||||
|  | ||||
| namespace App\Entity\Method\Interfaces; | ||||
| namespace App\Entity\Method; | ||||
|  | ||||
| use App\Entity\NodeInterface; | ||||
|  | ||||
|   | ||||
| @@ -10,7 +10,7 @@ use App\Entity\Attribut\ChildsAttribut; | ||||
| use App\Entity\Attribut\LawAttribut; | ||||
| use Doctrine\Common\Collections\ArrayCollection; | ||||
| use App\Entity\NodeInterface; | ||||
| use App\Entity\SourceInterface; | ||||
| use App\Entity\Source\SourceInterface; | ||||
| use App\Entity\LawInterface; | ||||
|  | ||||
| /** | ||||
|   | ||||
| @@ -2,11 +2,11 @@ | ||||
|  | ||||
| namespace App\Entity; | ||||
|  | ||||
| use App\Entity\Attribut\Interfaces\SourceAttributInterface; | ||||
| use App\Entity\Attribut\Interfaces\IdAttributInterface; | ||||
| use App\Entity\Attribut\Interfaces\ParentsAttributInterface; | ||||
| use App\Entity\Attribut\Interfaces\ChildsAttributeInterface; | ||||
| use App\Entity\Attribut\Interfaces\LawAttributInterface; | ||||
| use App\Entity\Attribut\SourceAttributInterface; | ||||
| use App\Entity\Attribut\IdAttributInterface; | ||||
| use App\Entity\Attribut\ParentsAttributInterface; | ||||
| use App\Entity\Attribut\ChildsAttributeInterface; | ||||
| use App\Entity\Attribut\LawAttributInterface; | ||||
|  | ||||
| /** | ||||
|  * @author kevinfrantz | ||||
|   | ||||
| @@ -2,8 +2,8 @@ | ||||
| 
 | ||||
| namespace App\Entity; | ||||
| 
 | ||||
| use App\Entity\Attribut\Interfaces\NodeAttributInterface; | ||||
| use App\Entity\Attribut\Interfaces\RecieverAttributInterface; | ||||
| use App\Entity\Attribut\NodeAttributInterface; | ||||
| use App\Entity\Attribut\RecieverAttributInterface; | ||||
| use Doctrine\Common\Collections\ArrayCollection; | ||||
| 
 | ||||
| /** | ||||
| @@ -2,14 +2,14 @@ | ||||
|  | ||||
| namespace App\Entity; | ||||
|  | ||||
| use App\Entity\Attribut\Interfaces\TypeAttributInterface; | ||||
| use App\Entity\Attribut\Interfaces\LawAttributInterface; | ||||
| use App\Entity\Method\Interfaces\NodeGrantedInterface; | ||||
| use App\Entity\Attribut\Interfaces\RecieverGroupAttributInterface; | ||||
| use App\Entity\Attribut\Interfaces\GrantAttributInterface; | ||||
| use App\Entity\Attribut\Interfaces\NodeAttributInterface; | ||||
| use App\Entity\Attribut\Interfaces\ConditionAttributInterface; | ||||
| use App\Entity\Attribut\Interfaces\LayerAttributInterface; | ||||
| use App\Entity\Attribut\TypeAttributInterface; | ||||
| use App\Entity\Attribut\LawAttributInterface; | ||||
| use App\Entity\Method\NodeGrantedInterface; | ||||
| use App\Entity\Attribut\RecieverGroupAttributInterface; | ||||
| use App\Entity\Attribut\GrantAttributInterface; | ||||
| use App\Entity\Attribut\NodeAttributInterface; | ||||
| use App\Entity\Attribut\ConditionAttributInterface; | ||||
| use App\Entity\Attribut\LayerAttributInterface; | ||||
|  | ||||
| /** | ||||
|  * @author kevinfrantz | ||||
|   | ||||
| @@ -1,12 +1,13 @@ | ||||
| <?php | ||||
|  | ||||
| namespace App\Entity; | ||||
| namespace App\Entity\Source; | ||||
|  | ||||
| use App\Entity\Attribut\NodeAttribut; | ||||
| use Doctrine\ORM\Mapping as ORM; | ||||
| use JMS\Serializer\Annotation\Exclude; | ||||
| use App\Entity\SourceInterface; | ||||
| use App\Entity\Source\SourceInterface; | ||||
| use App\Entity\NodeInterface; | ||||
| use App\Entity\AbstractEntity; | ||||
|  | ||||
| /** | ||||
|  * @author kevinfrantz | ||||
|   | ||||
| @@ -1,11 +1,11 @@ | ||||
| <?php | ||||
|  | ||||
| namespace App\Entity; | ||||
| namespace App\Entity\Source; | ||||
|  | ||||
| use App\Entity\Attribut\NameAttribut; | ||||
| use Doctrine\ORM\Mapping as ORM; | ||||
| use Symfony\Component\Validator\Constraints as Assert; | ||||
| use App\Entity\NameSourceInterface; | ||||
| use App\Entity\Source\NameSourceInterface; | ||||
|  | ||||
| /** | ||||
|  * @author kevinfrantz | ||||
|   | ||||
| @@ -1,8 +1,8 @@ | ||||
| <?php | ||||
|  | ||||
| namespace App\Entity; | ||||
| namespace App\Entity\Source; | ||||
|  | ||||
| use App\Entity\Attribut\Interfaces\NameAttributInterface; | ||||
| use App\Entity\Attribut\NameAttributInterface; | ||||
|  | ||||
| /** | ||||
|  * @author kevinfrantz | ||||
|   | ||||
| @@ -1,14 +1,15 @@ | ||||
| <?php | ||||
|  | ||||
| namespace App\Entity; | ||||
| namespace App\Entity\Source\Operation; | ||||
|  | ||||
| use App\Logic\Result\ResultInterface; | ||||
| use App\Logic\Operation\OperationInterface; | ||||
| use App\Logic\Operation\OperandInterface; | ||||
| use Doctrine\Common\Collections\ArrayCollection; | ||||
| use Doctrine\ORM\Mapping as ORM; | ||||
| use App\Entity\Source\AbstractSource; | ||||
|  | ||||
| /** | ||||
|  * | ||||
|  * @author kevinfrantz | ||||
|  * @ORM\Entity | ||||
|  * @ORM\Table(name="source_operation") | ||||
| @@ -18,6 +19,7 @@ use Doctrine\ORM\Mapping as ORM; | ||||
|  */ | ||||
| abstract class AbstractOperation extends AbstractSource implements OperationInterface | ||||
| { | ||||
|  | ||||
|     /** | ||||
|      * The result MUST NOT be saved via Doctrine! | ||||
|      * | ||||
| @@ -26,6 +28,7 @@ abstract class AbstractOperation extends AbstractSource implements OperationInte | ||||
|     protected $result; | ||||
|  | ||||
|     /** | ||||
|      * | ||||
|      * @var ArrayCollection|OperandInterface[] | ||||
|      */ | ||||
|     protected $operands; | ||||
|   | ||||
| @@ -1,6 +1,6 @@ | ||||
| <?php | ||||
|  | ||||
| namespace App\Entity; | ||||
| namespace App\Entity\Source\Operation; | ||||
|  | ||||
| use App\Logic\Operation\OperandInterface; | ||||
| use App\Logic\Result\Result; | ||||
|   | ||||
							
								
								
									
										13
									
								
								application/src/Entity/Source/SourceInterface.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										13
									
								
								application/src/Entity/Source/SourceInterface.php
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,13 @@ | ||||
| <?php | ||||
| namespace App\Entity\Source; | ||||
|  | ||||
| use App\Entity\Attribut\NodeAttributInterface; | ||||
| use App\Entity\Attribut\IdAttributInterface; | ||||
|  | ||||
| /** | ||||
|  * | ||||
|  * @author kevinfrantz | ||||
|  */ | ||||
| interface SourceInterface extends IdAttributInterface, NodeAttributInterface | ||||
| { | ||||
| } | ||||
| @@ -1,13 +1,13 @@ | ||||
| <?php | ||||
|  | ||||
| namespace App\Entity; | ||||
| namespace App\Entity\Source; | ||||
|  | ||||
| use Doctrine\ORM\Mapping as ORM; | ||||
| use Symfony\Component\Validator\Constraints as Assert; | ||||
| use App\Entity\Attribut\UserAttribut; | ||||
| use App\Entity\Attribut\NameSourceAttribut; | ||||
| use App\Entity\UserSourceInterface; | ||||
| use App\Entity\NameSourceInterface; | ||||
| use App\Entity\Source\UserSourceInterface; | ||||
| use App\Entity\Source\NameSourceInterface; | ||||
|  | ||||
| /** | ||||
|  * @author kevinfrantz | ||||
|   | ||||
| @@ -1,9 +1,9 @@ | ||||
| <?php | ||||
|  | ||||
| namespace App\Entity; | ||||
| namespace App\Entity\Source; | ||||
|  | ||||
| use App\Entity\Attribut\Interfaces\UserAttributInterface; | ||||
| use App\Entity\Attribut\Interfaces\NameSourceAttributInterface; | ||||
| use App\Entity\Attribut\UserAttributInterface; | ||||
| use App\Entity\Attribut\NameSourceAttributInterface; | ||||
|  | ||||
| /** | ||||
|  * @author kevinfrantz | ||||
|   | ||||
| @@ -1,13 +0,0 @@ | ||||
| <?php | ||||
|  | ||||
| namespace App\Entity; | ||||
|  | ||||
| use App\Entity\Attribut\Interfaces\NodeAttributInterface; | ||||
| use App\Entity\Attribut\Interfaces\IdAttributInterface; | ||||
|  | ||||
| /** | ||||
|  * @author kevinfrantz | ||||
|  */ | ||||
| interface SourceInterface extends IdAttributInterface, NodeAttributInterface | ||||
| { | ||||
| } | ||||
| @@ -4,12 +4,11 @@ namespace App\Entity; | ||||
|  | ||||
| use Doctrine\ORM\Mapping as ORM; | ||||
| use FOS\UserBundle\Model\User as BaseUser; | ||||
| use App\Entity\Attribut\Interfaces\SourceAttributInterface; | ||||
| use App\Entity\Attribut\SourceAttribut; | ||||
| use App\Entity\Attribut\IdAttribut; | ||||
| use App\Creator\Modificator\Entity\LawModificator; | ||||
| use App\Entity\UserInterface; | ||||
| use App\Entity\UserSourceInterface; | ||||
| use App\Entity\Source\UserSourceInterface; | ||||
| use App\Entity\Source\UserSource; | ||||
|  | ||||
| /** | ||||
|  * @author kevinfrantz | ||||
|   | ||||
| @@ -2,7 +2,7 @@ | ||||
| namespace App\Entity; | ||||
|  | ||||
| use FOS\UserBundle\Model\UserInterface as FOSUserInterface; | ||||
| use App\Entity\Attribut\Interfaces\SourceAttributInterface; | ||||
| use App\Entity\Attribut\SourceAttributInterface; | ||||
|  | ||||
| /** | ||||
|  * | ||||
|   | ||||
| @@ -4,7 +4,7 @@ namespace App\Security; | ||||
| use Symfony\Component\Security\Core\Authentication\Token\TokenInterface; | ||||
| use Symfony\Component\Security\Core\Authorization\Voter\Voter; | ||||
| use App\DBAL\Types\RightType; | ||||
| use App\Entity\SourceInterface; | ||||
| use App\Entity\Source\SourceInterface; | ||||
| use App\DBAL\Types\LayerType; | ||||
| use App\Entity\UserInterface; | ||||
|  | ||||
|   | ||||
| @@ -3,7 +3,7 @@ | ||||
| namespace App\Structur\Facade\Security\Source; | ||||
|  | ||||
| use App\Entity\NodeInterface; | ||||
| use App\Entity\SourceInterface; | ||||
| use App\Entity\Source\SourceInterface; | ||||
| use App\Entity\User; | ||||
| use App\DBAL\Types\RightType; | ||||
| use App\DBAL\Types\LayerType; | ||||
|   | ||||
| @@ -2,9 +2,9 @@ | ||||
|  | ||||
| namespace App\Structur\Facade\Security\Source; | ||||
|  | ||||
| use App\Entity\NameSourceInterface; | ||||
| use App\Entity\User; | ||||
| use App\Entity\UserSourceInterface; | ||||
| use App\Entity\Source\NameSourceInterface; | ||||
| use App\Entity\UserInterface; | ||||
| use App\Entity\Source\UserSourceInterface; | ||||
| use App\DBAL\Types\RightType; | ||||
| use App\DBAL\Types\LayerType; | ||||
|  | ||||
| @@ -38,14 +38,10 @@ class UserSourceFacade extends AbstractSourceFacade implements UserSourceInterfa | ||||
|  | ||||
|         return $this->isGranted($right, $layer) && $law->isGranted($userSourceNode, $layer, $right); | ||||
|     } | ||||
|     public function getUser(): UserInterface | ||||
|     {} | ||||
|  | ||||
|     public function getUser(): User | ||||
|     { | ||||
|         //FILL | ||||
|     } | ||||
|     public function setUser(User $user): void | ||||
|     { | ||||
|         //FILL | ||||
|     } | ||||
|     public function setUser(UserInterface $user): void | ||||
|     {} | ||||
|  | ||||
| } | ||||
|   | ||||
| @@ -5,7 +5,7 @@ namespace tests\unit\Entity; | ||||
| use PHPUnit\Framework\TestCase; | ||||
| use App\Entity\User; | ||||
| use App\Entity\Law; | ||||
| use App\Entity\UserSource; | ||||
| use App\Entity\Source\UserSource; | ||||
| use App\Entity\Node; | ||||
|  | ||||
| /** | ||||
|   | ||||
		Reference in New Issue
	
	Block a user