@@ -12,7 +12,7 @@ |
||
12 | 12 | $autoload = realpath($root.'/../vendor/autoload.php'); |
13 | 13 | |
14 | 14 | // we need the autoloader to be present |
15 | - if($autoload === false) |
|
15 | + if ($autoload === false) |
|
16 | 16 | { |
17 | 17 | die('<b>ERROR:</b> Autoloader not present. Run composer update first.'); |
18 | 18 | } |
@@ -32,7 +32,7 @@ discard block |
||
32 | 32 | |
33 | 33 | public function add(Mailcode_Variables_Variable $variable) : Mailcode_Variables_Collection |
34 | 34 | { |
35 | - if(!$variable->isValid()) |
|
35 | + if (!$variable->isValid()) |
|
36 | 36 | { |
37 | 37 | return $this->addInvalid($variable); |
38 | 38 | } |
@@ -76,7 +76,7 @@ discard block |
||
76 | 76 | parent::mergeWith($collection); |
77 | 77 | |
78 | 78 | // also inherit any invalid variables |
79 | - if($collection instanceof Mailcode_Variables_Collection_Regular) |
|
79 | + if ($collection instanceof Mailcode_Variables_Collection_Regular) |
|
80 | 80 | { |
81 | 81 | $invalid = $collection->getInvalid(); |
82 | 82 |
@@ -23,7 +23,7 @@ |
||
23 | 23 | */ |
24 | 24 | function init() : void |
25 | 25 | { |
26 | - if(!class_exists('\AppLocalize\Localization')) { |
|
26 | + if (!class_exists('\AppLocalize\Localization')) { |
|
27 | 27 | return; |
28 | 28 | } |
29 | 29 |
@@ -32,7 +32,7 @@ |
||
32 | 32 | * @param \Exception|NULL $previous |
33 | 33 | * @param Mailcode_Commands_Command|NULL $command |
34 | 34 | */ |
35 | - public function __construct(string $message, $details=null, $code=null, $previous=null, Mailcode_Commands_Command $command=null) |
|
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); |
38 | 38 |
@@ -87,7 +87,7 @@ |
||
87 | 87 | */ |
88 | 88 | public function getTypeLabel() : string |
89 | 89 | { |
90 | - switch($this->type) |
|
90 | + switch ($this->type) |
|
91 | 91 | { |
92 | 92 | case Mailcode_Date_FormatInfo::CHARTYPE_DATE: |
93 | 93 | return t('Date'); |
@@ -31,7 +31,7 @@ |
||
31 | 31 | |
32 | 32 | $this->instantiator->checkCommand($cmd); |
33 | 33 | |
34 | - if($cmd instanceof Mailcode_Commands_Command_Else) |
|
34 | + if ($cmd instanceof Mailcode_Commands_Command_Else) |
|
35 | 35 | { |
36 | 36 | return $cmd; |
37 | 37 | } |
@@ -39,7 +39,7 @@ |
||
39 | 39 | $folder = sprintf(__DIR__.'/../../css/%s', $this->fileName); |
40 | 40 | $path = realpath($folder); |
41 | 41 | |
42 | - if($path === false) |
|
42 | + if ($path === false) |
|
43 | 43 | { |
44 | 44 | throw new Mailcode_Exception( |
45 | 45 | 'Could not find the highlight CSS file', |
@@ -90,7 +90,7 @@ discard block |
||
90 | 90 | { |
91 | 91 | $string = $this->name; |
92 | 92 | |
93 | - if(!empty($this->keywordType)) |
|
93 | + if (!empty($this->keywordType)) |
|
94 | 94 | { |
95 | 95 | $string .= ' '.$this->keywordType; |
96 | 96 | } |
@@ -118,7 +118,7 @@ discard block |
||
118 | 118 | */ |
119 | 119 | public function setParamsString(string $params) : void |
120 | 120 | { |
121 | - if($this->paramsSet) |
|
121 | + if ($this->paramsSet) |
|
122 | 122 | { |
123 | 123 | throw new Mailcode_Exception( |
124 | 124 | 'Cannot set parameters twice', |
@@ -160,7 +160,7 @@ discard block |
||
160 | 160 | |
161 | 161 | $command = $this->collection->getFirstCommand(); |
162 | 162 | |
163 | - if($command === null) |
|
163 | + if ($command === null) |
|
164 | 164 | { |
165 | 165 | $this->makeError( |
166 | 166 | t('No command could be created using the following string:').' '. |
@@ -172,7 +172,7 @@ discard block |
||
172 | 172 | return; |
173 | 173 | } |
174 | 174 | |
175 | - if(!$command->isValid()) |
|
175 | + if (!$command->isValid()) |
|
176 | 176 | { |
177 | 177 | $this->makeError( |
178 | 178 | t('Invalid command created:').' '. |
@@ -192,7 +192,7 @@ discard block |
||
192 | 192 | { |
193 | 193 | $command = $this->collection->getFirstCommand(); |
194 | 194 | |
195 | - if($command !== null && $command->isValid()) |
|
195 | + if ($command !== null && $command->isValid()) |
|
196 | 196 | { |
197 | 197 | return $command; |
198 | 198 | } |
@@ -72,12 +72,12 @@ discard block |
||
72 | 72 | protected function isMatch(Mailcode_Parser_Statement_Tokenizer_Token $token, int $index) : bool |
73 | 73 | { |
74 | 74 | // filter out tokens of other types |
75 | - if(!is_a($token, $this->getTokenClass())) |
|
75 | + if (!is_a($token, $this->getTokenClass())) |
|
76 | 76 | { |
77 | 77 | return false; |
78 | 78 | } |
79 | 79 | |
80 | - if($this->searchIndex >= 0 && $index !== $this->searchIndex) |
|
80 | + if ($this->searchIndex >= 0 && $index !== $this->searchIndex) |
|
81 | 81 | { |
82 | 82 | return false; |
83 | 83 | } |
@@ -96,9 +96,9 @@ discard block |
||
96 | 96 | { |
97 | 97 | $tokens = $this->params->getTokens(); |
98 | 98 | |
99 | - foreach($tokens as $index => $token) |
|
99 | + foreach ($tokens as $index => $token) |
|
100 | 100 | { |
101 | - if($this->isMatch($token, $index)) |
|
101 | + if ($this->isMatch($token, $index)) |
|
102 | 102 | { |
103 | 103 | return $token; |
104 | 104 | } |
@@ -111,7 +111,7 @@ discard block |
||
111 | 111 | { |
112 | 112 | $token = $this->findToken(); |
113 | 113 | |
114 | - if($token instanceof Mailcode_Parser_Statement_Tokenizer_Token && is_a($token, $this->getTokenClass())) |
|
114 | + if ($token instanceof Mailcode_Parser_Statement_Tokenizer_Token && is_a($token, $this->getTokenClass())) |
|
115 | 115 | { |
116 | 116 | $this->token = $token; |
117 | 117 | return true; |