<commit_before><?php

namespace DigipolisGent\Robo\Task\Deploy\Scp\Factory;

use DigipolisGent\Robo\Task\Deploy\Scp\Adapter\ScpPhpseclibAdapter;
use DigipolisGent\Robo\Task\Deploy\Ssh\Auth\AbstractAuth;
use phpseclib\Net\SCP;
use phpseclib\Net\SSH2;

class ScpPhpseclibFactory implements ScpFactoryInterface
{

    public static function create($host, AbstractAuth $auth, $port = 22, $timeout = 10)
    {
        $ssh = new SSH2($host, $port, $timeout);
        $auth->authenticate($ssh);
        if (!$ssh->isConnected()) {
            throw new \RuntimeException(sprintf(
                "ssh: unable to establish connection to %s on port %s",
                $this->host,
                $this->port
            ));
        }
        return new ScpPhpseclibAdapter(new SCP($ssh));
    }
}<commit_msg>Fix Static method should not contain $this reference.<commit_after><?php

namespace DigipolisGent\Robo\Task\Deploy\Scp\Factory;

use DigipolisGent\Robo\Task\Deploy\Scp\Adapter\ScpPhpseclibAdapter;
use DigipolisGent\Robo\Task\Deploy\Ssh\Auth\AbstractAuth;
use phpseclib\Net\SCP;
use phpseclib\Net\SSH2;

class ScpPhpseclibFactory implements ScpFactoryInterface
{

    public static function create($host, AbstractAuth $auth, $port = 22, $timeout = 10)
    {
        $ssh = new SSH2($host, $port, $timeout);
        $auth->authenticate($ssh);
        if (!$ssh->isConnected()) {
            throw new \RuntimeException(sprintf(
                "ssh: unable to establish connection to %s on port %s",
                $host,
                $port
            ));
        }
        return new ScpPhpseclibAdapter(new SCP($ssh));
    }
}
{'fraction_non_alphanumeric': 0.11872705018359853, 'fraction_numerical': 0.0073439412484700125, 'mean_word_length': 2.7414187643020593, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 9, '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': '2479205', 'n_tokens_mistral': 564, 'n_tokens_neox': 537, 'n_words': 111}