@@ -128,12 +128,12 @@ |
||
| 128 | 128 | throw $this->instantiator->exceptionUnexpectedType('IfNotEmpty', $command); |
| 129 | 129 | } |
| 130 | 130 | |
| 131 | - /** |
|
| 132 | - * @param string $variable |
|
| 133 | - * @param string[] $searchTerms |
|
| 134 | - * @param bool $caseInsensitive |
|
| 135 | - * @return Mailcode_Commands_Command_If_Contains |
|
| 136 | - */ |
|
| 131 | + /** |
|
| 132 | + * @param string $variable |
|
| 133 | + * @param string[] $searchTerms |
|
| 134 | + * @param bool $caseInsensitive |
|
| 135 | + * @return Mailcode_Commands_Command_If_Contains |
|
| 136 | + */ |
|
| 137 | 137 | public function ifContains(string $variable, array $searchTerms, bool $caseInsensitive=false) : Mailcode_Commands_Command_If_Contains |
| 138 | 138 | { |
| 139 | 139 | $command = $this->instantiator->buildIfContains('If', $variable, $searchTerms, $caseInsensitive); |
@@ -20,11 +20,11 @@ discard block |
||
| 20 | 20 | */ |
| 21 | 21 | class Mailcode_Factory_CommandSets_Set_If extends Mailcode_Factory_CommandSets_IfBase |
| 22 | 22 | { |
| 23 | - public function if(string $condition, string $type='') : Mailcode_Commands_Command_If |
|
| 23 | + public function if (string $condition, string $type = '') : Mailcode_Commands_Command_If |
|
| 24 | 24 | { |
| 25 | 25 | $command = $this->instantiator->buildIf('If', $condition, $type); |
| 26 | 26 | |
| 27 | - if($command instanceof Mailcode_Commands_Command_If) |
|
| 27 | + if ($command instanceof Mailcode_Commands_Command_If) |
|
| 28 | 28 | { |
| 29 | 29 | return $command; |
| 30 | 30 | } |
@@ -32,11 +32,11 @@ discard block |
||
| 32 | 32 | throw $this->instantiator->exceptionUnexpectedType('If', $command); |
| 33 | 33 | } |
| 34 | 34 | |
| 35 | - public function ifVar(string $variable, string $operand, string $value, bool $quoteValue=false) : Mailcode_Commands_Command_If_Variable |
|
| 35 | + public function ifVar(string $variable, string $operand, string $value, bool $quoteValue = false) : Mailcode_Commands_Command_If_Variable |
|
| 36 | 36 | { |
| 37 | 37 | $command = $this->instantiator->buildIfVar('If', $variable, $operand, $value, $quoteValue); |
| 38 | 38 | |
| 39 | - if($command instanceof Mailcode_Commands_Command_If_Variable) |
|
| 39 | + if ($command instanceof Mailcode_Commands_Command_If_Variable) |
|
| 40 | 40 | { |
| 41 | 41 | return $command; |
| 42 | 42 | } |
@@ -48,7 +48,7 @@ discard block |
||
| 48 | 48 | { |
| 49 | 49 | $command = $this->instantiator->buildIfVar('If', $variable, $operand, $value, true); |
| 50 | 50 | |
| 51 | - if($command instanceof Mailcode_Commands_Command_If_Variable) |
|
| 51 | + if ($command instanceof Mailcode_Commands_Command_If_Variable) |
|
| 52 | 52 | { |
| 53 | 53 | return $command; |
| 54 | 54 | } |
@@ -56,11 +56,11 @@ discard block |
||
| 56 | 56 | throw $this->instantiator->exceptionUnexpectedType('IfVarString', $command); |
| 57 | 57 | } |
| 58 | 58 | |
| 59 | - public function ifVarEquals(string $variable, string $value, bool $quoteValue=false) : Mailcode_Commands_Command_If_Variable |
|
| 59 | + public function ifVarEquals(string $variable, string $value, bool $quoteValue = false) : Mailcode_Commands_Command_If_Variable |
|
| 60 | 60 | { |
| 61 | 61 | $command = $this->instantiator->buildIfVar('If', $variable, '==', $value, $quoteValue); |
| 62 | 62 | |
| 63 | - if($command instanceof Mailcode_Commands_Command_If_Variable) |
|
| 63 | + if ($command instanceof Mailcode_Commands_Command_If_Variable) |
|
| 64 | 64 | { |
| 65 | 65 | return $command; |
| 66 | 66 | } |
@@ -72,7 +72,7 @@ discard block |
||
| 72 | 72 | { |
| 73 | 73 | $command = $this->instantiator->buildIfVar('If', $variable, '==', $value, true); |
| 74 | 74 | |
| 75 | - if($command instanceof Mailcode_Commands_Command_If_Variable) |
|
| 75 | + if ($command instanceof Mailcode_Commands_Command_If_Variable) |
|
| 76 | 76 | { |
| 77 | 77 | return $command; |
| 78 | 78 | } |
@@ -80,11 +80,11 @@ discard block |
||
| 80 | 80 | throw $this->instantiator->exceptionUnexpectedType('IfarEqualsString', $command); |
| 81 | 81 | } |
| 82 | 82 | |
| 83 | - public function ifVarNotEquals(string $variable, string $value, bool $quoteValue=false) : Mailcode_Commands_Command_If_Variable |
|
| 83 | + public function ifVarNotEquals(string $variable, string $value, bool $quoteValue = false) : Mailcode_Commands_Command_If_Variable |
|
| 84 | 84 | { |
| 85 | 85 | $command = $this->instantiator->buildIfVar('If', $variable, '!=', $value, $quoteValue); |
| 86 | 86 | |
| 87 | - if($command instanceof Mailcode_Commands_Command_If_Variable) |
|
| 87 | + if ($command instanceof Mailcode_Commands_Command_If_Variable) |
|
| 88 | 88 | { |
| 89 | 89 | return $command; |
| 90 | 90 | } |
@@ -96,7 +96,7 @@ discard block |
||
| 96 | 96 | { |
| 97 | 97 | $command = $this->instantiator->buildIfVar('If', $variable, '!=', $value, true); |
| 98 | 98 | |
| 99 | - if($command instanceof Mailcode_Commands_Command_If_Variable) |
|
| 99 | + if ($command instanceof Mailcode_Commands_Command_If_Variable) |
|
| 100 | 100 | { |
| 101 | 101 | return $command; |
| 102 | 102 | } |
@@ -108,7 +108,7 @@ discard block |
||
| 108 | 108 | { |
| 109 | 109 | $command = $this->instantiator->buildIfEmpty('If', $variable); |
| 110 | 110 | |
| 111 | - if($command instanceof Mailcode_Commands_Command_If_Empty) |
|
| 111 | + if ($command instanceof Mailcode_Commands_Command_If_Empty) |
|
| 112 | 112 | { |
| 113 | 113 | return $command; |
| 114 | 114 | } |
@@ -120,7 +120,7 @@ discard block |
||
| 120 | 120 | { |
| 121 | 121 | $command = $this->instantiator->buildIfNotEmpty('If', $variable); |
| 122 | 122 | |
| 123 | - if($command instanceof Mailcode_Commands_Command_If_NotEmpty) |
|
| 123 | + if ($command instanceof Mailcode_Commands_Command_If_NotEmpty) |
|
| 124 | 124 | { |
| 125 | 125 | return $command; |
| 126 | 126 | } |
@@ -134,11 +134,11 @@ discard block |
||
| 134 | 134 | * @param bool $caseInsensitive |
| 135 | 135 | * @return Mailcode_Commands_Command_If_Contains |
| 136 | 136 | */ |
| 137 | - public function ifContains(string $variable, array $searchTerms, bool $caseInsensitive=false) : Mailcode_Commands_Command_If_Contains |
|
| 137 | + public function ifContains(string $variable, array $searchTerms, bool $caseInsensitive = false) : Mailcode_Commands_Command_If_Contains |
|
| 138 | 138 | { |
| 139 | 139 | $command = $this->instantiator->buildIfContains('If', $variable, $searchTerms, $caseInsensitive); |
| 140 | 140 | |
| 141 | - if($command instanceof Mailcode_Commands_Command_If_Contains) |
|
| 141 | + if ($command instanceof Mailcode_Commands_Command_If_Contains) |
|
| 142 | 142 | { |
| 143 | 143 | return $command; |
| 144 | 144 | } |
@@ -146,11 +146,11 @@ discard block |
||
| 146 | 146 | throw $this->instantiator->exceptionUnexpectedType('IfContains', $command); |
| 147 | 147 | } |
| 148 | 148 | |
| 149 | - public function ifBeginsWith(string $variable, string $search, bool $caseInsensitive=false) : Mailcode_Commands_Command_If_BeginsWith |
|
| 149 | + public function ifBeginsWith(string $variable, string $search, bool $caseInsensitive = false) : Mailcode_Commands_Command_If_BeginsWith |
|
| 150 | 150 | { |
| 151 | 151 | $command = $this->instantiator->buildIfBeginsWith('If', $variable, $search, $caseInsensitive); |
| 152 | 152 | |
| 153 | - if($command instanceof Mailcode_Commands_Command_If_BeginsWith) |
|
| 153 | + if ($command instanceof Mailcode_Commands_Command_If_BeginsWith) |
|
| 154 | 154 | { |
| 155 | 155 | return $command; |
| 156 | 156 | } |
@@ -158,11 +158,11 @@ discard block |
||
| 158 | 158 | throw $this->instantiator->exceptionUnexpectedType('IfBeginsWith', $command); |
| 159 | 159 | } |
| 160 | 160 | |
| 161 | - public function ifEndsWith(string $variable, string $search, bool $caseInsensitive=false) : Mailcode_Commands_Command_If_EndsWith |
|
| 161 | + public function ifEndsWith(string $variable, string $search, bool $caseInsensitive = false) : Mailcode_Commands_Command_If_EndsWith |
|
| 162 | 162 | { |
| 163 | 163 | $command = $this->instantiator->buildIfEndsWith('If', $variable, $search, $caseInsensitive); |
| 164 | 164 | |
| 165 | - if($command instanceof Mailcode_Commands_Command_If_EndsWith) |
|
| 165 | + if ($command instanceof Mailcode_Commands_Command_If_EndsWith) |
|
| 166 | 166 | { |
| 167 | 167 | return $command; |
| 168 | 168 | } |
@@ -20,9 +20,9 @@ discard block |
||
| 20 | 20 | */ |
| 21 | 21 | abstract class Mailcode_Translator_Syntax_ApacheVelocity extends Mailcode_Translator_Command |
| 22 | 22 | { |
| 23 | - /** |
|
| 24 | - * @var string[] |
|
| 25 | - */ |
|
| 23 | + /** |
|
| 24 | + * @var string[] |
|
| 25 | + */ |
|
| 26 | 26 | private $regexSpecialChars = array( |
| 27 | 27 | '?', |
| 28 | 28 | '.', |
@@ -41,13 +41,13 @@ discard block |
||
| 41 | 41 | ')' |
| 42 | 42 | ); |
| 43 | 43 | |
| 44 | - /** |
|
| 45 | - * Filters the string for use in an Apache Velocity (Java) |
|
| 46 | - * regex string: escapes all special characters. |
|
| 47 | - * |
|
| 48 | - * @param string $string |
|
| 49 | - * @return string |
|
| 50 | - */ |
|
| 44 | + /** |
|
| 45 | + * Filters the string for use in an Apache Velocity (Java) |
|
| 46 | + * regex string: escapes all special characters. |
|
| 47 | + * |
|
| 48 | + * @param string $string |
|
| 49 | + * @return string |
|
| 50 | + */ |
|
| 51 | 51 | protected function filterRegexString(string $string) : string |
| 52 | 52 | { |
| 53 | 53 | // Special case: previously escaped quotes. |
@@ -61,7 +61,7 @@ |
||
| 61 | 61 | |
| 62 | 62 | // All other special characters have to be escaped |
| 63 | 63 | // with two backslashes. |
| 64 | - foreach($this->regexSpecialChars as $char) |
|
| 64 | + foreach ($this->regexSpecialChars as $char) |
|
| 65 | 65 | { |
| 66 | 66 | $string = str_replace($char, '\\\\'.$char, $string); |
| 67 | 67 | } |
@@ -30,10 +30,10 @@ discard block |
||
| 30 | 30 | return $this->getSign(); |
| 31 | 31 | } |
| 32 | 32 | |
| 33 | - /** |
|
| 34 | - * Retrieves all known comparison operator signs. |
|
| 35 | - * @return string[] |
|
| 36 | - */ |
|
| 33 | + /** |
|
| 34 | + * Retrieves all known comparison operator signs. |
|
| 35 | + * @return string[] |
|
| 36 | + */ |
|
| 37 | 37 | public static function getComparisonSigns() : array |
| 38 | 38 | { |
| 39 | 39 | return array( |
@@ -46,10 +46,10 @@ discard block |
||
| 46 | 46 | ); |
| 47 | 47 | } |
| 48 | 48 | |
| 49 | - /** |
|
| 50 | - * Retrieves all known arithmetic operator signs. |
|
| 51 | - * @return string[] |
|
| 52 | - */ |
|
| 49 | + /** |
|
| 50 | + * Retrieves all known arithmetic operator signs. |
|
| 51 | + * @return string[] |
|
| 52 | + */ |
|
| 53 | 53 | public static function getArithmeticSigns() : array |
| 54 | 54 | { |
| 55 | 55 | return array( |
@@ -60,11 +60,11 @@ discard block |
||
| 60 | 60 | ); |
| 61 | 61 | } |
| 62 | 62 | |
| 63 | - /** |
|
| 64 | - * Whether the operator is comparison related (equals, not equals, smaller, greater...). |
|
| 65 | - * |
|
| 66 | - * @return bool |
|
| 67 | - */ |
|
| 63 | + /** |
|
| 64 | + * Whether the operator is comparison related (equals, not equals, smaller, greater...). |
|
| 65 | + * |
|
| 66 | + * @return bool |
|
| 67 | + */ |
|
| 68 | 68 | public function isComparator() : bool |
| 69 | 69 | { |
| 70 | 70 | return |
@@ -76,11 +76,11 @@ discard block |
||
| 76 | 76 | $this->isSmallerOrEquals(); |
| 77 | 77 | } |
| 78 | 78 | |
| 79 | - /** |
|
| 80 | - * Whether the operator is calculation related (minus, plus, divide, multiply). |
|
| 81 | - * |
|
| 82 | - * @return bool |
|
| 83 | - */ |
|
| 79 | + /** |
|
| 80 | + * Whether the operator is calculation related (minus, plus, divide, multiply). |
|
| 81 | + * |
|
| 82 | + * @return bool |
|
| 83 | + */ |
|
| 84 | 84 | public function isCalculator() : bool |
| 85 | 85 | { |
| 86 | 86 | return |
@@ -34,7 +34,7 @@ discard block |
||
| 34 | 34 | |
| 35 | 35 | $this->instantiator->checkCommand($cmd); |
| 36 | 36 | |
| 37 | - if($cmd instanceof Mailcode_Commands_Command_Comment) |
|
| 37 | + if ($cmd instanceof Mailcode_Commands_Command_Comment) |
|
| 38 | 38 | { |
| 39 | 39 | return $cmd; |
| 40 | 40 | } |
@@ -42,7 +42,7 @@ discard block |
||
| 42 | 42 | throw $this->instantiator->exceptionUnexpectedType('Comment', $cmd); |
| 43 | 43 | } |
| 44 | 44 | |
| 45 | - public function for(string $sourceVariable, string $loopVariable) : Mailcode_Commands_Command_For |
|
| 45 | + public function for (string $sourceVariable, string $loopVariable) : Mailcode_Commands_Command_For |
|
| 46 | 46 | { |
| 47 | 47 | $sourceVariable = '$'.ltrim($sourceVariable, '$'); |
| 48 | 48 | $loopVariable = '$'.ltrim($loopVariable, '$'); |
@@ -64,7 +64,7 @@ discard block |
||
| 64 | 64 | |
| 65 | 65 | $this->instantiator->checkCommand($cmd); |
| 66 | 66 | |
| 67 | - if($cmd instanceof Mailcode_Commands_Command_For) |
|
| 67 | + if ($cmd instanceof Mailcode_Commands_Command_For) |
|
| 68 | 68 | { |
| 69 | 69 | return $cmd; |
| 70 | 70 | } |
@@ -27,19 +27,19 @@ |
||
| 27 | 27 | const VALIDATION_WRONG_KEYWORD = 49702; |
| 28 | 28 | const VALIDATION_VARIABLE_NAME_IS_THE_SAME = 49703; |
| 29 | 29 | |
| 30 | - /** |
|
| 31 | - * @var Mailcode_Parser_Statement_Tokenizer_Token_Variable|NULL |
|
| 32 | - */ |
|
| 30 | + /** |
|
| 31 | + * @var Mailcode_Parser_Statement_Tokenizer_Token_Variable|NULL |
|
| 32 | + */ |
|
| 33 | 33 | private $loopVar; |
| 34 | 34 | |
| 35 | - /** |
|
| 36 | - * @var Mailcode_Parser_Statement_Tokenizer_Token_Variable|NULL |
|
| 37 | - */ |
|
| 35 | + /** |
|
| 36 | + * @var Mailcode_Parser_Statement_Tokenizer_Token_Variable|NULL |
|
| 37 | + */ |
|
| 38 | 38 | private $sourceVar; |
| 39 | 39 | |
| 40 | - /** |
|
| 41 | - * @var Mailcode_Parser_Statement_Tokenizer_Token_Keyword|NULL |
|
| 42 | - */ |
|
| 40 | + /** |
|
| 41 | + * @var Mailcode_Parser_Statement_Tokenizer_Token_Keyword|NULL |
|
| 42 | + */ |
|
| 43 | 43 | private $keyword; |
| 44 | 44 | |
| 45 | 45 | public function getName() : string |
@@ -88,7 +88,7 @@ discard block |
||
| 88 | 88 | |
| 89 | 89 | public function getSourceVariable() : Mailcode_Variables_Variable |
| 90 | 90 | { |
| 91 | - if(isset($this->sourceVar)) |
|
| 91 | + if (isset($this->sourceVar)) |
|
| 92 | 92 | { |
| 93 | 93 | return $this->sourceVar->getVariable(); |
| 94 | 94 | } |
@@ -102,7 +102,7 @@ discard block |
||
| 102 | 102 | |
| 103 | 103 | public function getLoopVariable() : Mailcode_Variables_Variable |
| 104 | 104 | { |
| 105 | - if(isset($this->loopVar)) |
|
| 105 | + if (isset($this->loopVar)) |
|
| 106 | 106 | { |
| 107 | 107 | return $this->loopVar->getVariable(); |
| 108 | 108 | } |
@@ -122,7 +122,7 @@ discard block |
||
| 122 | 122 | $this->keyword = $info->getKeywordByIndex(1); |
| 123 | 123 | $this->sourceVar = $info->getVariableByIndex(2); |
| 124 | 124 | |
| 125 | - if(!$this->loopVar || !$this->keyword || !$this->sourceVar) |
|
| 125 | + if (!$this->loopVar || !$this->keyword || !$this->sourceVar) |
|
| 126 | 126 | { |
| 127 | 127 | $this->validationResult->makeError( |
| 128 | 128 | t('Not a valid for loop.').' '.t('Is the %1$s keyword missing?', 'in:'), |
@@ -135,7 +135,7 @@ discard block |
||
| 135 | 135 | |
| 136 | 136 | protected function validateSyntax_keyword() : void |
| 137 | 137 | { |
| 138 | - if($this->keyword->isForIn()) |
|
| 138 | + if ($this->keyword->isForIn()) |
|
| 139 | 139 | { |
| 140 | 140 | return; |
| 141 | 141 | } |
@@ -148,7 +148,7 @@ discard block |
||
| 148 | 148 | |
| 149 | 149 | protected function validateSyntax_variable_names() : void |
| 150 | 150 | { |
| 151 | - if($this->sourceVar->getVariable()->getFullName() !== $this->loopVar->getVariable()->getFullName()) |
|
| 151 | + if ($this->sourceVar->getVariable()->getFullName() !== $this->loopVar->getVariable()->getFullName()) |
|
| 152 | 152 | { |
| 153 | 153 | return; |
| 154 | 154 | } |
@@ -35,13 +35,13 @@ |
||
| 35 | 35 | } |
| 36 | 36 | } |
| 37 | 37 | |
| 38 | - /** |
|
| 39 | - * Resolves the string with which this location needs to be |
|
| 40 | - * replaced. |
|
| 41 | - * |
|
| 42 | - * @param Mailcode_Parser_Safeguard_Formatter_Location $location |
|
| 43 | - * @return string |
|
| 44 | - */ |
|
| 38 | + /** |
|
| 39 | + * Resolves the string with which this location needs to be |
|
| 40 | + * replaced. |
|
| 41 | + * |
|
| 42 | + * @param Mailcode_Parser_Safeguard_Formatter_Location $location |
|
| 43 | + * @return string |
|
| 44 | + */ |
|
| 45 | 45 | private function resolveReplacement(Mailcode_Parser_Safeguard_Formatter_Location $location) : string |
| 46 | 46 | { |
| 47 | 47 | if($location->requiresAdjustment()) |
@@ -29,7 +29,7 @@ discard block |
||
| 29 | 29 | { |
| 30 | 30 | $locations = $this->resolveLocations(); |
| 31 | 31 | |
| 32 | - foreach($locations as $location) |
|
| 32 | + foreach ($locations as $location) |
|
| 33 | 33 | { |
| 34 | 34 | $location->replaceWith($this->resolveReplacement($location)); |
| 35 | 35 | |
@@ -46,7 +46,7 @@ discard block |
||
| 46 | 46 | */ |
| 47 | 47 | private function resolveReplacement(Mailcode_Parser_Safeguard_Formatter_Location $location) : string |
| 48 | 48 | { |
| 49 | - if($location->requiresAdjustment()) |
|
| 49 | + if ($location->requiresAdjustment()) |
|
| 50 | 50 | { |
| 51 | 51 | return $this->getReplaceString($location); |
| 52 | 52 | } |
@@ -23,14 +23,14 @@ |
||
| 23 | 23 | */ |
| 24 | 24 | class Mailcode_Parser_Safeguard_Formatter_Type_SingleLines extends Mailcode_Parser_Safeguard_Formatter_FormatType |
| 25 | 25 | { |
| 26 | - /** |
|
| 27 | - * @var string |
|
| 28 | - */ |
|
| 26 | + /** |
|
| 27 | + * @var string |
|
| 28 | + */ |
|
| 29 | 29 | private $eol; |
| 30 | 30 | |
| 31 | - /** |
|
| 32 | - * @var int |
|
| 33 | - */ |
|
| 31 | + /** |
|
| 32 | + * @var int |
|
| 33 | + */ |
|
| 34 | 34 | private $eolLength; |
| 35 | 35 | |
| 36 | 36 | protected function initFormatting() : void |
@@ -25,14 +25,14 @@ |
||
| 25 | 25 | */ |
| 26 | 26 | class Mailcode_Parser_Safeguard_Formatter_Type_SingleLines_Location extends Mailcode_Parser_Safeguard_Formatter_Location |
| 27 | 27 | { |
| 28 | - /** |
|
| 29 | - * @var int |
|
| 30 | - */ |
|
| 28 | + /** |
|
| 29 | + * @var int |
|
| 30 | + */ |
|
| 31 | 31 | protected $eolLength; |
| 32 | 32 | |
| 33 | - /** |
|
| 34 | - * @var string |
|
| 35 | - */ |
|
| 33 | + /** |
|
| 34 | + * @var string |
|
| 35 | + */ |
|
| 36 | 36 | protected $eol; |
| 37 | 37 | |
| 38 | 38 | protected function init() : void |
@@ -55,7 +55,7 @@ discard block |
||
| 55 | 55 | $position = $this->getStartPosition(); |
| 56 | 56 | |
| 57 | 57 | // we're at the beginning of the string |
| 58 | - if($position === false || $position === 0) |
|
| 58 | + if ($position === false || $position === 0) |
|
| 59 | 59 | { |
| 60 | 60 | $this->log(sprintf( |
| 61 | 61 | 'Prepend: NO | Position: [%s] | Not found, or at beginning of string.', |
@@ -67,7 +67,7 @@ discard block |
||
| 67 | 67 | |
| 68 | 68 | $prevPos = $position - $this->eolLength; |
| 69 | 69 | |
| 70 | - if($prevPos < 0) |
|
| 70 | + if ($prevPos < 0) |
|
| 71 | 71 | { |
| 72 | 72 | $prevPos = 0; |
| 73 | 73 | } |
@@ -77,7 +77,7 @@ discard block |
||
| 77 | 77 | |
| 78 | 78 | protected function checkPreviousPosition(int $prevPos) : void |
| 79 | 79 | { |
| 80 | - if($this->isWithinCommand($prevPos)) |
|
| 80 | + if ($this->isWithinCommand($prevPos)) |
|
| 81 | 81 | { |
| 82 | 82 | $this->log(sprintf( |
| 83 | 83 | 'Prepend: NO | Position: [%s] | Is within a mailcode command.', |
@@ -89,7 +89,7 @@ discard block |
||
| 89 | 89 | |
| 90 | 90 | $match = $this->subject->getSubstr($prevPos, $this->eolLength); |
| 91 | 91 | |
| 92 | - if($match !== $this->formatter->getEOLChar()) |
|
| 92 | + if ($match !== $this->formatter->getEOLChar()) |
|
| 93 | 93 | { |
| 94 | 94 | $this->log(sprintf( |
| 95 | 95 | 'Prepend: YES | Position: [%s] | Characters: [%s] | Do not match the EOL character.', |
@@ -108,7 +108,7 @@ discard block |
||
| 108 | 108 | $position = $this->getEndPosition(); |
| 109 | 109 | |
| 110 | 110 | // we're at the end of the string |
| 111 | - if($position === false || $position >= $subjectLength) |
|
| 111 | + if ($position === false || $position >= $subjectLength) |
|
| 112 | 112 | { |
| 113 | 113 | $this->log(sprintf( |
| 114 | 114 | 'Append: NO | Position: [%s] | End of string, or too long | Subject length: [%s]', |
@@ -121,7 +121,7 @@ discard block |
||
| 121 | 121 | |
| 122 | 122 | $nextPos = $position + $this->eolLength; |
| 123 | 123 | |
| 124 | - if($nextPos > $subjectLength) |
|
| 124 | + if ($nextPos > $subjectLength) |
|
| 125 | 125 | { |
| 126 | 126 | $nextPos = $subjectLength - $this->eolLength; |
| 127 | 127 | } |
@@ -131,7 +131,7 @@ discard block |
||
| 131 | 131 | |
| 132 | 132 | protected function checkNextPosition(int $nextPos) : void |
| 133 | 133 | { |
| 134 | - if($this->isWithinCommand($nextPos)) |
|
| 134 | + if ($this->isWithinCommand($nextPos)) |
|
| 135 | 135 | { |
| 136 | 136 | $this->log(sprintf( |
| 137 | 137 | 'Append: YES | Position: [%s] | Is within a mailcode command.', |
@@ -145,7 +145,7 @@ discard block |
||
| 145 | 145 | |
| 146 | 146 | $next = $this->subject->getSubstr($nextPos, $this->eolLength); |
| 147 | 147 | |
| 148 | - if($next !== $this->formatter->getEOLChar()) |
|
| 148 | + if ($next !== $this->formatter->getEOLChar()) |
|
| 149 | 149 | { |
| 150 | 150 | $this->log(sprintf( |
| 151 | 151 | 'Append: YES | Position: [%s] | Next characters: [%s] | Do not match the EOL character.', |
@@ -32,7 +32,7 @@ |
||
| 32 | 32 | |
| 33 | 33 | public function requiresAdjustment(): bool |
| 34 | 34 | { |
| 35 | - if(!parent::requiresAdjustment()) |
|
| 35 | + if (!parent::requiresAdjustment()) |
|
| 36 | 36 | { |
| 37 | 37 | return false; |
| 38 | 38 | } |