@@ -32,7 +32,7 @@ discard block |
||
32 | 32 | * @param bool $highlighted |
33 | 33 | * @return Mailcode_Renderer |
34 | 34 | */ |
35 | - public function setOutputHighlighted(bool $highlighted=true) : Mailcode_Renderer |
|
35 | + public function setOutputHighlighted(bool $highlighted = true) : Mailcode_Renderer |
|
36 | 36 | { |
37 | 37 | $this->highlighted = $highlighted; |
38 | 38 | |
@@ -50,7 +50,7 @@ discard block |
||
50 | 50 | return $this->command2string(Mailcode_Factory::showVar($variableName)); |
51 | 51 | } |
52 | 52 | |
53 | - public function setVar(string $variableName, string $value, bool $quoteValue=false) : string |
|
53 | + public function setVar(string $variableName, string $value, bool $quoteValue = false) : string |
|
54 | 54 | { |
55 | 55 | return $this->command2string(Mailcode_Factory::setVar($variableName, $value, $quoteValue)); |
56 | 56 | } |
@@ -60,12 +60,12 @@ discard block |
||
60 | 60 | return $this->command2string(Mailcode_Factory::setVarString($variableName, $value)); |
61 | 61 | } |
62 | 62 | |
63 | - public function if(string $condition, string $type='') : string |
|
63 | + public function if (string $condition, string $type = '') : string |
|
64 | 64 | { |
65 | - return $this->command2string(Mailcode_Factory::if($condition, $type)); |
|
65 | + return $this->command2string(Mailcode_Factory::if ($condition, $type)); |
|
66 | 66 | } |
67 | 67 | |
68 | - public function ifVar(string $variable, string $operand, string $value, bool $quoteValue=false) : string |
|
68 | + public function ifVar(string $variable, string $operand, string $value, bool $quoteValue = false) : string |
|
69 | 69 | { |
70 | 70 | return $this->command2string(Mailcode_Factory::ifVar($variable, $operand, $value, $quoteValue)); |
71 | 71 | } |
@@ -75,7 +75,7 @@ discard block |
||
75 | 75 | return $this->command2string(Mailcode_Factory::ifVarString($variable, $operand, $value)); |
76 | 76 | } |
77 | 77 | |
78 | - public function ifVarEquals(string $variable, string $value, bool $quoteValue=false) : string |
|
78 | + public function ifVarEquals(string $variable, string $value, bool $quoteValue = false) : string |
|
79 | 79 | { |
80 | 80 | return $this->command2string(Mailcode_Factory::ifVarEquals($variable, $value, $quoteValue)); |
81 | 81 | } |
@@ -85,7 +85,7 @@ discard block |
||
85 | 85 | return $this->command2string(Mailcode_Factory::ifVarEqualsString($variable, $value)); |
86 | 86 | } |
87 | 87 | |
88 | - public function ifVarNotEquals(string $variable, string $value, bool $quoteValue=false) : string |
|
88 | + public function ifVarNotEquals(string $variable, string $value, bool $quoteValue = false) : string |
|
89 | 89 | { |
90 | 90 | return $this->command2string(Mailcode_Factory::ifVarNotEquals($variable, $value, $quoteValue)); |
91 | 91 | } |
@@ -95,12 +95,12 @@ discard block |
||
95 | 95 | return $this->command2string(Mailcode_Factory::ifVarNotEqualsString($variable, $value)); |
96 | 96 | } |
97 | 97 | |
98 | - public function elseIf(string $condition, string $type='') : string |
|
98 | + public function elseIf (string $condition, string $type = '') : string |
|
99 | 99 | { |
100 | - return $this->command2string(Mailcode_Factory::elseIf($condition, $type)); |
|
100 | + return $this->command2string(Mailcode_Factory::elseIf ($condition, $type)); |
|
101 | 101 | } |
102 | 102 | |
103 | - public function elseIfVar(string $variable, string $operand, string $value, bool $quoteValue=false) : string |
|
103 | + public function elseIfVar(string $variable, string $operand, string $value, bool $quoteValue = false) : string |
|
104 | 104 | { |
105 | 105 | return $this->command2string(Mailcode_Factory::elseIfVar($variable, $operand, $value, $quoteValue)); |
106 | 106 | } |
@@ -110,7 +110,7 @@ discard block |
||
110 | 110 | return $this->command2string(Mailcode_Factory::elseIfVarString($variable, $operand, $value)); |
111 | 111 | } |
112 | 112 | |
113 | - public function elseIfVarEquals(string $variable, string $value, bool $quoteValue=false) : string |
|
113 | + public function elseIfVarEquals(string $variable, string $value, bool $quoteValue = false) : string |
|
114 | 114 | { |
115 | 115 | return $this->command2string(Mailcode_Factory::elseIfVarEquals($variable, $value, $quoteValue)); |
116 | 116 | } |
@@ -120,7 +120,7 @@ discard block |
||
120 | 120 | return $this->command2string(Mailcode_Factory::elseIfVarEqualsString($variable, $value)); |
121 | 121 | } |
122 | 122 | |
123 | - public function elseIfVarNotEquals(string $variable, string $value, bool $quoteValue=false) : string |
|
123 | + public function elseIfVarNotEquals(string $variable, string $value, bool $quoteValue = false) : string |
|
124 | 124 | { |
125 | 125 | return $this->command2string(Mailcode_Factory::elseIfVarNotEquals($variable, $value, $quoteValue)); |
126 | 126 | } |
@@ -147,7 +147,7 @@ discard block |
||
147 | 147 | |
148 | 148 | protected function command2string(Mailcode_Commands_Command $command) : string |
149 | 149 | { |
150 | - if($this->highlighted) |
|
150 | + if ($this->highlighted) |
|
151 | 151 | { |
152 | 152 | return $command->getHighlighted(); |
153 | 153 | } |
@@ -62,7 +62,9 @@ discard block |
||
62 | 62 | |
63 | 63 | public function if(string $condition, string $type='') : string |
64 | 64 | { |
65 | - return $this->command2string(Mailcode_Factory::if($condition, $type)); |
|
65 | + return $this->command2string(Mailcode_Factory::if($condition, $type) { |
|
66 | + ); |
|
67 | + } |
|
66 | 68 | } |
67 | 69 | |
68 | 70 | public function ifVar(string $variable, string $operand, string $value, bool $quoteValue=false) : string |
@@ -97,7 +99,9 @@ discard block |
||
97 | 99 | |
98 | 100 | public function elseIf(string $condition, string $type='') : string |
99 | 101 | { |
100 | - return $this->command2string(Mailcode_Factory::elseIf($condition, $type)); |
|
102 | + return $this->command2string(Mailcode_Factory::elseIf($condition, $type) { |
|
103 | + ); |
|
104 | + } |
|
101 | 105 | } |
102 | 106 | |
103 | 107 | public function elseIfVar(string $variable, string $operand, string $value, bool $quoteValue=false) : string |
@@ -130,10 +134,12 @@ discard block |
||
130 | 134 | return $this->command2string(Mailcode_Factory::elseIfVarNotEqualsString($variable, $value)); |
131 | 135 | } |
132 | 136 | |
133 | - public function else() : string |
|
137 | + public function else { |
|
138 | + () : string |
|
134 | 139 | { |
135 | 140 | return $this->command2string(Mailcode_Factory::else()); |
136 | 141 | } |
142 | + } |
|
137 | 143 | |
138 | 144 | public function end() : string |
139 | 145 | { |
@@ -25,7 +25,7 @@ |
||
25 | 25 | $this->paramsString = trim($this->paramsString); |
26 | 26 | |
27 | 27 | // automatically quote the parameters, since comments don't require any. |
28 | - if(substr($this->paramsString, 0, 1) != '"') |
|
28 | + if (substr($this->paramsString, 0, 1) != '"') |
|
29 | 29 | { |
30 | 30 | $this->paramsString = '"'.$this->paramsString.'"'; |
31 | 31 | } |