<commit_before><?php
declare(strict_types=1);

namespace Lcobucci\JWT;

use Lcobucci\JWT\Signer\Key;
use PhpBench\Benchmark\Metadata\Annotations\BeforeMethods;
use PhpBench\Benchmark\Metadata\Annotations\Revs;

/**
 * @BeforeMethods({"init"})
 * @Revs(100)
 */
abstract class SignerBench
{
    private const PAYLOAD = "It\xe2\x80\x99s a dangerous business, Frodo, going out your door. You step onto the road, and if you don't keep your feet, there\xe2\x80\x99s no knowing where you might be swept off to.";

    /**
     * @var Signer
     */
    private $signer;

    /**
     * @var Key
     */
    private $signingKey;

    /**
     * @var Key
     */
    private $verificationKey;

    /**
     * @var string
     */
    private $signature;

    public final function init(): void
    {
        $this->signer          = $this->signer();
        $this->signingKey      = $this->signingKey();
        $this->verificationKey = $this->verificationKey();
        $this->signature       = $this->signer->sign(self::PAYLOAD, $this->signingKey);
    }

    public final function benchSignature(): void
    {
        $this->signer->sign(self::PAYLOAD, $this->signingKey);
    }

    public final function benchVerification(): void
    {
        $this->signer->verify($this->signature, self::PAYLOAD, $this->verificationKey);
    }

    abstract protected function signer(): Signer;

    abstract protected function signingKey(): Key;

    abstract protected function verificationKey(): Key;
}<commit_msg>Switched public and final to match PSR2<commit_after><?php
declare(strict_types=1);

namespace Lcobucci\JWT;

use Lcobucci\JWT\Signer\Key;
use PhpBench\Benchmark\Metadata\Annotations\BeforeMethods;
use PhpBench\Benchmark\Metadata\Annotations\Revs;

/**
 * @BeforeMethods({"init"})
 * @Revs(100)
 */
abstract class SignerBench
{
    private const PAYLOAD = "It\xe2\x80\x99s a dangerous business, Frodo, going out your door. You step onto the road, and if you don't keep your feet, there\xe2\x80\x99s no knowing where you might be swept off to.";

    /**
     * @var Signer
     */
    private $signer;

    /**
     * @var Key
     */
    private $signingKey;

    /**
     * @var Key
     */
    private $verificationKey;

    /**
     * @var string
     */
    private $signature;

    final public function init(): void
    {
        $this->signer          = $this->signer();
        $this->signingKey      = $this->signingKey();
        $this->verificationKey = $this->verificationKey();
        $this->signature       = $this->signer->sign(self::PAYLOAD, $this->signingKey);
    }

    final public function benchSignature(): void
    {
        $this->signer->sign(self::PAYLOAD, $this->signingKey);
    }

    final public function benchVerification(): void
    {
        $this->signer->verify($this->signature, self::PAYLOAD, $this->verificationKey);
    }

    abstract protected function signer(): Signer;

    abstract protected function signingKey(): Key;

    abstract protected function verificationKey(): Key;
}
{'fraction_non_alphanumeric': 0.1349206349206349, 'fraction_numerical': 0.00958994708994709, 'mean_word_length': 2.8242730720606826, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 37, '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': '1861729', 'n_tokens_mistral': 982, 'n_tokens_neox': 940, 'n_words': 224}