-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #68 from VSVverkeerskunde/feature/VSVGVQ-106
VSVGVQ-106 Add Projections for Statistics.
- Loading branch information
Showing
62 changed files
with
3,772 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
<?php declare(strict_types=1); | ||
|
||
namespace VSV\GVQ_API\Question\Repositories; | ||
|
||
use Ramsey\Uuid\UuidInterface; | ||
use VSV\GVQ_API\Common\Repositories\AbstractDoctrineRepository; | ||
use VSV\GVQ_API\Question\Models\Answer; | ||
use VSV\GVQ_API\Question\Repositories\Entities\AnswerEntity; | ||
|
||
class AnswerDoctrineRepository extends AbstractDoctrineRepository implements AnswerRepository | ||
{ | ||
/** | ||
* @inheritdoc | ||
*/ | ||
protected function getRepositoryName(): string | ||
{ | ||
return AnswerEntity::class; | ||
} | ||
|
||
/** | ||
* @inheritdoc | ||
*/ | ||
public function getById(UuidInterface $id): ?Answer | ||
{ | ||
/** @var AnswerEntity|null $answerEntity */ | ||
$answerEntity = $this->objectRepository->findOneBy( | ||
[ | ||
'id' => $id, | ||
] | ||
); | ||
|
||
return $answerEntity ? $answerEntity->toAnswer() : null; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<?php declare(strict_types=1); | ||
|
||
namespace VSV\GVQ_API\Question\Repositories; | ||
|
||
use Ramsey\Uuid\UuidInterface; | ||
use VSV\GVQ_API\Question\Models\Answer; | ||
|
||
interface AnswerRepository | ||
{ | ||
/** | ||
* @param UuidInterface $id | ||
* @return null|Answer | ||
*/ | ||
public function getById(UuidInterface $id): ?Answer; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.