Code Duplication    Length = 23-23 lines in 2 locations

src/models/traits/ModelWithId.php 1 location

@@ 29-51 (lines=23) @@
26
    /**
27
     * @inheritdoc
28
     */
29
    protected function idRules()
30
    {
31
32
        return [
33
            [
34
                [
35
                    'id'
36
                ],
37
                'number',
38
                'integerOnly' => true
39
            ],
40
            [
41
                [
42
                    'id'
43
                ],
44
                'safe',
45
                'on' => [
46
                    ModelHelper::SCENARIO_DEFAULT
47
                ]
48
            ]
49
        ];
50
51
    }
52
53
    /**
54
     * @inheritdoc

src/records/traits/RecordWithId.php 1 location

@@ 30-52 (lines=23) @@
27
    /**
28
     * @inheritdoc
29
     */
30
    protected function idRules()
31
    {
32
33
        return [
34
            [
35
                [
36
                    'id'
37
                ],
38
                'number',
39
                'integerOnly' => true
40
            ],
41
            [
42
                [
43
                    'id'
44
                ],
45
                'safe',
46
                'on' => [
47
                    RecordHelper::SCENARIO_DEFAULT
48
                ]
49
            ]
50
        ];
51
52
    }
53
54
    /**
55
     * @inheritdoc