Issues (326)

src/Model/Table/SmiliesTable.php (1 issue)

Severity
1
<?php
2
3
declare(strict_types=1);
4
5
/**
6
 * Saito - The Threaded Web Forum
7
 *
8
 * @copyright Copyright (c) the Saito Project Developers
9
 * @link https://github.com/Schlaefer/Saito
10
 * @license http://opensource.org/licenses/MIT
11
 */
12
13
namespace App\Model\Table;
14
15
use App\Lib\Model\Table\AppSettingTable;
16
use Cake\Validation\Validator;
17
18
class SmiliesTable extends AppSettingTable
19
{
20
21
    /**
22
     * {@inheritDoc}
23
     */
24
    public function initialize(array $config)
25
    {
26
        $this->hasMany('SmileyCodes', ['foreignKey' => 'smiley_id']);
27
    }
28
29
    /**
30
     * {@inheritDoc}
31
     */
32
    public function validationDefault(Validator $validator)
33
    {
34
        $validator
0 ignored issues
show
Deprecated Code introduced by
The function Cake\Validation\Validator::allowEmpty() has been deprecated: 3.7.0 Use allowEmptyString(), allowEmptyArray(), allowEmptyFile(), allowEmptyDate(), allowEmptyTime() or allowEmptyDateTime() instead. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-deprecated  annotation

34
        /** @scrutinizer ignore-deprecated */ $validator

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.

Loading history...
35
            ->allowEmpty('order')
36
            ->add(
37
                'order',
38
                ['isNumeric' => ['rule' => 'numeric']]
39
            );
40
41
        return $validator;
42
    }
43
}
44