mirror of
https://github.com/RaspbianFrance/raspisms.git
synced 2025-05-14 20:16:27 +02:00
Fix style and add config file to php-cs-fixer
This commit is contained in:
parent
485a0cb6fd
commit
fab9e256ab
40 changed files with 2360 additions and 1128 deletions
models
|
@ -1,24 +1,38 @@
|
|||
<?php
|
||||
namespace models;
|
||||
|
||||
/*
|
||||
* This file is part of PHP CS Fixer.
|
||||
*
|
||||
* (c) Fabien Potencier <fabien@symfony.com>
|
||||
* Dariusz Rumiński <dariusz.ruminski@gmail.com>
|
||||
*
|
||||
* This source file is subject to the MIT license that is bundled
|
||||
* with this source code in the file LICENSE.
|
||||
*/
|
||||
|
||||
namespace models;
|
||||
|
||||
/**
|
||||
* Cette classe gère les accès bdd pour les settinges
|
||||
* Cette classe gère les accès bdd pour les settinges.
|
||||
*/
|
||||
class Setting extends \descartes\Model
|
||||
{
|
||||
/**
|
||||
* Return array of all settings
|
||||
* Return array of all settings.
|
||||
*/
|
||||
public function all() : array
|
||||
public function all(): array
|
||||
{
|
||||
return $this->_select('setting', [], '', false);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Update a setting by his name
|
||||
* Update a setting by his name.
|
||||
*
|
||||
* @param mixed $value
|
||||
*
|
||||
* @return int : number of modified lines
|
||||
*/
|
||||
public function update(string $name, $value) : int
|
||||
public function update(string $name, $value): int
|
||||
{
|
||||
return $this->_update('setting', ['value' => $value], ['name' => $name]);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue