ClientHasRedirectTrait   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 11
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
eloc 4
c 1
b 0
f 0
dl 0
loc 11
ccs 4
cts 4
cp 1
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A setRedirectUri() 0 5 1
1
<?php
2
3
namespace ByTIC\Hello\Models\Clients\Traits;
4
5
/**
6
 * Trait ClientHasRedirectTrait
7
 * @package ByTIC\Hello\Models\Clients\Traits
8
 *
9
 * @property string $redirect
10
 */
11
trait ClientHasRedirectTrait
12
{
13
    /**
14
     * @param $redirect
15
     * @return string
16
     */
17 4
    public function setRedirectUri($redirect)
18
    {
19 4
        $this->redirect = $redirect;
20 4
        $this->redirectUri = $redirect;
0 ignored issues
show
Bug Best Practice introduced by
The property redirectUri does not exist. Although not strictly required by PHP, it is generally a best practice to declare properties explicitly.
Loading history...
21 4
        return $this;
0 ignored issues
show
Bug Best Practice introduced by
The expression return $this returns the type ByTIC\Hello\Models\Clien...\ClientHasRedirectTrait which is incompatible with the documented return type string.
Loading history...
22
    }
23
}
24