Passed
Push — master ( 2cda12...3e0ae5 )
by Melech
02:04 queued 37s
created

NotifiableUserTrait   A

Complexity

Total Complexity 6

Size/Duplication

Total Lines 48
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 7
dl 0
loc 48
rs 10
c 0
b 0
f 0
wmc 6

6 Methods

Rating   Name   Duplication   Size   Complexity  
A getPhoneNumberField() 0 3 1
A hasSecretIdField() 0 3 1
A getSecretIdField() 0 3 1
A hasPhoneNumberField() 0 3 1
A hasNameField() 0 3 1
A getNameField() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
/*
6
 * This file is part of the Valkyrja Framework package.
7
 *
8
 * (c) Melech Mizrachi <[email protected]>
9
 *
10
 * For the full copyright and license information, please view the LICENSE
11
 * file that was distributed with this source code.
12
 */
13
14
namespace Valkyrja\Notification\Entity\Trait;
15
16
use Valkyrja\Notification\Constant\UserField;
0 ignored issues
show
Bug introduced by
The type Valkyrja\Notification\Constant\UserField 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...
17
18
/**
19
 * Trait NotifiableUserTrait.
20
 *
21
 * @author Melech Mizrachi
22
 */
23
trait NotifiableUserTrait
24
{
25
    /**
26
     * @inheritDoc
27
     */
28
    public static function hasNameField(): bool
29
    {
30
        return true;
31
    }
32
33
    /**
34
     * @inheritDoc
35
     */
36
    public static function getNameField(): string
37
    {
38
        return UserField::NAME;
39
    }
40
41
    /**
42
     * @inheritDoc
43
     */
44
    public static function hasPhoneNumberField(): bool
45
    {
46
        return true;
47
    }
48
49
    /**
50
     * @inheritDoc
51
     */
52
    public static function getPhoneNumberField(): string
53
    {
54
        return UserField::PHONE_NUMBER;
55
    }
56
57
    /**
58
     * @inheritDoc
59
     */
60
    public static function hasSecretIdField(): bool
61
    {
62
        return true;
63
    }
64
65
    /**
66
     * @inheritDoc
67
     */
68
    public static function getSecretIdField(): string
69
    {
70
        return UserField::SECRET_ID;
71
    }
72
}
73