<commit_before><?php

namespace Zenstruck\JWT\Exception;

/**
 * @author <NAME> <<EMAIL>>
 */
final class MalformedToken extends \InvalidArgumentException implements Exception
{
    private $token;

    /**
     * @param mixed           $token
     * @param string          $message
     * @param \Exception|null $previous
     */
    public function __construct($token, $message = 'Malformed token.', \Exception $previous = null)
    {
        $this->token = $token;

        parent::__construct($message, 0, $previous);
    }

    /**
     * @return mixed
     */
    public function token()
    {
        return $this->token;
    }
}<commit_msg>fix bug where MalformedToken exception was being created wrong in Token::fromString()<commit_after><?php

namespace Zenstruck\JWT\Exception;

/**
 * @author <NAME> <<EMAIL>>
 */
final class MalformedToken extends \InvalidArgumentException implements Exception
{
    private $token;

    /**
     * @param mixed           $token
     * @param \Exception|null $previous
     */
    public function __construct($token, \Exception $previous = null)
    {
        $this->token = $token;

        parent::__construct('Malformed token.', 0, $previous);
    }

    /**
     * @return mixed
     */
    public function token()
    {
        return $this->token;
    }
}
{'fraction_non_alphanumeric': 0.13073394495412843, 'fraction_numerical': 0.0015290519877675841, 'mean_word_length': 2.462962962962963, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 13, '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': '2209455', 'n_tokens_mistral': 372, 'n_tokens_neox': 362, 'n_words': 95}