<commit_before><?php

namespace React\Filesystem;

use React\EventLoop\LoopInterface;
use React\Filesystem\Node;

class Filesystem
{
    protected $filesystem;

    /**
     * @param LoopInterface $loop
     * @return static
     * @throws NoAdapterException
     */
    public static function create(LoopInterface $loop)
    {
        if (extension_loaded('eio')) {
            return static::createFromAdapter(new EioAdapter($loop));
        }

        throw new NoAdapterException();
    }

    /**
     * @param AdapterInterface $adapter
     * @return static
     * @throws NoAdapterException
     */
    public static function createFromAdapter(AdapterInterface $adapter)
    {
        return new static($adapter);
    }

    /**
     * @param AdapterInterface $filesystem
     */
    private function __construct(AdapterInterface $filesystem)
    {
        $this->filesystem = $filesystem;
    }

    /**
     * @param string $filename
     * @return Node\File
     */
    public function file($filename)<commit_msg>No longer throws an exception<commit_after><?php

namespace React\Filesystem;

use React\EventLoop\LoopInterface;
use React\Filesystem\Node;

class Filesystem
{
    protected $filesystem;

    /**
     * @param LoopInterface $loop
     * @return static
     * @throws NoAdapterException
     */
    public static function create(LoopInterface $loop)
    {
        if (extension_loaded('eio')) {
            return static::createFromAdapter(new EioAdapter($loop));
        }

        throw new NoAdapterException();
    }

    /**
     * @param AdapterInterface $adapter
     * @return static
     */
    public static function createFromAdapter(AdapterInterface $adapter)
    {
        return new static($adapter);
    }

    /**
     * @param AdapterInterface $filesystem
     */
    private function __construct(AdapterInterface $filesystem)
    {
        $this->filesystem = $filesystem;
    }

    /**
     * @param string $filename
     * @return Node\File
     */
    public function file($filename)
{'fraction_non_alphanumeric': 0.10355029585798817, 'fraction_numerical': 0.0, 'mean_word_length': 2.528695652173913, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '67691', 'n_tokens_mistral': 555, 'n_tokens_neox': 543, 'n_words': 127}