mirror of
				https://github.com/kevinveenbirkenbach/infinito.git
				synced 2025-10-31 17:29:04 +00:00 
			
		
		
		
	Solved bugs to allow unit tests to run
This commit is contained in:
		| @@ -1,10 +1,10 @@ | ||||
| <?php | ||||
| 
 | ||||
| namespace Entity\Attribut; | ||||
| namespace App\Entity\Attribut; | ||||
| 
 | ||||
| use App\Entity\Source\Data\PersonIdentitySourceInterface; | ||||
| 
 | ||||
| trait PersonIdentityAttribut | ||||
| trait PersonIdentitySourceAttribut | ||||
| { | ||||
|     /** | ||||
|      * @var PersonIdentitySourceInterface | ||||
| @@ -4,9 +4,20 @@ namespace App\Entity\Attribut; | ||||
|  | ||||
| use App\Entity\Source\Data\Name\SurnameSourceInterface; | ||||
|  | ||||
| interface SurnameSourceAttributInterface | ||||
| trait SurnameSourceAttribut | ||||
| { | ||||
|     public function getSurname(): SurnameSourceInterface; | ||||
|     /** | ||||
|      * @var SurnameSourceInterface | ||||
|      */ | ||||
|     protected $surnameSource; | ||||
|  | ||||
|     public function setSurname(SurnameSourceInterface $name): void; | ||||
|     public function getSurname(): SurnameSourceInterface | ||||
|     { | ||||
|         return $this->surnameSource; | ||||
|     } | ||||
|  | ||||
|     public function setSurname(SurnameSourceInterface $name): void | ||||
|     { | ||||
|         $this->surnameSource = $name; | ||||
|     } | ||||
| } | ||||
|   | ||||
| @@ -4,20 +4,9 @@ namespace App\Entity\Attribut; | ||||
|  | ||||
| use App\Entity\Source\Data\Name\SurnameSourceInterface; | ||||
|  | ||||
| trait SurnameSourceAttribut | ||||
| interface SurnameSourceAttributInterface | ||||
| { | ||||
|     /** | ||||
|      * @var SurnameSourceInterface | ||||
|      */ | ||||
|     protected $surnameSource; | ||||
|     public function getSurname(): SurnameSourceInterface; | ||||
|  | ||||
|     public function getSurname(): SurnameSourceInterface | ||||
|     { | ||||
|         return $this->surnameSource; | ||||
|     } | ||||
|  | ||||
|     public function setSurname(SurnameSourceInterface $name): void | ||||
|     { | ||||
|         $this->surnameSource = $name; | ||||
|     } | ||||
|     public function setSurname(SurnameSourceInterface $name): void; | ||||
| } | ||||
|   | ||||
| @@ -5,7 +5,7 @@ namespace App\Entity\Source\Combination; | ||||
| use Doctrine\ORM\Mapping as ORM; | ||||
| use App\Entity\Attribut\UserAttribut; | ||||
| use App\Entity\UserInterface; | ||||
| use Entity\Attribut\PersonIdentityAttribut; | ||||
| use App\Entity\Attribut\PersonIdentitySourceAttribut; | ||||
|  | ||||
| /** | ||||
|  * @author kevinfrantz | ||||
| @@ -14,7 +14,7 @@ use Entity\Attribut\PersonIdentityAttribut; | ||||
|  */ | ||||
| class UserSource extends AbstractCombinationSource implements UserSourceInterface | ||||
| { | ||||
|     use UserAttribut,PersonIdentityAttribut; | ||||
|     use UserAttribut,PersonIdentitySourceAttribut; | ||||
|  | ||||
|     /** | ||||
|      * @ORM\OneToOne(targetEntity="App\Entity\User",cascade={"persist", "remove"}) | ||||
|   | ||||
| @@ -5,6 +5,7 @@ namespace App\Entity\Source\Data\Name; | ||||
| use App\Entity\Source\Data\AbstractDataSource; | ||||
| use App\Entity\Attribut\NameAttribut; | ||||
| use Doctrine\ORM\Mapping as ORM; | ||||
| use Symfony\Component\Validator\Constraints as Assert; | ||||
|  | ||||
| /** | ||||
|  * @author kevinfrantz | ||||
| @@ -13,9 +14,23 @@ use Doctrine\ORM\Mapping as ORM; | ||||
|  * @ORM\Table(name="source_data_name") | ||||
|  * @ORM\InheritanceType("SINGLE_TABLE") | ||||
|  * @ORM\DiscriminatorColumn(name="discr", type="string") | ||||
|  * @ORM\DiscriminatorMap({"nickname" = "NicknameSource","firstname" = "FirstNameSource", "lastname" = "LastNameSource"}) | ||||
|  * @ORM\DiscriminatorMap({"nickname" = "NicknameSource","firstname" = "FirstNameSource", "surname" = "SurnameSource"}) | ||||
|  */ | ||||
| abstract class AbstractNameSource extends AbstractDataSource implements NameSourceInterface | ||||
| { | ||||
|     use NameAttribut; | ||||
|  | ||||
|     /** | ||||
|      * @todo Implement an extra assert Layer! - maybe ;) | ||||
|      * @ORM\Column(type="string",length=255) | ||||
|      * @Assert\NotBlank() | ||||
|      * | ||||
|      * @var string | ||||
|      */ | ||||
|     protected $name; | ||||
|  | ||||
|     public function __construct() | ||||
|     { | ||||
|         parent::__construct(); | ||||
|     } | ||||
| } | ||||
|   | ||||
| @@ -0,0 +1,7 @@ | ||||
| <?php | ||||
|  | ||||
| namespace App\Entity\Source\Data\Name; | ||||
|  | ||||
| final class FirstNameSource extends AbstractNameSource implements FirstNameSourceInterface | ||||
| { | ||||
| } | ||||
| @@ -2,30 +2,13 @@ | ||||
|  | ||||
| namespace App\Entity\Source\Data\Name; | ||||
|  | ||||
| use App\Entity\Attribut\NameAttribut; | ||||
| use Doctrine\ORM\Mapping as ORM; | ||||
| use Symfony\Component\Validator\Constraints as Assert; | ||||
|  | ||||
| /** | ||||
|  * @author kevinfrantz | ||||
|  * @ORM\Table(name="source_data_nickname") | ||||
|  * @ORM\Table(name="source_data_name_nickname") | ||||
|  * @ORM\Entity() | ||||
|  */ | ||||
| final class NicknameSource extends AbstractNameSource implements NicknameSourceInterface | ||||
| { | ||||
|     use NameAttribut; | ||||
|  | ||||
|     /** | ||||
|      * @todo Implement an extra assert Layer! | ||||
|      * @ORM\Column(type="string",length=255) | ||||
|      * @Assert\NotBlank() | ||||
|      * | ||||
|      * @var string | ||||
|      */ | ||||
|     protected $name; | ||||
|  | ||||
|     public function __construct() | ||||
|     { | ||||
|         parent::__construct(); | ||||
|     } | ||||
| } | ||||
|   | ||||
							
								
								
									
										14
									
								
								application/src/Entity/Source/Data/Name/SurnameSource.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										14
									
								
								application/src/Entity/Source/Data/Name/SurnameSource.php
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,14 @@ | ||||
| <?php | ||||
|  | ||||
| namespace App\Entity\Source\Data\Name; | ||||
|  | ||||
| use Doctrine\ORM\Mapping as ORM; | ||||
|  | ||||
| /** | ||||
|  * @author kevinfrantz | ||||
|  * @ORM\Table(name="source_data_name_surname") | ||||
|  * @ORM\Entity() | ||||
|  */ | ||||
| final class SurnameSource extends AbstractNameSource implements SurnameSourceInterface | ||||
| { | ||||
| } | ||||
		Reference in New Issue
	
	Block a user