@@ -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,12 +67,12 @@ 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 | } |
| 74 | 74 | |
| 75 | - if($this->isWithinCommand($prevPos)) |
|
| 75 | + if ($this->isWithinCommand($prevPos)) |
|
| 76 | 76 | { |
| 77 | 77 | $this->log(sprintf( |
| 78 | 78 | 'Prepend: NO | Position: [%s] | Is within a mailcode command.', |
@@ -84,7 +84,7 @@ discard block |
||
| 84 | 84 | |
| 85 | 85 | $prev = $this->subject->getSubstr($prevPos, $this->eolLength); |
| 86 | 86 | |
| 87 | - if($prev !== $this->formatter->getEOLChar()) |
|
| 87 | + if ($prev !== $this->formatter->getEOLChar()) |
|
| 88 | 88 | { |
| 89 | 89 | $this->log(sprintf( |
| 90 | 90 | 'Prepend: YES | Position: [%s] | Characters: [%s] | Do not match the EOL character.', |
@@ -103,7 +103,7 @@ discard block |
||
| 103 | 103 | $position = $this->getEndPosition(); |
| 104 | 104 | |
| 105 | 105 | // we're at the end of the string |
| 106 | - if($position === false || $position >= $subjectLength) |
|
| 106 | + if ($position === false || $position >= $subjectLength) |
|
| 107 | 107 | { |
| 108 | 108 | $this->log(sprintf( |
| 109 | 109 | 'Append: NO | Position: [%s] | End of string, or too long | Subject length: [%s]', |
@@ -116,12 +116,12 @@ discard block |
||
| 116 | 116 | |
| 117 | 117 | $nextPos = $position + $this->eolLength; |
| 118 | 118 | |
| 119 | - if($nextPos > $subjectLength) |
|
| 119 | + if ($nextPos > $subjectLength) |
|
| 120 | 120 | { |
| 121 | 121 | $nextPos = $subjectLength - $this->eolLength; |
| 122 | 122 | } |
| 123 | 123 | |
| 124 | - if($this->isWithinCommand($nextPos)) |
|
| 124 | + if ($this->isWithinCommand($nextPos)) |
|
| 125 | 125 | { |
| 126 | 126 | $this->log(sprintf( |
| 127 | 127 | 'Append: YES | Position: [%s] | Is within a mailcode command.', |
@@ -135,7 +135,7 @@ discard block |
||
| 135 | 135 | |
| 136 | 136 | $next = $this->subject->getSubstr($nextPos, $this->eolLength); |
| 137 | 137 | |
| 138 | - if($next !== $this->formatter->getEOLChar()) |
|
| 138 | + if ($next !== $this->formatter->getEOLChar()) |
|
| 139 | 139 | { |
| 140 | 140 | $this->log(sprintf( |
| 141 | 141 | 'Append: YES | Position: [%s] | Next characters: [%s] | Do not match the EOL character.', |
@@ -34,7 +34,7 @@ |
||
| 34 | 34 | { |
| 35 | 35 | $locations = $this->resolveLocations(); |
| 36 | 36 | |
| 37 | - foreach($locations as $location) |
|
| 37 | + foreach ($locations as $location) |
|
| 38 | 38 | { |
| 39 | 39 | $location->format(); |
| 40 | 40 | |
@@ -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 | } |
@@ -77,7 +77,7 @@ discard block |
||
| 77 | 77 | |
| 78 | 78 | $instance = new $class($this, $placeholder); |
| 79 | 79 | |
| 80 | - if($instance instanceof Mailcode_Parser_Safeguard_Formatter_Location) |
|
| 80 | + if ($instance instanceof Mailcode_Parser_Safeguard_Formatter_Location) |
|
| 81 | 81 | { |
| 82 | 82 | return $instance; |
| 83 | 83 | } |
@@ -105,7 +105,7 @@ discard block |
||
| 105 | 105 | |
| 106 | 106 | $result = array(); |
| 107 | 107 | |
| 108 | - foreach($placeholders as $placeholder) |
|
| 108 | + foreach ($placeholders as $placeholder) |
|
| 109 | 109 | { |
| 110 | 110 | $result[] = $this->createLocation($placeholder); |
| 111 | 111 | } |
@@ -123,7 +123,7 @@ discard block |
||
| 123 | 123 | { |
| 124 | 124 | $eol = ConvertHelper::detectEOLCharacter($subject); |
| 125 | 125 | |
| 126 | - if($eol) |
|
| 126 | + if ($eol) |
|
| 127 | 127 | { |
| 128 | 128 | $this->log(sprintf( |
| 129 | 129 | 'Detected EOL character: %s.', |