few coderules changes

This commit is contained in:
osaajani 2019-10-29 18:36:25 +01:00
parent 80b6a3ed86
commit 117c18ddca
28 changed files with 1485 additions and 1666 deletions

View file

@ -1,29 +1,29 @@
<?php
namespace controllers\internals;
class Setting extends \InternalController
class Setting extends \descartes\InternalController
{
private $model_setting;
public function __construct (\PDO $bdd)
public function __construct(\PDO $bdd)
{
$this->model_setting = new \models\Setting($bdd);
}
/**
/**
* Return all settings
* @return array || false
*/
public function all ()
{
*/
public function all()
{
return $this->model_setting->all();
}
}
/**
/**
* Update a setting by his name
*/
public function update (string $name, $value) : boolean
*/
public function update(string $name, $value) : boolean
{
return (bool) $this->model_setting->update($name, $value);
}
}
}