Test Failed
Pull Request — master (#9)
by Maximo
03:13
created

Tests::run()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 11
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 5
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 4
nc 1
nop 0
dl 0
loc 11
ccs 5
cts 5
cp 1
crap 1
rs 10
c 0
b 0
f 0
1
<?php
0 ignored issues
show
Coding Style introduced by
End of line character is invalid; expected "\n" but found "\r\n"
Loading history...
2
3
namespace Gewaer\Bootstrap;
4
5
use Dmkit\Phalcon\Auth\Middleware\Micro as AuthMicro;
6
7
class Tests extends Api
8
{
9
    /**
10
     * Run the application
11
     *
12
     * @return mixed
13
     */
14 2
    public function run()
15
    {
16 2
        $config = $this->container->getConfig()->jwt->toArray();
17
18
        //ignore token validation if disable
19 2
        $config['ignoreUri'] = ['regex: *'];
20
21
        //JWT Validation
22 2
        $auth = new AuthMicro($this->application, $config);
0 ignored issues
show
Unused Code introduced by
The assignment to $auth is dead and can be removed.
Loading history...
23
24 2
        return $this->application;
25
    }
26
}
27