mirror of
https://code.castopod.org/adaures/castopod
synced 2025-04-19 13:01:19 +00:00
fix: declare typed properties in PHPDoc for php<7.4
- fixes error when running castopod on php<7.4 fixes #23
This commit is contained in:
parent
7fb1de2cf3
commit
14dd44d03d
@ -1,4 +1,4 @@
|
||||
FROM php:latest
|
||||
FROM php:7.2-fpm
|
||||
|
||||
COPY --from=composer /usr/bin/composer /usr/bin/composer
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
FROM php:latest
|
||||
FROM php:7.2-fpm
|
||||
|
||||
COPY . /castopod
|
||||
WORKDIR /castopod
|
||||
|
@ -287,7 +287,7 @@ $routes->group(
|
||||
$routes->get('forgot', 'AuthController::forgotPassword', [
|
||||
'as' => 'forgot',
|
||||
]);
|
||||
$routes->post('forgot', 'Auth::attemptForgot');
|
||||
$routes->post('forgot', 'AuthController::attemptForgot');
|
||||
$routes->get('reset-password', 'AuthController::resetPassword', [
|
||||
'as' => 'reset-password',
|
||||
]);
|
||||
|
@ -14,8 +14,15 @@ use App\Models\UserModel;
|
||||
|
||||
class Contributor extends BaseController
|
||||
{
|
||||
protected \App\Entities\Podcast $podcast;
|
||||
protected ?\App\Entities\User $user;
|
||||
/**
|
||||
* @var \App\Entities\Podcast
|
||||
*/
|
||||
protected $podcast;
|
||||
|
||||
/**
|
||||
* @var \App\Entities\User|null
|
||||
*/
|
||||
protected $user;
|
||||
|
||||
public function _remap($method, ...$params)
|
||||
{
|
||||
|
@ -13,8 +13,15 @@ use App\Models\PodcastModel;
|
||||
|
||||
class Episode extends BaseController
|
||||
{
|
||||
protected \App\Entities\Podcast $podcast;
|
||||
protected ?\App\Entities\Episode $episode;
|
||||
/**
|
||||
* @var \App\Entities\Podcast
|
||||
*/
|
||||
protected $podcast;
|
||||
|
||||
/**
|
||||
* @var \App\Entities\Episode|null
|
||||
*/
|
||||
protected $episode;
|
||||
|
||||
public function _remap($method, ...$params)
|
||||
{
|
||||
|
@ -15,7 +15,10 @@ use Config\Services;
|
||||
|
||||
class Podcast extends BaseController
|
||||
{
|
||||
protected ?\App\Entities\Podcast $podcast;
|
||||
/**
|
||||
* @var \App\Entities\Podcast|null
|
||||
*/
|
||||
protected $podcast;
|
||||
|
||||
public function _remap($method, ...$params)
|
||||
{
|
||||
|
@ -14,7 +14,10 @@ use Config\Services;
|
||||
|
||||
class User extends BaseController
|
||||
{
|
||||
protected ?\App\Entities\User $user;
|
||||
/**
|
||||
* @var \App\Entities\User|null
|
||||
*/
|
||||
protected $user;
|
||||
|
||||
public function _remap($method, ...$params)
|
||||
{
|
||||
|
@ -13,8 +13,15 @@ use App\Models\PodcastModel;
|
||||
|
||||
class Episode extends BaseController
|
||||
{
|
||||
protected \App\Entities\Podcast $podcast;
|
||||
protected ?\App\Entities\Episode $episode;
|
||||
/**
|
||||
* @var \App\Entities\Podcast
|
||||
*/
|
||||
protected $podcast;
|
||||
|
||||
/**
|
||||
* @var \App\Entities\Episode|null
|
||||
*/
|
||||
protected $episode;
|
||||
|
||||
public function _remap($method, ...$params)
|
||||
{
|
||||
|
@ -12,7 +12,10 @@ use App\Models\PodcastModel;
|
||||
|
||||
class Podcast extends BaseController
|
||||
{
|
||||
protected ?\App\Entities\Podcast $podcast;
|
||||
/**
|
||||
* @var \App\Entities\Podcast|null
|
||||
*/
|
||||
protected $podcast;
|
||||
|
||||
public function _remap($method, ...$params)
|
||||
{
|
||||
|
@ -13,6 +13,9 @@ use CodeIgniter\Entity;
|
||||
|
||||
class Category extends Entity
|
||||
{
|
||||
/**
|
||||
* @var \App\Entity\Category|null
|
||||
*/
|
||||
protected $parent;
|
||||
|
||||
protected $casts = [
|
||||
|
@ -14,17 +14,60 @@ use League\CommonMark\CommonMarkConverter;
|
||||
|
||||
class Episode extends Entity
|
||||
{
|
||||
protected \App\Entities\Podcast $podcast;
|
||||
protected string $GUID;
|
||||
protected string $link;
|
||||
protected \CodeIgniter\Files\File $image;
|
||||
protected string $image_media_path;
|
||||
protected string $image_url;
|
||||
protected \CodeIgniter\Files\File $enclosure;
|
||||
protected string $enclosure_media_path;
|
||||
protected string $enclosure_url;
|
||||
protected array $enclosure_metadata;
|
||||
protected string $description_html;
|
||||
/**
|
||||
* @var \App\Entities\Podcast
|
||||
*/
|
||||
protected $podcast;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $GUID;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $link;
|
||||
|
||||
/**
|
||||
* @var \CodeIgniter\Files\File
|
||||
*/
|
||||
protected $image;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $image_media_path;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $image_url;
|
||||
|
||||
/**
|
||||
* @var \CodeIgniter\Files\File
|
||||
*/
|
||||
protected $enclosure;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $enclosure_media_path;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $enclosure_url;
|
||||
|
||||
/**
|
||||
* @var array
|
||||
*/
|
||||
protected $enclosure_metadata;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $description_html;
|
||||
|
||||
protected $casts = [
|
||||
'slug' => 'string',
|
||||
|
@ -15,14 +15,45 @@ use League\CommonMark\CommonMarkConverter;
|
||||
|
||||
class Podcast extends Entity
|
||||
{
|
||||
protected string $link;
|
||||
protected \CodeIgniter\Files\File $image;
|
||||
protected string $image_media_path;
|
||||
protected string $image_url;
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $link;
|
||||
|
||||
/**
|
||||
* @var \CodeIgniter\Files\File
|
||||
*/
|
||||
protected $image;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $image_media_path;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $image_url;
|
||||
|
||||
/**
|
||||
* @var \App\Entities\Episode[]
|
||||
*/
|
||||
protected $episodes;
|
||||
protected \App\Entities\User $owner;
|
||||
|
||||
/**
|
||||
* @var
|
||||
*/
|
||||
protected $owner;
|
||||
|
||||
/**
|
||||
* @var \App\Entities\User[]
|
||||
*/
|
||||
protected $contributors;
|
||||
protected string $description_html;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $description_html;
|
||||
|
||||
protected $casts = [
|
||||
'id' => 'integer',
|
||||
|
@ -13,10 +13,10 @@ class User extends \Myth\Auth\Entities\User
|
||||
protected $podcasts = [];
|
||||
|
||||
/**
|
||||
* The podcast user is contributing to
|
||||
* @var \App\Entities\Podcast
|
||||
* The podcast the user is contributing to
|
||||
* @var \App\Entities\Podcast|null
|
||||
*/
|
||||
protected $podcast;
|
||||
protected $podcast = null;
|
||||
|
||||
/**
|
||||
* Array of field names and the type of value to cast them as
|
||||
@ -49,6 +49,11 @@ class User extends \Myth\Auth\Entities\User
|
||||
return $this->podcasts;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a podcast the user is contributing to
|
||||
*
|
||||
* @return \App\Entities\Podcast
|
||||
*/
|
||||
public function getPodcast()
|
||||
{
|
||||
if (empty($this->podcast_id)) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user