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
|
* @param int|null $since
|
||||||
* @return JSONResponse
|
* @return JSONResponse
|
||||||
* @throws \Exception
|
|
||||||
*/
|
*/
|
||||||
public function list(int $since = null): JSONResponse {
|
public function list(int $since = null): JSONResponse {
|
||||||
$sinceDatetime = $this->createDateTimeFromTimestamp($since);
|
$sinceDatetime = $this->createDateTimeFromTimestamp($since);
|
||||||
@ -66,7 +65,6 @@ class SubscriptionChangeController extends Controller {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @param int|null $since
|
* @param int|null $since
|
||||||
*
|
|
||||||
* @return DateTime
|
* @return DateTime
|
||||||
*/
|
*/
|
||||||
private function createDateTimeFromTimestamp(?int $since): DateTime {
|
private function createDateTimeFromTimestamp(?int $since): DateTime {
|
||||||
@ -77,7 +75,6 @@ class SubscriptionChangeController extends Controller {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @param array $allSubscribed
|
* @param array $allSubscribed
|
||||||
*
|
|
||||||
* @return mixed
|
* @return mixed
|
||||||
*/
|
*/
|
||||||
private function extractUrlList(array $allSubscribed): array {
|
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
|
public function findByEpisodeIdentifier(string $episodeIdentifier, string $userId) : ?EpisodeActionEntity
|
||||||
{
|
{
|
||||||
$qb = $this->db->getQueryBuilder();
|
$qb = $this->db->getQueryBuilder();
|
||||||
|
@ -30,6 +30,11 @@ class EpisodeActionRepository {
|
|||||||
return $episodeActions;
|
return $episodeActions;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param string $identifier
|
||||||
|
* @param string $userId
|
||||||
|
* @return EpisodeAction|null
|
||||||
|
*/
|
||||||
public function findByEpisodeIdentifier(string $identifier, string $userId): ?EpisodeAction {
|
public function findByEpisodeIdentifier(string $identifier, string $userId): ?EpisodeAction {
|
||||||
$episodeActionEntity = $this->episodeActionMapper->findByEpisodeIdentifier($identifier, $userId);
|
$episodeActionEntity = $this->episodeActionMapper->findByEpisodeIdentifier($identifier, $userId);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user