mirror of
https://github.com/ad-aures/castopod.git
synced 2026-04-14 20:17:46 +02:00
chore(phpstan): remove redundant dynamicConstantNames
+ update quality tools
This commit is contained in:
parent
cc19c24668
commit
2dd9cc9ef5
18 changed files with 110 additions and 110 deletions
|
|
@ -716,7 +716,7 @@ class PodcastController extends BaseController
|
|||
$post = (new PostModel())->where('episode_id', $episode->id)
|
||||
->first();
|
||||
|
||||
if ($post !== null) {
|
||||
if ($post instanceof Post) {
|
||||
$post->published_at = $episode->published_at;
|
||||
$postModel = new PostModel();
|
||||
if (! $postModel->update($post->id, $post)) {
|
||||
|
|
@ -819,7 +819,7 @@ class PodcastController extends BaseController
|
|||
|
||||
$newPostMessage = $this->request->getPost('message');
|
||||
|
||||
if ($post !== null) {
|
||||
if ($post instanceof Post) {
|
||||
if ($newPostMessage !== '') {
|
||||
// edit post if post exists and message is not empty
|
||||
$post->message = $newPostMessage;
|
||||
|
|
@ -884,7 +884,7 @@ class PodcastController extends BaseController
|
|||
$post = (new PostModel())->where('episode_id', $episode->id)
|
||||
->first();
|
||||
|
||||
if ($post !== null) {
|
||||
if ($post instanceof Post) {
|
||||
$post->published_at = $episode->published_at;
|
||||
$postModel = new PostModel();
|
||||
if (! $postModel->update($post->id, $post)) {
|
||||
|
|
@ -927,7 +927,7 @@ class PodcastController extends BaseController
|
|||
'episode_id' => null,
|
||||
])
|
||||
->first();
|
||||
if ($post !== null) {
|
||||
if ($post instanceof Post) {
|
||||
$postModel->removePost($post);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue