Overview
Comment: | Corrections mineures |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | dev |
Files: | files | file ages | folders |
SHA1: |
acf4eb6f46c9c6bababa6d848a6c1854 |
User & Date: | bohwaz on 2019-02-19 16:55:22 |
Other Links: | branch diff | manifest | tags |
Context
2019-02-20
| ||
11:27 | Correction avertissements PHPstan check-in: 72996fb296 user: bohwaz tags: dev | |
2019-02-19
| ||
16:55 | Corrections mineures check-in: acf4eb6f46 user: bohwaz tags: dev | |
16:20 | Correction notices retournées par PHPStan check-in: df4616eedb user: bohwaz tags: dev | |
Changes
Modified src/include/data/schema.sql from [67ca2845bf] to [d06d0af8c9].
︙ | ︙ | |||
316 317 318 319 320 321 322 | ( id INTEGER NOT NULL PRIMARY KEY, type INTEGER NOT NULL DEFAULT 1, -- 1 = recette, -1 = dépense, 0 = autre (utilisé uniquement pour l'interface) intitule TEXT NOT NULL, description TEXT NULL, | < < | | 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 | ( id INTEGER NOT NULL PRIMARY KEY, type INTEGER NOT NULL DEFAULT 1, -- 1 = recette, -1 = dépense, 0 = autre (utilisé uniquement pour l'interface) intitule TEXT NOT NULL, description TEXT NULL, compte TEXT NULL REFERENCES compta_comptes(id) ON DELETE CASCADE -- Compte affecté par cette catégorie ); CREATE TABLE IF NOT EXISTS plugins ( id TEXT NOT NULL PRIMARY KEY, officiel INTEGER NOT NULL DEFAULT 0, nom TEXT NOT NULL, |
︙ | ︙ |
Modified src/include/lib/Garradin/Compta/Mouvement.php from [d2c5a12a70] to [84872ed692].
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | <?php namespace Garradin\Compta; use Garradin\Entity; use Garradin\ValidationException; use Garradin\DB; class Mouvement extends Entity { protected $table = 'compta_mouvements'; protected $id; protected $libelle; | > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | <?php namespace Garradin\Compta; use Garradin\Entity; use Garradin\ValidationException; use Garradin\DB; use Garradin\Config; class Mouvement extends Entity { protected $table = 'compta_mouvements'; protected $id; protected $libelle; |
︙ | ︙ |
Modified src/include/lib/Garradin/Entity.php from [3a141ae570] to [ecdd24ee0e].
1 2 3 4 5 6 7 8 9 10 11 12 13 | <?php namespace Garradin; class Entity { protected $id; protected $table; protected $modified = []; public function __construct($id = null) { if (null === $this->table) | > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | <?php namespace Garradin; use KD2\Form; class Entity { const FIELDS = []; protected $id; protected $table; protected $modified = []; public function __construct($id = null) { if (null === $this->table) |
︙ | ︙ | |||
50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 | $return = $db->update($this->table, $this->modified, 'id = :id', ['id' => $this->id]); } $this->modified = []; return $return; } final protected function selfValidate() { if (!Form::validate($this::FIELDS, $errors, $this->toArray())) { $messages = []; foreach ($errors as $error) { $messages[] = $this->getValidationMessage($error); | > > > > > > > | 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 | $return = $db->update($this->table, $this->modified, 'id = :id', ['id' => $this->id]); } $this->modified = []; return $return; } public function selfCheck() { return true; } final protected function selfValidate() { $errors = []; if (!Form::validate($this::FIELDS, $errors, $this->toArray())) { $messages = []; foreach ($errors as $error) { $messages[] = $this->getValidationMessage($error); |
︙ | ︙ |