Overview
SHA1:acf4eb6f46c9c6bababa6d848a6c1854eac9c887
Date: 2019-02-19 16:55:22
User: bohwaz
Comment:Corrections mineures
Timelines: family | ancestors | descendants | both | dev
Downloads: Tarball | ZIP archive
Other Links: files | file ages | folders | manifest
Tags And Properties
Context
2019-02-20
11:27
[72996fb296] Correction avertissements PHPstan (user: bohwaz, tags: dev)
2019-02-19
16:55
[acf4eb6f46] Corrections mineures (user: bohwaz, tags: dev)
16:20
[df4616eedb] Correction notices retournées par PHPStan (user: bohwaz, tags: dev)
Changes

Modified src/include/data/schema.sql from [67ca2845bf] to [d06d0af8c9].

316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
(
    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 NOT NULL, -- Compte affecté par cette catégorie

    FOREIGN KEY(compte) REFERENCES compta_comptes(id) ON DELETE CASCADE
);

CREATE TABLE IF NOT EXISTS plugins
(
    id TEXT NOT NULL PRIMARY KEY,
    officiel INTEGER NOT NULL DEFAULT 0,
    nom TEXT NOT 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
..
50
51
52
53
54
55
56





57
58
59


60
61
62
63
64
65
66
<?php

namespace Garradin;



class Entity
{


	protected $id;
	protected $table;
	protected $modified = [];

	public function __construct($id = null)
	{
		if (null === $this->table)
................................................................................
			$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);




>
>


>
>







 







>
>
>
>
>



>
>







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
..
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
<?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)
................................................................................
			$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);