mirror of
https://github.com/ad-aures/castopod.git
synced 2026-04-16 13:07:46 +02:00
style(ecs): add easy-coding-standard to enforce coding style rules for php
- update .devcontainer settings: remove auto-formatting for php + set intelephense as default formatter - remove prettier php plugin as it lacks php 8 support - add captain hook action for checking style pre-commit - fix style with ecs on all files except views
This commit is contained in:
parent
fb3593f828
commit
aa1612342e
230 changed files with 3420 additions and 5884 deletions
|
|
@ -9,7 +9,6 @@
|
|||
namespace App\Models;
|
||||
|
||||
use App\Entities\Language;
|
||||
use CodeIgniter\Database\Exceptions\DataException;
|
||||
use CodeIgniter\Model;
|
||||
|
||||
class LanguageModel extends Model
|
||||
|
|
@ -18,6 +17,7 @@ class LanguageModel extends Model
|
|||
* @var string
|
||||
*/
|
||||
protected $table = 'languages';
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
|
|
@ -32,6 +32,7 @@ class LanguageModel extends Model
|
|||
* @var string
|
||||
*/
|
||||
protected $returnType = Language::class;
|
||||
|
||||
/**
|
||||
* @var bool
|
||||
*/
|
||||
|
|
@ -47,7 +48,7 @@ class LanguageModel extends Model
|
|||
*/
|
||||
public function getLanguageOptions(): array
|
||||
{
|
||||
if (!($options = cache('language_options'))) {
|
||||
if (! ($options = cache('language_options'))) {
|
||||
$languages = $this->findAll();
|
||||
|
||||
$options = array_reduce(
|
||||
|
|
@ -59,7 +60,8 @@ class LanguageModel extends Model
|
|||
[],
|
||||
);
|
||||
|
||||
cache()->save('language_options', $options, DECADE);
|
||||
cache()
|
||||
->save('language_options', $options, DECADE);
|
||||
}
|
||||
|
||||
return $options;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue