refactor: add phpstan and update code to adhere to level 5

- move and refactor Image.php from Libraries to Entities folder
- update some database field names
/ types
- update composer packages
This commit is contained in:
Yassine Doghri 2021-05-12 14:00:25 +00:00
commit 231d578d64
No known key found for this signature in database
GPG key ID: 3E7F89498B960C9F
148 changed files with 11189 additions and 11421 deletions

View file

@ -10,6 +10,16 @@ namespace App\Entities;
use CodeIgniter\Entity\Entity;
/**
* @property int $id
* @property int $podcast_id
* @property int $episode_id
* @property double $start_time
* @property double $duration
* @property string|null $label
* @property int $created_by
* @property int $updated_by
*/
class Soundbite extends Entity
{
/**
@ -19,17 +29,10 @@ class Soundbite extends Entity
'id' => 'integer',
'podcast_id' => 'integer',
'episode_id' => 'integer',
'start_time' => 'float',
'duration' => 'float',
'start_time' => 'double',
'duration' => 'double',
'label' => '?string',
'created_by' => 'integer',
'updated_by' => 'integer',
];
public function setUpdatedBy(User $user): self
{
$this->attributes['updated_by'] = $user->id;
return $this;
}
}