<commit_before><?php

namespace PiPHP\GPIO;

use PiPHP\GPIO\FileSystem\FileSystemInterface;

class InterruptWatcher implements InterruptWatcherInterface
{
    private $fileSystem;
    private $streams;
    private $pins;
    private $callbacks;
    private $triggers;

    /**
     * Constructor.
     * 
     * @param FileSystemInterface $fileSystem An object that provides file system access
     */
    public function __construct(FileSystemInterface $fileSystem)
    {
        $this->fileSystem = $fileSystem;
        $this->streams = $this->pins = $this->callbacks = $this->triggers = [];
    }

    /**
     * {@inheritdoc}
     */
    public function register(PinInterface $pin, callable $callback)
    {
        $pinNumber = $pin->getNumber();

        if (!isset($this->streams[$pinNumber])) {
            $file = '/sys/class/gpio/gpio' . $pinNumber . '/value';
            $this->streams[$pinNumber] = $this->fileSystem->open($file, 'r');
        }

        $this->pins[$pinNumber] == $pin;
        $this->callbacks[$pinNumber] = $callback;
    }
<commit_msg>Typo fix<commit_after><?php

namespace PiPHP\GPIO;

use PiPHP\GPIO\FileSystem\FileSystemInterface;

class InterruptWatcher implements InterruptWatcherInterface
{
    private $fileSystem;
    private $streams;
    private $pins;
    private $callbacks;
    private $triggers;

    /**
     * Constructor.
     * 
     * @param FileSystemInterface $fileSystem An object that provides file system access
     */
    public function __construct(FileSystemInterface $fileSystem)
    {
        $this->fileSystem = $fileSystem;
        $this->streams = $this->pins = $this->callbacks = $this->triggers = [];
    }

    /**
     * {@inheritdoc}
     */
    public function register(PinInterface $pin, callable $callback)
    {
        $pinNumber = $pin->getNumber();

        if (!isset($this->streams[$pinNumber])) {
            $file = '/sys/class/gpio/gpio' . $pinNumber . '/value';
            $this->streams[$pinNumber] = $this->fileSystem->open($file, 'r');
        }

        $this->pins[$pinNumber] = $pin;
        $this->callbacks[$pinNumber] = $callback;
    }

{'fraction_non_alphanumeric': 0.1430581613508443, 'fraction_numerical': 0.0, 'mean_word_length': 2.690311418685121, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 27, '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': '85580', 'n_tokens_mistral': 647, 'n_tokens_neox': 628, 'n_words': 125}