From 802f5135b0979bab3bf30ae1733f9867e2caed7a Mon Sep 17 00:00:00 2001 From: vincent-peugnet Date: Fri, 17 Apr 2020 19:01:05 +0200 Subject: apply psr12 --- app/class/Modeldb.php | 71 ++++++++++++++++++++++++--------------------------- 1 file changed, 33 insertions(+), 38 deletions(-) (limited to 'app/class/Modeldb.php') diff --git a/app/class/Modeldb.php b/app/class/Modeldb.php index 953521f..784b45f 100644 --- a/app/class/Modeldb.php +++ b/app/class/Modeldb.php @@ -9,42 +9,37 @@ use Wcms\Flywheel\Repository; class Modeldb extends Model { - protected $database; - /** @var Repository */ - protected $repo; - - - public function __construct() - { - $this->dbinit(); - } - - - public function dbinit($dir = Model::DATABASE_DIR) - { - $this->database = new Flywheel\Config($dir , [ - 'query_class' => Query::class, - 'formatter' => new JSON, - ]); - } - - public function storeinit(string $repo) - { - $this->repo = new Repository($repo, $this->database); - } - - /** - * List every IDs of a database - * - * @return array of ID strings - */ - public function list() : array - { - return $this->repo->getAllIds(); - } - - - - - + protected $database; + /** @var Repository */ + protected $repo; + + + public function __construct() + { + $this->dbinit(); + } + + + public function dbinit($dir = Model::DATABASE_DIR) + { + $this->database = new Flywheel\Config($dir, [ + 'query_class' => Query::class, + 'formatter' => new JSON(), + ]); + } + + public function storeinit(string $repo) + { + $this->repo = new Repository($repo, $this->database); + } + + /** + * List every IDs of a database + * + * @return array of ID strings + */ + public function list(): array + { + return $this->repo->getAllIds(); + } } -- cgit v1.2.3