castopod/app/Libraries/Analytics/Entities/AnalyticsPodcastsByCountry.php
Yassine Doghri 231d578d64
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
2021-05-12 14:00:25 +00:00

45 lines
938 B
PHP

<?php
/**
* Class AnalyticsPodcastsByCountry
* Entity for AnalyticsPodcastsByCountry
* @copyright 2020 Podlibre
* @license https://www.gnu.org/licenses/agpl-3.0.en.html AGPL3
* @link https://castopod.org/
*/
namespace Analytics\Entities;
use CodeIgniter\Entity\Entity;
/**
* @property int $podcast_id
* @property string $country_code
* @property string $labels
* @property Time $date
* @property int $hits
* @property Time $created_at
* @property Time $updated_at
*/
class AnalyticsPodcastsByCountry extends Entity
{
/**
* @var string[]
*/
protected $dates = ['date', 'created_at', 'updated_at'];
/**
* @var array<string, string>
*/
protected $casts = [
'podcast_id' => 'integer',
'country_code' => 'string',
'hits' => 'integer',
];
public function getLabels()
{
return lang('Countries.' . $this->attributes['labels']);
}
}