mirror of
https://github.com/ad-aures/castopod.git
synced 2026-04-12 19:17:45 +02:00
build: add phpstan-codeigniter extension to manage config(), model() and service() functions
This commit is contained in:
parent
ae57601c83
commit
77c2d08b6e
15 changed files with 181 additions and 41 deletions
|
|
@ -101,9 +101,9 @@ class EpisodeAudioController extends Controller
|
|||
$subscription = null;
|
||||
|
||||
// check if podcast is already unlocked before any token validation
|
||||
if ($this->episode->is_premium && ($subscription = service('premium_podcasts')->subscription(
|
||||
if ($this->episode->is_premium && ! ($subscription = service('premium_podcasts')->subscription(
|
||||
$this->episode->podcast->handle
|
||||
)) === null) {
|
||||
)) instanceof Subscription) {
|
||||
// look for token as GET parameter
|
||||
if (($token = $this->request->getGet('token')) === null) {
|
||||
return $this->response->setStatusCode(401)
|
||||
|
|
@ -164,7 +164,7 @@ class EpisodeAudioController extends Controller
|
|||
$audioDuration,
|
||||
$this->episode->published_at->getTimestamp(),
|
||||
$serviceName,
|
||||
$subscription !== null ? $subscription->id : null
|
||||
$subscription instanceof Subscription ? $subscription->id : null
|
||||
);
|
||||
|
||||
return redirect()->to($this->analyticsConfig->getAudioUrl($this->episode, $this->request->getGet()));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue