Add check for EpisodeAction properties
- also add type hints and phpdocs - add additional unit tests - set integer types in EpisodeActionEntity - correctly call static methods - improve exception handling in EpisodeActionSaver - remove unused method EpisodeActionWriter::purge()
This commit is contained in:
parent
b41a57d3a5
commit
056b12a667
@ -53,7 +53,6 @@ class SubscriptionChangeController extends Controller {
|
||||
*
|
||||
* @param int|null $since
|
||||
* @return JSONResponse
|
||||
* @throws \Exception
|
||||
*/
|
||||
public function list(int $since = null): JSONResponse {
|
||||
$sinceDatetime = $this->createDateTimeFromTimestamp($since);
|
||||
@ -66,7 +65,6 @@ class SubscriptionChangeController extends Controller {
|
||||
|
||||
/**
|
||||
* @param int|null $since
|
||||
*
|
||||
* @return DateTime
|
||||
*/
|
||||
private function createDateTimeFromTimestamp(?int $since): DateTime {
|
||||
@ -77,7 +75,6 @@ class SubscriptionChangeController extends Controller {
|
||||
|
||||
/**
|
||||
* @param array $allSubscribed
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
private function extractUrlList(array $allSubscribed): array {
|
||||
|
@ -38,6 +38,11 @@ class EpisodeActionMapper extends QBMapper
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $episodeIdentifier
|
||||
* @param string $userId
|
||||
* @return EpisodeActionEntity|null
|
||||
*/
|
||||
public function findByEpisodeIdentifier(string $episodeIdentifier, string $userId) : ?EpisodeActionEntity
|
||||
{
|
||||
$qb = $this->db->getQueryBuilder();
|
||||
|
@ -30,6 +30,11 @@ class EpisodeActionRepository {
|
||||
return $episodeActions;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $identifier
|
||||
* @param string $userId
|
||||
* @return EpisodeAction|null
|
||||
*/
|
||||
public function findByEpisodeIdentifier(string $identifier, string $userId): ?EpisodeAction {
|
||||
$episodeActionEntity = $this->episodeActionMapper->findByEpisodeIdentifier($identifier, $userId);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user