1 | <?php |
||||
2 | |||||
3 | namespace CurrencyConverter\Model\Table; |
||||
4 | |||||
5 | use Cake\ORM\Query; |
||||
6 | use Cake\ORM\RulesChecker; |
||||
7 | use Cake\ORM\Table; |
||||
8 | use Cake\ORM\Behavior\TimestampBehavior; |
||||
9 | use Cake\Validation\Validator; |
||||
10 | |||||
11 | class CurrencyratesTable extends Table |
||||
12 | { |
||||
13 | |||||
14 | /** |
||||
15 | * Initialize method |
||||
16 | * |
||||
17 | * @param array $config The configuration for the Table. |
||||
18 | * @return void |
||||
19 | */ |
||||
20 | 32 | public function initialize(array $config) |
|||
21 | { |
||||
22 | 32 | parent::initialize($config); |
|||
23 | |||||
24 | 32 | $this->setTable('currencyrates'); |
|||
25 | 32 | $this->setPrimaryKey('id'); |
|||
26 | |||||
27 | 32 | $this->addBehavior('Timestamp'); |
|||
28 | 32 | } |
|||
29 | |||||
30 | /** |
||||
31 | * Default validation rules. |
||||
32 | * |
||||
33 | * @param \Cake\Validation\Validator $validator Validator instance. |
||||
34 | * @return \Cake\Validation\Validator |
||||
35 | */ |
||||
36 | 4 | public function validationDefault(Validator $validator) |
|||
37 | { |
||||
38 | $validator |
||||
0 ignored issues
–
show
|
|||||
39 | 4 | ->integer('id') |
|||
40 | 4 | ->allowEmpty('id', 'create'); |
|||
41 | |||||
42 | $validator |
||||
0 ignored issues
–
show
The function
Cake\Validation\Validator::notEmpty() has been deprecated: 3.7.0 Use allowEmptyString(), allowEmptyArray(), allowEmptyFile(), allowEmptyDate(), allowEmptyTime() or allowEmptyDateTime() with reversed conditions instead.
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
This function has been deprecated. The supplier of the function has supplied an explanatory message. The explanatory message should give you some clue as to whether and when the function will be removed and what other function to use instead. ![]() |
|||||
43 | 4 | ->scalar('from') |
|||
44 | 4 | ->maxLength('from', 5) |
|||
45 | 4 | ->notEmpty('from'); |
|||
46 | |||||
47 | $validator |
||||
0 ignored issues
–
show
The function
Cake\Validation\Validator::notEmpty() has been deprecated: 3.7.0 Use allowEmptyString(), allowEmptyArray(), allowEmptyFile(), allowEmptyDate(), allowEmptyTime() or allowEmptyDateTime() with reversed conditions instead.
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
This function has been deprecated. The supplier of the function has supplied an explanatory message. The explanatory message should give you some clue as to whether and when the function will be removed and what other function to use instead. ![]() |
|||||
48 | 4 | ->scalar('to') |
|||
49 | 4 | ->maxLength('to', 5) |
|||
50 | 4 | ->notEmpty('to'); |
|||
51 | |||||
52 | $validator |
||||
0 ignored issues
–
show
The function
Cake\Validation\Validator::notEmpty() has been deprecated: 3.7.0 Use allowEmptyString(), allowEmptyArray(), allowEmptyFile(), allowEmptyDate(), allowEmptyTime() or allowEmptyDateTime() with reversed conditions instead.
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
This function has been deprecated. The supplier of the function has supplied an explanatory message. The explanatory message should give you some clue as to whether and when the function will be removed and what other function to use instead. ![]() |
|||||
53 | 4 | ->scalar('rate') |
|||
54 | 4 | ->maxLength('rate', 10) |
|||
55 | 4 | ->notEmpty('rate'); |
|||
56 | |||||
57 | 4 | return $validator; |
|||
58 | } |
||||
59 | } |
||||
60 |
This function has been deprecated. The supplier of the function has supplied an explanatory message.
The explanatory message should give you some clue as to whether and when the function will be removed and what other function to use instead.