src/Core/Communicator.php
private static function parseEndPoint(string $endPoint)
    {
        $endPoint = trim($endPoint, '/');
        $endPointArray = explode('/', $endPoint);
        if ($endPointArray[0] == "api") {
            return $endPoint;
        }
        array_unshift($endPointArray, "api");

        return implode('/', array_filter($endPointArray));
    }
private static function parseEndPoint(string $endPoint)
    {
        $endPoint = trim($endPoint, '/');
        $endPointArray = explode('/', $endPoint);
        if ($endPointArray[0] == "api") {
            return $endPoint;
        }
        array_unshift($endPointArray, "api");

        return implode('/', array_filter($endPointArray));
    }
private static function parseEndPoint ( string $ endPoint ) { $ endPoint = trim ( $ endPoint , '/' ) ; $ endPointArray = explode ( '/' , $ endPoint ) ; if ( $ endPointArray [ 0 ] == "api" ) { return $ endPoint ; } array_unshift ( $ endPointArray , "api" ) ; return implode ( '/' , array_filter ( $ endPointArray ) ) ; }
Turns the given endPoint string into a usable.
@param string $endPoint API URI.
@return string Fixed endpoint string.
Turns the given endPoint string into a usable .