Skip to content
This repository has been archived by the owner on Oct 5, 2021. It is now read-only.

Commit

Permalink
PHP CodeSniffer (#59)
Browse files Browse the repository at this point in the history
* Initial runthrough with phpcs
* Slowly working on manually fixing the rest...
* More fixes
* Actually done!
* Bump
* Fixed most of the warnings
* More automated fixes
* xml pls
* More fixes and biz
* fix
* Fixing underscore stuff
  • Loading branch information
jtdroste authored Apr 19, 2017
1 parent 507fa2c commit 9cf636d
Show file tree
Hide file tree
Showing 77 changed files with 6,818 additions and 6,563 deletions.
74 changes: 38 additions & 36 deletions app/Config/Schema/db_acl.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,44 +26,46 @@
*/
class DbAclSchema extends CakeSchema {

public function before($event = array()) {
return true;
}
public function before($event = []) {
return true;
}

public function after($event = array()) {
}
public function after($event = []) {
}

public $acos = array(
'id' => array('type' => 'integer', 'null' => false, 'default' => null, 'length' => 10, 'key' => 'primary'),
'parent_id' => array('type' => 'integer', 'null' => true, 'default' => null, 'length' => 10),
'model' => array('type' => 'string', 'null' => true),
'foreign_key' => array('type' => 'integer', 'null' => true, 'default' => null, 'length' => 10),
'alias' => array('type' => 'string', 'null' => true),
'lft' => array('type' => 'integer', 'null' => true, 'default' => null, 'length' => 10),
'rght' => array('type' => 'integer', 'null' => true, 'default' => null, 'length' => 10),
'indexes' => array('PRIMARY' => array('column' => 'id', 'unique' => 1))
);
public $acos = [
'id' => ['type' => 'integer', 'null' => false, 'default' => null, 'length' => 10, 'key' => 'primary'],
'parent_id' => ['type' => 'integer', 'null' => true, 'default' => null, 'length' => 10],
'model' => ['type' => 'string', 'null' => true],
'foreign_key' => ['type' => 'integer', 'null' => true, 'default' => null, 'length' => 10],
'alias' => ['type' => 'string', 'null' => true],
'lft' => ['type' => 'integer', 'null' => true, 'default' => null, 'length' => 10],
'rght' => ['type' => 'integer', 'null' => true, 'default' => null, 'length' => 10],
'indexes' => ['PRIMARY' => ['column' => 'id', 'unique' => 1]]
];

public $aros = array(
'id' => array('type' => 'integer', 'null' => false, 'default' => null, 'length' => 10, 'key' => 'primary'),
'parent_id' => array('type' => 'integer', 'null' => true, 'default' => null, 'length' => 10),
'model' => array('type' => 'string', 'null' => true),
'foreign_key' => array('type' => 'integer', 'null' => true, 'default' => null, 'length' => 10),
'alias' => array('type' => 'string', 'null' => true),
'lft' => array('type' => 'integer', 'null' => true, 'default' => null, 'length' => 10),
'rght' => array('type' => 'integer', 'null' => true, 'default' => null, 'length' => 10),
'indexes' => array('PRIMARY' => array('column' => 'id', 'unique' => 1))
);

public $aros_acos = array(
'id' => array('type' => 'integer', 'null' => false, 'default' => null, 'length' => 10, 'key' => 'primary'),
'aro_id' => array('type' => 'integer', 'null' => false, 'length' => 10, 'key' => 'index'),
'aco_id' => array('type' => 'integer', 'null' => false, 'length' => 10),
'_create' => array('type' => 'string', 'null' => false, 'default' => '0', 'length' => 2),
'_read' => array('type' => 'string', 'null' => false, 'default' => '0', 'length' => 2),
'_update' => array('type' => 'string', 'null' => false, 'default' => '0', 'length' => 2),
'_delete' => array('type' => 'string', 'null' => false, 'default' => '0', 'length' => 2),
'indexes' => array('PRIMARY' => array('column' => 'id', 'unique' => 1), 'ARO_ACO_KEY' => array('column' => array('aro_id', 'aco_id'), 'unique' => 1))
);
public $aros = [
'id' => ['type' => 'integer', 'null' => false, 'default' => null, 'length' => 10, 'key' => 'primary'],
'parent_id' => ['type' => 'integer', 'null' => true, 'default' => null, 'length' => 10],
'model' => ['type' => 'string', 'null' => true],
'foreign_key' => ['type' => 'integer', 'null' => true, 'default' => null, 'length' => 10],
'alias' => ['type' => 'string', 'null' => true],
'lft' => ['type' => 'integer', 'null' => true, 'default' => null, 'length' => 10],
'rght' => ['type' => 'integer', 'null' => true, 'default' => null, 'length' => 10],
'indexes' => ['PRIMARY' => ['column' => 'id', 'unique' => 1]]
];

public $aros_acos = [
'id' => ['type' => 'integer', 'null' => false, 'default' => null, 'length' => 10, 'key' => 'primary'],
'aro_id' => ['type' => 'integer', 'null' => false, 'length' => 10, 'key' => 'index'],
'aco_id' => ['type' => 'integer', 'null' => false, 'length' => 10],
'_create' => ['type' => 'string', 'null' => false, 'default' => '0', 'length' => 2],
'_read' => ['type' => 'string', 'null' => false, 'default' => '0', 'length' => 2],
'_update' => ['type' => 'string', 'null' => false, 'default' => '0', 'length' => 2],
'_delete' => ['type' => 'string', 'null' => false, 'default' => '0', 'length' => 2],
'indexes' => [
'PRIMARY' => ['column' => 'id', 'unique' => 1],
'ARO_ACO_KEY' => ['column' => ['aro_id', 'aco_id'], 'unique' => 1]
]
];
}
37 changes: 21 additions & 16 deletions app/Config/Schema/i18n.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,23 +28,28 @@
*/
class I18nSchema extends CakeSchema {

public $name = 'i18n';
public $name = 'i18n';

public function before($event = array()) {
return true;
}
public function before($event = []) {
return true;
}

public function after($event = array()) {
}

public $i18n = array(
'id' => array('type' => 'integer', 'null' => false, 'default' => null, 'length' => 10, 'key' => 'primary'),
'locale' => array('type' => 'string', 'null' => false, 'length' => 6, 'key' => 'index'),
'model' => array('type' => 'string', 'null' => false, 'key' => 'index'),
'foreign_key' => array('type' => 'integer', 'null' => false, 'length' => 10, 'key' => 'index'),
'field' => array('type' => 'string', 'null' => false, 'key' => 'index'),
'content' => array('type' => 'text', 'null' => true, 'default' => null),
'indexes' => array('PRIMARY' => array('column' => 'id', 'unique' => 1), 'locale' => array('column' => 'locale', 'unique' => 0), 'model' => array('column' => 'model', 'unique' => 0), 'row_id' => array('column' => 'foreign_key', 'unique' => 0), 'field' => array('column' => 'field', 'unique' => 0))
);
public function after($event = []) {
}

public $i18n = [
'id' => ['type' => 'integer', 'null' => false, 'default' => null, 'length' => 10, 'key' => 'primary'],
'locale' => ['type' => 'string', 'null' => false, 'length' => 6, 'key' => 'index'],
'model' => ['type' => 'string', 'null' => false, 'key' => 'index'],
'foreign_key' => ['type' => 'integer', 'null' => false, 'length' => 10, 'key' => 'index'],
'field' => ['type' => 'string', 'null' => false, 'key' => 'index'],
'content' => ['type' => 'text', 'null' => true, 'default' => null],
'indexes' => [
'PRIMARY' => ['column' => 'id', 'unique' => 1],
'locale' => ['column' => 'locale', 'unique' => 0],
'model' => ['column' => 'model', 'unique' => 0],
'row_id' => ['column' => 'foreign_key', 'unique' => 0],
'field' => ['column' => 'field', 'unique' => 0]
]
];
}
Loading

0 comments on commit 9cf636d

Please sign in to comment.