@@ -69,7 +69,7 @@ discard block |
||
69 | 69 | |
70 | 70 | protected function _validateNesting() : void |
71 | 71 | { |
72 | - if($this->findParentFor($this)) |
|
72 | + if ($this->findParentFor($this)) |
|
73 | 73 | { |
74 | 74 | return; |
75 | 75 | } |
@@ -84,12 +84,12 @@ discard block |
||
84 | 84 | { |
85 | 85 | $parent = $command->getParent(); |
86 | 86 | |
87 | - if($parent === null) |
|
87 | + if ($parent === null) |
|
88 | 88 | { |
89 | 89 | return false; |
90 | 90 | } |
91 | 91 | |
92 | - if($parent instanceof Mailcode_Commands_Command_For) |
|
92 | + if ($parent instanceof Mailcode_Commands_Command_For) |
|
93 | 93 | { |
94 | 94 | return true; |
95 | 95 | } |
@@ -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 | } |
@@ -83,7 +83,7 @@ discard block |
||
83 | 83 | |
84 | 84 | $this->instantiator->checkCommand($cmd); |
85 | 85 | |
86 | - if($cmd instanceof Mailcode_Commands_Command_Break) |
|
86 | + if ($cmd instanceof Mailcode_Commands_Command_Break) |
|
87 | 87 | { |
88 | 88 | return $cmd; |
89 | 89 | } |
@@ -108,7 +108,7 @@ discard block |
||
108 | 108 | |
109 | 109 | $this->instantiator->checkCommand($cmd); |
110 | 110 | |
111 | - if($cmd instanceof Mailcode_Commands_Command_Code) |
|
111 | + if ($cmd instanceof Mailcode_Commands_Command_Code) |
|
112 | 112 | { |
113 | 113 | return $cmd; |
114 | 114 | } |
@@ -29,12 +29,12 @@ |
||
29 | 29 | |
30 | 30 | protected function validateSyntax_params_empty() : void |
31 | 31 | { |
32 | - if(!$this->requiresParameters()) |
|
32 | + if (!$this->requiresParameters()) |
|
33 | 33 | { |
34 | 34 | return; |
35 | 35 | } |
36 | 36 | |
37 | - if(empty($this->paramsString)) |
|
37 | + if (empty($this->paramsString)) |
|
38 | 38 | { |
39 | 39 | $this->validationResult->makeError( |
40 | 40 | t('Parameters have to be specified.'), |
@@ -35,14 +35,14 @@ |
||
35 | 35 | |
36 | 36 | protected function validateSyntax_type_supported() : void |
37 | 37 | { |
38 | - if(!$this->supportsType() || empty($this->type)) |
|
38 | + if (!$this->supportsType() || empty($this->type)) |
|
39 | 39 | { |
40 | 40 | return; |
41 | 41 | } |
42 | 42 | |
43 | 43 | $types = $this->getSupportedTypes(); |
44 | 44 | |
45 | - if(!in_array($this->type, $types)) |
|
45 | + if (!in_array($this->type, $types)) |
|
46 | 46 | { |
47 | 47 | $this->validationResult->makeError( |
48 | 48 | t('The command addon %1$s is not supported.', $this->type).' '. |
@@ -31,14 +31,14 @@ |
||
31 | 31 | |
32 | 32 | protected function validateSyntax_params_keywords() : void |
33 | 33 | { |
34 | - if(!$this->supportsLogicKeywords()) |
|
34 | + if (!$this->supportsLogicKeywords()) |
|
35 | 35 | { |
36 | 36 | return; |
37 | 37 | } |
38 | 38 | |
39 | 39 | $this->logicKeywords = new Mailcode_Commands_LogicKeywords($this, $this->paramsString); |
40 | 40 | |
41 | - if(!$this->logicKeywords->isValid()) |
|
41 | + if (!$this->logicKeywords->isValid()) |
|
42 | 42 | { |
43 | 43 | $this->validationResult->makeError( |
44 | 44 | t('Invalid parameters:').' '.$this->logicKeywords->getErrorMessage(), |
@@ -30,7 +30,7 @@ |
||
30 | 30 | |
31 | 31 | protected function validateSyntax_type_unsupported() : void |
32 | 32 | { |
33 | - if($this->supportsType() || empty($this->type)) |
|
33 | + if ($this->supportsType() || empty($this->type)) |
|
34 | 34 | { |
35 | 35 | return; |
36 | 36 | } |
@@ -33,7 +33,7 @@ discard block |
||
33 | 33 | |
34 | 34 | $this->instantiator->checkCommand($cmd); |
35 | 35 | |
36 | - if($cmd instanceof Mailcode_Commands_Command_ShowVariable) |
|
36 | + if ($cmd instanceof Mailcode_Commands_Command_ShowVariable) |
|
37 | 37 | { |
38 | 38 | return $cmd; |
39 | 39 | } |
@@ -41,12 +41,12 @@ discard block |
||
41 | 41 | throw $this->instantiator->exceptionUnexpectedType('ShowVariable', $cmd); |
42 | 42 | } |
43 | 43 | |
44 | - public function date(string $variableName, string $formatString="") : Mailcode_Commands_Command_ShowDate |
|
44 | + public function date(string $variableName, string $formatString = "") : Mailcode_Commands_Command_ShowDate |
|
45 | 45 | { |
46 | 46 | $variableName = $this->instantiator->filterVariableName($variableName); |
47 | 47 | |
48 | 48 | $format = ''; |
49 | - if(!empty($formatString)) |
|
49 | + if (!empty($formatString)) |
|
50 | 50 | { |
51 | 51 | $format = sprintf( |
52 | 52 | ' "%s"', |
@@ -67,7 +67,7 @@ discard block |
||
67 | 67 | |
68 | 68 | $this->instantiator->checkCommand($cmd); |
69 | 69 | |
70 | - if($cmd instanceof Mailcode_Commands_Command_ShowDate) |
|
70 | + if ($cmd instanceof Mailcode_Commands_Command_ShowDate) |
|
71 | 71 | { |
72 | 72 | return $cmd; |
73 | 73 | } |
@@ -75,12 +75,12 @@ discard block |
||
75 | 75 | throw $this->instantiator->exceptionUnexpectedType('ShowDate', $cmd); |
76 | 76 | } |
77 | 77 | |
78 | - public function number(string $variableName, string $formatString="") : Mailcode_Commands_Command_ShowNumber |
|
78 | + public function number(string $variableName, string $formatString = "") : Mailcode_Commands_Command_ShowNumber |
|
79 | 79 | { |
80 | 80 | $variableName = $this->instantiator->filterVariableName($variableName); |
81 | 81 | |
82 | 82 | $format = ''; |
83 | - if(!empty($formatString)) |
|
83 | + if (!empty($formatString)) |
|
84 | 84 | { |
85 | 85 | $format = sprintf( |
86 | 86 | ' "%s"', |
@@ -101,7 +101,7 @@ discard block |
||
101 | 101 | |
102 | 102 | $this->instantiator->checkCommand($cmd); |
103 | 103 | |
104 | - if($cmd instanceof Mailcode_Commands_Command_ShowNumber) |
|
104 | + if ($cmd instanceof Mailcode_Commands_Command_ShowNumber) |
|
105 | 105 | { |
106 | 106 | return $cmd; |
107 | 107 | } |
@@ -122,7 +122,7 @@ discard block |
||
122 | 122 | |
123 | 123 | $this->instantiator->checkCommand($cmd); |
124 | 124 | |
125 | - if($cmd instanceof Mailcode_Commands_Command_ShowSnippet) |
|
125 | + if ($cmd instanceof Mailcode_Commands_Command_ShowSnippet) |
|
126 | 126 | { |
127 | 127 | return $cmd; |
128 | 128 | } |
@@ -20,11 +20,11 @@ discard block |
||
20 | 20 | */ |
21 | 21 | class Mailcode_Factory_CommandSets_Set_Set extends Mailcode_Factory_CommandSets_Set |
22 | 22 | { |
23 | - public function var(string $variableName, string $value, bool $quoteValue=true) : Mailcode_Commands_Command_SetVariable |
|
23 | + public function var(string $variableName, string $value, bool $quoteValue = true) : Mailcode_Commands_Command_SetVariable |
|
24 | 24 | { |
25 | 25 | $variableName = $this->instantiator->filterVariableName($variableName); |
26 | 26 | |
27 | - if($quoteValue) |
|
27 | + if ($quoteValue) |
|
28 | 28 | { |
29 | 29 | $value = $this->instantiator->quoteString($value); |
30 | 30 | } |
@@ -40,7 +40,7 @@ discard block |
||
40 | 40 | |
41 | 41 | $this->instantiator->checkCommand($cmd); |
42 | 42 | |
43 | - if($cmd instanceof Mailcode_Commands_Command_SetVariable) |
|
43 | + if ($cmd instanceof Mailcode_Commands_Command_SetVariable) |
|
44 | 44 | { |
45 | 45 | return $cmd; |
46 | 46 | } |
@@ -53,7 +53,7 @@ discard block |
||
53 | 53 | * |
54 | 54 | * @return Mailcode_Factory_CommandSets_Set_If |
55 | 55 | */ |
56 | - public static function if() : Mailcode_Factory_CommandSets_Set_If |
|
56 | + public static function if () : Mailcode_Factory_CommandSets_Set_If |
|
57 | 57 | { |
58 | 58 | return self::$commandSets->if(); |
59 | 59 | } |
@@ -63,7 +63,7 @@ discard block |
||
63 | 63 | * |
64 | 64 | * @return Mailcode_Factory_CommandSets_Set_ElseIf |
65 | 65 | */ |
66 | - public static function elseIf() : Mailcode_Factory_CommandSets_Set_ElseIf |
|
66 | + public static function elseIf () : Mailcode_Factory_CommandSets_Set_ElseIf |
|
67 | 67 | { |
68 | 68 | return self::$commandSets->elseIf(); |
69 | 69 | } |
@@ -113,7 +113,7 @@ discard block |
||
113 | 113 | |
114 | 114 | public static function init() : void |
115 | 115 | { |
116 | - if(!isset(self::$commandSets)) |
|
116 | + if (!isset(self::$commandSets)) |
|
117 | 117 | { |
118 | 118 | self::$commandSets = new Mailcode_Factory_CommandSets(); |
119 | 119 | } |