Nelmio\SecurityBundle\ContentSecurityPolicy\ShaComputer::getFavorite PHP Method

getFavorite() private method

private getFavorite ( )
    private function getFavorite()
    {
        if (null !== $this->favorite) {
            return $this->favorite;
        }
        if (function_exists('hash_algos') && in_array($this->type, hash_algos(), true)) {
            return $this->favorite = 'hash';
        }
        if (function_exists('openssl_get_md_methods') && in_array($this->type, openssl_get_md_methods(), true)) {
            return $this->favorite = 'openssl';
        }
    }