@@ -23,25 +23,25 @@ discard block |
||
| 23 | 23 | */ |
| 24 | 24 | trait Mailcode_Traits_Formatting_HTMLHighlighting |
| 25 | 25 | { |
| 26 | - /** |
|
| 27 | - * Stored this way so we can use isset() instead |
|
| 28 | - * of using in_array, which is some magnitudes slower. |
|
| 29 | - * The boolean value is not used otherwise. |
|
| 30 | - * |
|
| 31 | - * @var array<string,bool> |
|
| 32 | - */ |
|
| 26 | + /** |
|
| 27 | + * Stored this way so we can use isset() instead |
|
| 28 | + * of using in_array, which is some magnitudes slower. |
|
| 29 | + * The boolean value is not used otherwise. |
|
| 30 | + * |
|
| 31 | + * @var array<string,bool> |
|
| 32 | + */ |
|
| 33 | 33 | private $excludeTags = array( |
| 34 | 34 | 'style' => true, // NOTE: style tags are excluded natively on the parser level. |
| 35 | 35 | 'script' => true |
| 36 | 36 | ); |
| 37 | 37 | |
| 38 | - /** |
|
| 39 | - * Adds an HTML tag name to the list of tags within which |
|
| 40 | - * commands may not be highlighted. |
|
| 41 | - * |
|
| 42 | - * @param string $tagName Case insensitive. |
|
| 43 | - * @return $this |
|
| 44 | - */ |
|
| 38 | + /** |
|
| 39 | + * Adds an HTML tag name to the list of tags within which |
|
| 40 | + * commands may not be highlighted. |
|
| 41 | + * |
|
| 42 | + * @param string $tagName Case insensitive. |
|
| 43 | + * @return $this |
|
| 44 | + */ |
|
| 45 | 45 | public function excludeTag(string $tagName) |
| 46 | 46 | { |
| 47 | 47 | $tagName = strtolower($tagName); |
@@ -51,12 +51,12 @@ discard block |
||
| 51 | 51 | return $this; |
| 52 | 52 | } |
| 53 | 53 | |
| 54 | - /** |
|
| 55 | - * Adds several exluded tag names at once. |
|
| 56 | - * |
|
| 57 | - * @param string[] $tagNames |
|
| 58 | - * @return $this |
|
| 59 | - */ |
|
| 54 | + /** |
|
| 55 | + * Adds several exluded tag names at once. |
|
| 56 | + * |
|
| 57 | + * @param string[] $tagNames |
|
| 58 | + * @return $this |
|
| 59 | + */ |
|
| 60 | 60 | public function excludeTags(array $tagNames) |
| 61 | 61 | { |
| 62 | 62 | foreach($tagNames as $tagName) |
@@ -67,12 +67,12 @@ discard block |
||
| 67 | 67 | return $this; |
| 68 | 68 | } |
| 69 | 69 | |
| 70 | - /** |
|
| 71 | - * Whether the specified tag name is in the exlusion list. |
|
| 72 | - * |
|
| 73 | - * @param string $tagName |
|
| 74 | - * @return bool |
|
| 75 | - */ |
|
| 70 | + /** |
|
| 71 | + * Whether the specified tag name is in the exlusion list. |
|
| 72 | + * |
|
| 73 | + * @param string $tagName |
|
| 74 | + * @return bool |
|
| 75 | + */ |
|
| 76 | 76 | public function isTagExcluded(string $tagName) : bool |
| 77 | 77 | { |
| 78 | 78 | $tagName = strtolower($tagName); |
@@ -26,14 +26,14 @@ |
||
| 26 | 26 | */ |
| 27 | 27 | trait Mailcode_Traits_Commands_Validation_CaseSensitive |
| 28 | 28 | { |
| 29 | - /** |
|
| 30 | - * @var boolean |
|
| 31 | - */ |
|
| 29 | + /** |
|
| 30 | + * @var boolean |
|
| 31 | + */ |
|
| 32 | 32 | protected $caseInsensitive = false; |
| 33 | 33 | |
| 34 | - /** |
|
| 35 | - * @var Mailcode_Parser_Statement_Tokenizer_Token_Keyword|NULL |
|
| 36 | - */ |
|
| 34 | + /** |
|
| 35 | + * @var Mailcode_Parser_Statement_Tokenizer_Token_Keyword|NULL |
|
| 36 | + */ |
|
| 37 | 37 | protected $regexToken; |
| 38 | 38 | |
| 39 | 39 | protected function validateSyntax_case_sensitive() : void |
@@ -28,9 +28,9 @@ discard block |
||
| 28 | 28 | */ |
| 29 | 29 | class Mailcode_Parser_Statement_Validator |
| 30 | 30 | { |
| 31 | - /** |
|
| 32 | - * @var Mailcode_Parser_Statement |
|
| 33 | - */ |
|
| 31 | + /** |
|
| 32 | + * @var Mailcode_Parser_Statement |
|
| 33 | + */ |
|
| 34 | 34 | private $statement; |
| 35 | 35 | |
| 36 | 36 | public function __construct(Mailcode_Parser_Statement $statement) |
@@ -38,24 +38,24 @@ discard block |
||
| 38 | 38 | $this->statement = $statement; |
| 39 | 39 | } |
| 40 | 40 | |
| 41 | - /** |
|
| 42 | - * Creates a variable validator: checks whether a single |
|
| 43 | - * variable token is present in the parameters. |
|
| 44 | - * |
|
| 45 | - * @return Mailcode_Parser_Statement_Validator_Type_Variable |
|
| 46 | - */ |
|
| 41 | + /** |
|
| 42 | + * Creates a variable validator: checks whether a single |
|
| 43 | + * variable token is present in the parameters. |
|
| 44 | + * |
|
| 45 | + * @return Mailcode_Parser_Statement_Validator_Type_Variable |
|
| 46 | + */ |
|
| 47 | 47 | public function createVariable() : Mailcode_Parser_Statement_Validator_Type_Variable |
| 48 | 48 | { |
| 49 | 49 | return new Mailcode_Parser_Statement_Validator_Type_Variable($this->statement); |
| 50 | 50 | } |
| 51 | 51 | |
| 52 | - /** |
|
| 53 | - * Creates a keyword validator: checks whether a single |
|
| 54 | - * keyword token is present in the parameters. |
|
| 55 | - * |
|
| 56 | - * @param string $keywordName |
|
| 57 | - * @return Mailcode_Parser_Statement_Validator_Type_Keyword |
|
| 58 | - */ |
|
| 52 | + /** |
|
| 53 | + * Creates a keyword validator: checks whether a single |
|
| 54 | + * keyword token is present in the parameters. |
|
| 55 | + * |
|
| 56 | + * @param string $keywordName |
|
| 57 | + * @return Mailcode_Parser_Statement_Validator_Type_Keyword |
|
| 58 | + */ |
|
| 59 | 59 | public function createKeyword(string $keywordName) : Mailcode_Parser_Statement_Validator_Type_Keyword |
| 60 | 60 | { |
| 61 | 61 | return new Mailcode_Parser_Statement_Validator_Type_Keyword( |