mirror of
https://github.com/ad-aures/castopod.git
synced 2026-04-16 04:57:46 +02:00
refactor: update code base to php 8 and set phpstan lvl to 6
This commit is contained in:
parent
4a33c50fb6
commit
6b74a9e98a
124 changed files with 1810 additions and 2157 deletions
|
|
@ -26,18 +26,17 @@ class PodcastController extends BaseController
|
|||
*/
|
||||
protected $podcast;
|
||||
|
||||
/**
|
||||
*
|
||||
* @param array<string> $params
|
||||
* @return static|string
|
||||
*/
|
||||
public function _remap(string $method, ...$params)
|
||||
public function _remap(string $method, string ...$params): mixed
|
||||
{
|
||||
if (count($params) === 0) {
|
||||
return $this->$method();
|
||||
}
|
||||
|
||||
if ($this->podcast = (new PodcastModel())->getPodcastById($params[0])) {
|
||||
if (
|
||||
($this->podcast = (new PodcastModel())->getPodcastById(
|
||||
(int) $params[0],
|
||||
)) !== null
|
||||
) {
|
||||
return $this->$method();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue