diff options
| author | 2023-03-27 00:36:21 +0200 | |
|---|---|---|
| committer | 2023-03-27 00:36:21 +0200 | |
| commit | 0317683155a3966830f3972fde1562087f65cf94 (patch) | |
| tree | d2806e337c54d449704e6a8f3f8d1887d6c174f2 /app/Models/Log.php | |
| parent | f3af3f0f3d4da8023c5e918545d47a51afc4b6c1 (diff) | |
Add test and type hinting (#5087)
* - Add test and type hinting
- pass PhpStan Level 9
* fix dump
* fix style
* fix visibility
* fix style
* add test
* add test
* add test
* add test
* add test
* Simplify
* cleaning after test
* remove space
* fix style
* use specific log file for test
* Remarque's from Alkarex
* A few more details
---------
Co-authored-by: Luc <sanchezluc+freshrss@gmail.com>
Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
Diffstat (limited to 'app/Models/Log.php')
| -rw-r--r-- | app/Models/Log.php | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/app/Models/Log.php b/app/Models/Log.php index df2de72ac..72208513d 100644 --- a/app/Models/Log.php +++ b/app/Models/Log.php @@ -1,26 +1,29 @@ <?php class FreshRSS_Log extends Minz_Model { + /** @var string */ private $date; + /** @var string */ private $level; + /** @var string */ private $information; - public function date() { + public function date(): string { return $this->date; } - public function level() { + public function level(): string { return $this->level; } - public function info() { + public function info(): string { return $this->information; } - public function _date($date) { + public function _date(string $date): void { $this->date = $date; } - public function _level($level) { + public function _level(string $level): void { $this->level = $level; } - public function _info($information) { + public function _info(string $information): void { $this->information = $information; } } |
