@@ -20,19 +20,19 @@ |
||
| 20 | 20 | */ |
| 21 | 21 | abstract class Mailcode_Collection_Error |
| 22 | 22 | { |
| 23 | - /** |
|
| 24 | - * @var integer |
|
| 25 | - */ |
|
| 23 | + /** |
|
| 24 | + * @var integer |
|
| 25 | + */ |
|
| 26 | 26 | protected $code = 0; |
| 27 | 27 | |
| 28 | - /** |
|
| 29 | - * @var string |
|
| 30 | - */ |
|
| 28 | + /** |
|
| 29 | + * @var string |
|
| 30 | + */ |
|
| 31 | 31 | protected $matchedText = ''; |
| 32 | 32 | |
| 33 | - /** |
|
| 34 | - * @var string |
|
| 35 | - */ |
|
| 33 | + /** |
|
| 34 | + * @var string |
|
| 35 | + */ |
|
| 36 | 36 | protected $message = ''; |
| 37 | 37 | |
| 38 | 38 | public function getCode() : int |
@@ -21,24 +21,24 @@ |
||
| 21 | 21 | */ |
| 22 | 22 | class Mailcode_Parser_Match |
| 23 | 23 | { |
| 24 | - /** |
|
| 25 | - * @var string |
|
| 26 | - */ |
|
| 24 | + /** |
|
| 25 | + * @var string |
|
| 26 | + */ |
|
| 27 | 27 | protected $name; |
| 28 | 28 | |
| 29 | - /** |
|
| 30 | - * @var string |
|
| 31 | - */ |
|
| 29 | + /** |
|
| 30 | + * @var string |
|
| 31 | + */ |
|
| 32 | 32 | protected $type; |
| 33 | 33 | |
| 34 | - /** |
|
| 35 | - * @var string |
|
| 36 | - */ |
|
| 34 | + /** |
|
| 35 | + * @var string |
|
| 36 | + */ |
|
| 37 | 37 | protected $params; |
| 38 | 38 | |
| 39 | - /** |
|
| 40 | - * @var string |
|
| 41 | - */ |
|
| 39 | + /** |
|
| 40 | + * @var string |
|
| 41 | + */ |
|
| 42 | 42 | protected $matchedString; |
| 43 | 43 | |
| 44 | 44 | public function __construct(string $name, string $type, string $params, string $matchedString) |
@@ -20,18 +20,18 @@ discard block |
||
| 20 | 20 | */ |
| 21 | 21 | class Mailcode_Factory_Exception extends Mailcode_Exception |
| 22 | 22 | { |
| 23 | - /** |
|
| 24 | - * @var Mailcode_Commands_Command|NULL |
|
| 25 | - */ |
|
| 23 | + /** |
|
| 24 | + * @var Mailcode_Commands_Command|NULL |
|
| 25 | + */ |
|
| 26 | 26 | protected $command; |
| 27 | 27 | |
| 28 | - /** |
|
| 29 | - * @param string $message |
|
| 30 | - * @param string|NULL $details |
|
| 31 | - * @param int|NULL $code |
|
| 32 | - * @param \Exception|NULL $previous |
|
| 33 | - * @param Mailcode_Commands_Command|NULL $command |
|
| 34 | - */ |
|
| 28 | + /** |
|
| 29 | + * @param string $message |
|
| 30 | + * @param string|NULL $details |
|
| 31 | + * @param int|NULL $code |
|
| 32 | + * @param \Exception|NULL $previous |
|
| 33 | + * @param Mailcode_Commands_Command|NULL $command |
|
| 34 | + */ |
|
| 35 | 35 | public function __construct(string $message, $details=null, $code=null, $previous=null, Mailcode_Commands_Command $command=null) |
| 36 | 36 | { |
| 37 | 37 | parent::__construct($message, $details, $code, $previous); |
@@ -39,11 +39,11 @@ discard block |
||
| 39 | 39 | $this->command = $command; |
| 40 | 40 | } |
| 41 | 41 | |
| 42 | - /** |
|
| 43 | - * Retrieves the erroneous command, if any. |
|
| 44 | - * |
|
| 45 | - * @return Mailcode_Commands_Command|NULL |
|
| 46 | - */ |
|
| 42 | + /** |
|
| 43 | + * Retrieves the erroneous command, if any. |
|
| 44 | + * |
|
| 45 | + * @return Mailcode_Commands_Command|NULL |
|
| 46 | + */ |
|
| 47 | 47 | public function getCommand() : ?Mailcode_Commands_Command |
| 48 | 48 | { |
| 49 | 49 | return $this->command; |
@@ -20,19 +20,19 @@ discard block |
||
| 20 | 20 | */ |
| 21 | 21 | class Mailcode_Commands_Highlighter |
| 22 | 22 | { |
| 23 | - /** |
|
| 24 | - * @var Mailcode_Commands_Command |
|
| 25 | - */ |
|
| 23 | + /** |
|
| 24 | + * @var Mailcode_Commands_Command |
|
| 25 | + */ |
|
| 26 | 26 | protected $command; |
| 27 | 27 | |
| 28 | - /** |
|
| 29 | - * @var string[] |
|
| 30 | - */ |
|
| 28 | + /** |
|
| 29 | + * @var string[] |
|
| 30 | + */ |
|
| 31 | 31 | protected $parts = array(); |
| 32 | 32 | |
| 33 | 33 | public function __construct(Mailcode_Commands_Command $command) |
| 34 | 34 | { |
| 35 | - $this->command = $command; |
|
| 35 | + $this->command = $command; |
|
| 36 | 36 | } |
| 37 | 37 | |
| 38 | 38 | public function highlight() : string |
@@ -121,11 +121,11 @@ discard block |
||
| 121 | 121 | $this->appendParams($keyword->getCommand()); |
| 122 | 122 | } |
| 123 | 123 | |
| 124 | - /** |
|
| 125 | - * @param string[] $classes |
|
| 126 | - * @param string $content |
|
| 127 | - * @return string |
|
| 128 | - */ |
|
| 124 | + /** |
|
| 125 | + * @param string[] $classes |
|
| 126 | + * @param string $content |
|
| 127 | + * @return string |
|
| 128 | + */ |
|
| 129 | 129 | protected function renderTag(array $classes, string $content) : string |
| 130 | 130 | { |
| 131 | 131 | $parts = array(); |
@@ -48,13 +48,13 @@ |
||
| 48 | 48 | <body> |
| 49 | 49 | <p> |
| 50 | 50 | <?php |
| 51 | - pts('This showcases the command\'s syntax highlighting.'); |
|
| 52 | - pts( |
|
| 53 | - 'It is based on the %1$s color scheme%2$s:', |
|
| 54 | - '<a href="https://ethanschoonover.com/solarized/">"Solarized"', |
|
| 55 | - '</a>' |
|
| 56 | - ); |
|
| 57 | - ?> |
|
| 51 | + pts('This showcases the command\'s syntax highlighting.'); |
|
| 52 | + pts( |
|
| 53 | + 'It is based on the %1$s color scheme%2$s:', |
|
| 54 | + '<a href="https://ethanschoonover.com/solarized/">"Solarized"', |
|
| 55 | + '</a>' |
|
| 56 | + ); |
|
| 57 | + ?> |
|
| 58 | 58 | </p> |
| 59 | 59 | <br> |
| 60 | 60 | <div class="commands"> |
@@ -20,9 +20,9 @@ discard block |
||
| 20 | 20 | */ |
| 21 | 21 | abstract class Mailcode_Parser_Statement_Validator_Type |
| 22 | 22 | { |
| 23 | - /** |
|
| 24 | - * @var Mailcode_Parser_Statement |
|
| 25 | - */ |
|
| 23 | + /** |
|
| 24 | + * @var Mailcode_Parser_Statement |
|
| 25 | + */ |
|
| 26 | 26 | protected $statement; |
| 27 | 27 | |
| 28 | 28 | /** |
@@ -30,14 +30,14 @@ discard block |
||
| 30 | 30 | */ |
| 31 | 31 | protected $params; |
| 32 | 32 | |
| 33 | - /** |
|
| 34 | - * @var boolean |
|
| 35 | - */ |
|
| 33 | + /** |
|
| 34 | + * @var boolean |
|
| 35 | + */ |
|
| 36 | 36 | private $valid = true; |
| 37 | 37 | |
| 38 | - /** |
|
| 39 | - * @var boolean |
|
| 40 | - */ |
|
| 38 | + /** |
|
| 39 | + * @var boolean |
|
| 40 | + */ |
|
| 41 | 41 | private $validated = false; |
| 42 | 42 | |
| 43 | 43 | public function __construct(Mailcode_Parser_Statement $statement) |
@@ -53,9 +53,9 @@ discard block |
||
| 53 | 53 | |
| 54 | 54 | } |
| 55 | 55 | |
| 56 | - /** |
|
| 57 | - * @return $this |
|
| 58 | - */ |
|
| 56 | + /** |
|
| 57 | + * @return $this |
|
| 58 | + */ |
|
| 59 | 59 | public function validate() : Mailcode_Parser_Statement_Validator_Type |
| 60 | 60 | { |
| 61 | 61 | if(!$this->validated) |
@@ -20,28 +20,28 @@ |
||
| 20 | 20 | */ |
| 21 | 21 | class Mailcode_Parser_Statement_Tokenizer_Token_StringLiteral extends Mailcode_Parser_Statement_Tokenizer_Token implements Mailcode_Parser_Statement_Tokenizer_ValueInterface |
| 22 | 22 | { |
| 23 | - /** |
|
| 24 | - * Retrieves the text with the surrounding quotes. |
|
| 25 | - * @return string |
|
| 26 | - */ |
|
| 23 | + /** |
|
| 24 | + * Retrieves the text with the surrounding quotes. |
|
| 25 | + * @return string |
|
| 26 | + */ |
|
| 27 | 27 | public function getNormalized() : string |
| 28 | 28 | { |
| 29 | 29 | return $this->restoreQuotes($this->matchedText); |
| 30 | 30 | } |
| 31 | 31 | |
| 32 | - /** |
|
| 33 | - * Retrieves the text with the surrounding quotes. |
|
| 34 | - * @return string |
|
| 35 | - */ |
|
| 32 | + /** |
|
| 33 | + * Retrieves the text with the surrounding quotes. |
|
| 34 | + * @return string |
|
| 35 | + */ |
|
| 36 | 36 | public function getValue() : string |
| 37 | 37 | { |
| 38 | 38 | return $this->getNormalized(); |
| 39 | 39 | } |
| 40 | 40 | |
| 41 | - /** |
|
| 42 | - * Retrieves the text without the surrounding quotes. |
|
| 43 | - * @return string |
|
| 44 | - */ |
|
| 41 | + /** |
|
| 42 | + * Retrieves the text without the surrounding quotes. |
|
| 43 | + * @return string |
|
| 44 | + */ |
|
| 45 | 45 | public function getText() : string |
| 46 | 46 | { |
| 47 | 47 | $quoteless = trim($this->matchedText, '"\''); |
@@ -36,9 +36,9 @@ |
||
| 36 | 36 | ); |
| 37 | 37 | } |
| 38 | 38 | |
| 39 | - /** |
|
| 40 | - * @return array<string> |
|
| 41 | - */ |
|
| 39 | + /** |
|
| 40 | + * @return array<string> |
|
| 41 | + */ |
|
| 42 | 42 | protected function getAllowedOperands() : array |
| 43 | 43 | { |
| 44 | 44 | return Mailcode_Parser_Statement_Tokenizer_Token_Operand::getComparisonSigns(); |
@@ -24,9 +24,9 @@ discard block |
||
| 24 | 24 | */ |
| 25 | 25 | trait Mailcode_Traits_Commands_Validation_Value |
| 26 | 26 | { |
| 27 | - /** |
|
| 28 | - * @var Mailcode_Parser_Statement_Tokenizer_ValueInterface|NULL |
|
| 29 | - */ |
|
| 27 | + /** |
|
| 28 | + * @var Mailcode_Parser_Statement_Tokenizer_ValueInterface|NULL |
|
| 29 | + */ |
|
| 30 | 30 | protected $valueToken; |
| 31 | 31 | |
| 32 | 32 | protected function validateSyntax_value() : void |
@@ -46,11 +46,11 @@ discard block |
||
| 46 | 46 | } |
| 47 | 47 | } |
| 48 | 48 | |
| 49 | - /** |
|
| 50 | - * Retrieves the variable being compared. |
|
| 51 | - * |
|
| 52 | - * @return string |
|
| 53 | - */ |
|
| 49 | + /** |
|
| 50 | + * Retrieves the variable being compared. |
|
| 51 | + * |
|
| 52 | + * @return string |
|
| 53 | + */ |
|
| 54 | 54 | public function getValue() : string |
| 55 | 55 | { |
| 56 | 56 | if($this->valueToken instanceof Mailcode_Parser_Statement_Tokenizer_ValueInterface) |