1 | <?php |
||
34 | class AccessTokensTable extends Table |
||
35 | { |
||
36 | |||
37 | /** |
||
38 | * Initialize method |
||
39 | * |
||
40 | * @param array $config The configuration for the Table. |
||
41 | * @return void |
||
42 | */ |
||
43 | 18 | public function initialize(array $config) |
|
44 | { |
||
45 | 18 | parent::initialize($config); |
|
46 | |||
47 | //$this->table('access_tokens'); |
||
|
|||
48 | 18 | $this->displayField('token'); |
|
49 | //$this->primaryKey('id'); |
||
50 | |||
51 | 18 | $this->belongsTo( |
|
52 | 18 | 'Shops', |
|
53 | [ |
||
54 | 18 | 'className' => 'Multidimensional/Cakephpify.Shops'] |
|
55 | 18 | ); |
|
56 | 18 | } |
|
57 | |||
58 | /** |
||
59 | * Default validation rules. |
||
60 | * |
||
61 | * @param \Cake\Validation\Validator $validator Validator instance. |
||
62 | * @return \Cake\Validation\Validator |
||
63 | */ |
||
64 | public function validationDefault(Validator $validator) |
||
99 | |||
100 | /** |
||
101 | * Returns a rules checker object that will be used for validating |
||
102 | * application integrity. |
||
103 | * |
||
104 | * @param \Cake\ORM\RulesChecker $rules The rules object to be modified. |
||
105 | * @return \Cake\ORM\RulesChecker |
||
106 | */ |
||
107 | public function buildRules(RulesChecker $rules) |
||
113 | } |
||
114 |
Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.
The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.
This check looks for comments that seem to be mostly valid code and reports them.