| Total Complexity | 10 |
| Total Lines | 36 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 1 | Features | 0 |
| 1 | <?php |
||
| 10 | class SessionHandler |
||
| 11 | { |
||
| 12 | public static ?Client $client=null; |
||
| 13 | public static function getSession(VmwareApiClient $client){ |
||
| 14 | self::validateCredentials($client); |
||
| 15 | return self::isSessionExist($client->credential) ? $client->credential['Vmware-Api-Session-Id'] : self::authRequest($client); |
||
| 16 | } |
||
| 17 | public static function authRequest(VmwareApiClient $client){ |
||
| 34 | } |
||
| 35 | public static function isSessionExist($credential){ |
||
| 36 | return array_key_exists("Vmware-Api-Session-Id",$credential); |
||
| 37 | } |
||
| 38 | public static function validateCredentials(VmwareApiClient $client) |
||
| 43 | } |
||
| 44 | public static function convertCredentials($credentials){ |
||
| 45 | return base64_encode($credentials['username'].":".$credentials['password']); |
||
| 48 | } |
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.
This is most likely a typographical error or the method has been renamed.