Row::getParams()   A
last analyzed

Complexity

Conditions 2
Paths 2

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 6

Importance

Changes 0
Metric Value
eloc 1
nc 2
nop 0
dl 0
loc 3
ccs 0
cts 3
cp 0
c 0
b 0
f 0
cc 2
crap 6
rs 10
1
<?php
2
3
/**
4
 * @copyright Bluz PHP Team
5
 * @link      https://github.com/bluzphp/skeleton
6
 */
7
8
declare(strict_types=1);
9
10
namespace Application\UsersActions;
11
12
/**
13
 * Row of User Actions
14
 *
15
 * @package  Application\Users
16
 *
17
 * @property integer $userId
18
 * @property string $code
19
 * @property string $action
20
 * @property string $params
21
 * @property string $created
22
 * @property string $expired
23
 */
24
class Row extends \Bluz\Db\Row
0 ignored issues
show
Bug introduced by
The type Bluz\Db\Row was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
25
{
26
    /**
27
     * beforeSave
28
     *
29
     * @return void
30
     */
31
    public function beforeSave(): void
32
    {
33
        $this->params = serialize($this->params);
34
    }
35
36
    /**
37
     * Return params of token
38
     *
39
     * @return array
40
     */
41
    public function getParams(): array
42
    {
43
        return $this->params ? unserialize($this->params, ['allowed_classes' => false]) : [];
44
    }
45
}
46