ClientHasRedirectTrait::setRedirectUri()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 4
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 3
c 1
b 0
f 0
dl 0
loc 5
rs 10
ccs 4
cts 4
cp 1
cc 1
nc 1
nop 1
crap 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