diff options
author | Bruce Wells <brucekwells@gmail.com> | 2022-04-27 00:31:50 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-27 00:31:50 +0300 |
commit | b7b46bfc476ea0d22e0e92144f68aa81d390fff0 (patch) | |
tree | b89329b67b35a90a59373acfd25f2774b82008a6 /src/NXP/Classes/Token.php | |
parent | c396a882ffa5f7467947a6a19c2435a7b4cbad22 (diff) |
Phpcs fixer (#103)
* Configuring PHP CS Fixer
Dropping PHP 7,3 support
* Fixing merge issue
Diffstat (limited to 'src/NXP/Classes/Token.php')
-rw-r--r-- | src/NXP/Classes/Token.php | 41 |
1 files changed, 22 insertions, 19 deletions
diff --git a/src/NXP/Classes/Token.php b/src/NXP/Classes/Token.php index 924771e..b2a0a64 100644 --- a/src/NXP/Classes/Token.php +++ b/src/NXP/Classes/Token.php @@ -4,31 +4,34 @@ namespace NXP\Classes; class Token { - public const Literal = "literal"; - public const Variable = "variable"; - public const Operator = "operator"; - public const LeftParenthesis = "LP"; - public const RightParenthesis = "RP"; - public const Function = "function"; - public const ParamSeparator = "separator"; - public const String = "string"; - public const Space = "space"; - - /** @var self::* */ - public $type = self::Literal; - - /** @var float|string */ + public const Literal = 'literal'; + + public const Variable = 'variable'; + + public const Operator = 'operator'; + + public const LeftParenthesis = 'LP'; + + public const RightParenthesis = 'RP'; + + public const Function = 'function'; + + public const ParamSeparator = 'separator'; + + public const String = 'string'; + + public const Space = 'space'; + + public string $type = self::Literal; + public $value; - /** @var string */ - public $name; + public ?string $name; /** * Token constructor. - * @param self::* $type - * @param float|string $value */ - public function __construct(string $type, $value, string $name = null) + public function __construct(string $type, $value, ?string $name = null) { $this->type = $type; $this->value = $value; |