protected function resoveCors($payload): CorsInterface
    {
        if ($payload instanceof CorsInterface) {
            return $payload;
        } elseif (!is_array($payload)) {
            $payload = [];
        }

        return new Cors(static::parseSettings($payload));
    }
protected function resoveCors($payload): CorsInterface
    {
        if ($payload instanceof CorsInterface) {
            return $payload;
        } elseif (!is_array($payload)) {
            $payload = [];
        }

        return new Cors(static::parseSettings($payload));
    }
protected function resoveCors ( $ payload ) : CorsInterface { if ( $ payload instanceof CorsInterface ) { return $ payload ; } elseif ( ! is_array ( $ payload ) ) { $ payload = [ ] ; } return new Cors ( static :: parseSettings ( $ payload ) ) ; }
Resolve cors instance.

@param \Medz\Cors\CorsInterface|array $payload

@return \Medz\Cors\CorsInterface
Resolve cors instance .