ClientHasSecretTrait::validateSecret()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 1
Metric Value
eloc 1
c 1
b 0
f 1
dl 0
loc 3
rs 10
ccs 0
cts 2
cp 0
cc 1
nc 1
nop 1
crap 2
1
<?php
2
3
namespace ByTIC\Hello\Models\Clients\Traits;
4
5
/**
6
 * Trait ClientHasSecretTrait
7
 * @package ByTIC\Hello\Models\Clients\Traits
8
 *
9
 * @property string $secret
10
 */
11
trait ClientHasSecretTrait
12
{
13
    /**
14
     * @param string $secret
15
     * @return bool
16
     */
17
    public function validateSecret(string $secret): bool
18
    {
19
        return $this->secret === $secret;
20
    }
21
22
    /**
23
     * @param string $secret
24
     */
25 20
    public function setSecret(string $secret)
26
    {
27 20
        $this->secret = $secret;
28 20
    }
29
30
    /**
31
     * @return string
32
     */
33 5
    public function getSecret(): string
34
    {
35 5
        return $this->secret;
36
    }
37
}
38