refactor: update code base to php 8 and set phpstan lvl to 6

This commit is contained in:
Yassine Doghri 2021-05-14 17:59:35 +00:00
commit 6b74a9e98a
No known key found for this signature in database
GPG key ID: 3E7F89498B960C9F
124 changed files with 1810 additions and 2157 deletions

View file

@ -8,12 +8,19 @@
namespace App\Models;
use App\Entities\Note;
use ActivityPub\Models\NoteModel as ActivityPubNoteModel;
class NoteModel extends ActivityPubNoteModel
{
protected $returnType = \App\Entities\Note::class;
/**
* @var string
*/
protected $returnType = Note::class;
/**
* @var string[]
*/
protected $allowedFields = [
'id',
'uri',
@ -33,9 +40,9 @@ class NoteModel extends ActivityPubNoteModel
/**
* Retrieves all published notes for a given episode ordered by publication date
*
* @return \App\Entities\Note[]
* @return Note[]
*/
public function getEpisodeNotes($episodeId)
public function getEpisodeNotes(int $episodeId): array
{
return $this->where([
'episode_id' => $episodeId,