Conditions | 4 |
Paths | 4 |
Total Lines | 25 |
Code Lines | 19 |
Lines | 0 |
Ratio | 0 % |
Tests | 10 |
CRAP Score | 4.8437 |
Changes | 0 |
1 | <?php |
||
42 | 2 | public function getUrl($method, array $params = []) |
|
43 | { |
||
44 | switch ($method) { |
||
45 | 2 | case 'getSecretKey': |
|
46 | return [ |
||
47 | 'url' => '/1.0/security/secretKey', |
||
48 | 'method' => 'GET', |
||
49 | 'code' => 200 |
||
50 | ]; |
||
51 | 2 | case 'getDemoUrl': |
|
52 | return [ |
||
53 | 1 | 'url' => '/1.0/security/demoUrl', |
|
54 | 1 | 'method' => 'GET', |
|
55 | 'code' => 200 |
||
56 | 1 | ]; |
|
57 | 1 | case 'getAutologinUrl': |
|
58 | return [ |
||
59 | 1 | 'url' => '/1.0/security/autologinUrl', |
|
60 | 1 | 'method' => 'GET', |
|
61 | 'code' => 200 |
||
62 | 1 | ]; |
|
63 | default: |
||
64 | throw new Exception('Route for ' . $method . ' not found'); |
||
65 | } |
||
66 | } |
||
67 | |||
85 | } |