private function cleanInputData($inputData)
    {

        switch (true) {
            case $inputData instanceof Response:
                $inputData = json_decode((string) $inputData);
                break;
            case is_null($inputData):
                throw new \Exception("got NULL in Base Construtor");
            case is_string($inputData):
                $inputData = json_decode($inputData);
                break;
            case is_object($inputData):
                $inputData = get_object_vars($inputData);
                break;
            default:
        }

        if (!is_array($inputData) && !is_object($inputData)) {
            throw new \Exception("inputData is not an array, and therefor can't be traversed");
        }

        return $inputData;
    }
private function cleanInputData($inputData)
    {

        switch (true) {
            case $inputData instanceof Response:
                $inputData = json_decode((string) $inputData);
                break;
            case is_null($inputData):
                throw new \Exception("got NULL in Base Construtor");
            case is_string($inputData):
                $inputData = json_decode($inputData);
                break;
            case is_object($inputData):
                $inputData = get_object_vars($inputData);
                break;
            default:
        }

        if (!is_array($inputData) && !is_object($inputData)) {
            throw new \Exception("inputData is not an array, and therefor can't be traversed");
        }

        return $inputData;
    }
private function cleanInputData ( $ inputData ) { switch ( true ) { case $ inputData instanceof Response : $ inputData = json_decode ( ( string ) $ inputData ) ; break ; case is_null ( $ inputData ) : throw new \ Exception ( "got NULL in Base Construtor" ) ; case is_string ( $ inputData ) : $ inputData = json_decode ( $ inputData ) ; break ; case is_object ( $ inputData ) : $ inputData = get_object_vars ( $ inputData ) ; break ; default : } if ( ! is_array ( $ inputData ) && ! is_object ( $ inputData ) ) { throw new \ Exception ( "inputData is not an array, and therefor can't be traversed" ) ; } return $ inputData ; }
clean input data

@param array|object|null|string $inputData
@throws \Exception
@returns array
clean input data