mirror of
				https://github.com/kevinveenbirkenbach/infinito.git
				synced 2025-10-31 01:09:41 +00:00 
			
		
		
		
	Implemented RequestedSource
This commit is contained in:
		| @@ -0,0 +1,12 @@ | ||||
| <?php | ||||
|  | ||||
| namespace App\Domain\SourceManagement; | ||||
|  | ||||
| use App\Entity\Source\AbstractSource; | ||||
|  | ||||
| /** | ||||
|  * @author kevinfrantz | ||||
|  */ | ||||
| final class RequestedSource extends AbstractSource implements RequestedSourceInterface | ||||
| { | ||||
| } | ||||
| @@ -0,0 +1,12 @@ | ||||
| <?php | ||||
|  | ||||
| namespace App\Domain\SourceManagement; | ||||
|  | ||||
| use App\Entity\Source\SourceInterface; | ||||
|  | ||||
| /** | ||||
|  * @author kevinfrantz | ||||
|  */ | ||||
| interface RequestedSourceInterface extends SourceInterface | ||||
| { | ||||
| } | ||||
| @@ -4,6 +4,7 @@ namespace App\Repository\Source; | ||||
|  | ||||
| use Doctrine\ORM\EntityRepository; | ||||
| use App\Entity\Source\SourceInterface; | ||||
| use App\Domain\SourceManagement\RequestedSourceInterface; | ||||
|  | ||||
| final class SourceRepository extends EntityRepository | ||||
| { | ||||
| @@ -22,11 +23,11 @@ final class SourceRepository extends EntityRepository | ||||
|     /** | ||||
|      * Loads a source by id or if not defined, by slug. | ||||
|      * | ||||
|      * @param SourceInterface $requestedSource | ||||
|      * @param RequestedSourceInterface $requestedSource | ||||
|      * | ||||
|      * @return SourceInterface|null | ||||
|      */ | ||||
|     public function findOneByIdOrSlug(SourceInterface $requestedSource): ?SourceInterface | ||||
|     public function findOneByIdOrSlug(RequestedSourceInterface $requestedSource): ?SourceInterface | ||||
|     { | ||||
|         try { | ||||
|             return $this->find($requestedSource->getId()); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user