<commit_before><?php
namespace Embed;

use Embed\Adapters\AdapterInterface;

class Embed
{
    /**
     * Gets the info from an url
     *
     * @param string|Request $request The url or a request with the url
     * @param array          $config  Options passed to the adapter
     *
     * @return false|AdapterInterface
     */
    public static function create($request, array $config = [])
    {
        $request = self::getRequest($request, isset($config['request']) ? $config['request'] : null);

        if (!$request->isValid()) {
            throw new Exceptions\InvalidUrlException("The url '{$request->startingUrl->getUrl()}' returns the http code '{$request->getHttpCode()}'");

            return false;
        }

        //Use custom adapter
        if (!empty($config['adapter']['class'])) {
            if (($info = self::executeAdapter($config['adapter']['class'], $request, $config))) {
                return $info;
            }
        }
<commit_msg>removed unused code<commit_after><?php
namespace Embed;

use Embed\Adapters\AdapterInterface;

class Embed
{
    /**
     * Gets the info from an url
     *
     * @param string|Request $request The url or a request with the url
     * @param array          $config  Options passed to the adapter
     *
     * @return false|AdapterInterface
     */
    public static function create($request, array $config = [])
    {
        $request = self::getRequest($request, isset($config['request']) ? $config['request'] : null);

        if (!$request->isValid()) {
            throw new Exceptions\InvalidUrlException("The url '{$request->startingUrl->getUrl()}' returns the http code '{$request->getHttpCode()}'");
        }

        //Use custom adapter
        if (!empty($config['adapter']['class'])) {
            if (($info = self::executeAdapter($config['adapter']['class'], $request, $config))) {
                return $info;
            }
        }

{'fraction_non_alphanumeric': 0.14686040477426052, 'fraction_numerical': 0.0, 'mean_word_length': 2.5441176470588234, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6365293', 'n_tokens_mistral': 515, 'n_tokens_neox': 512, 'n_words': 142}