@@ -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 setVar(string $variableName, string $value, bool $quoteValue=true) : Mailcode_Commands_Command_SetVariable |
|
| 23 | + public function setVar(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 | } |
@@ -20,11 +20,11 @@ discard block |
||
| 20 | 20 | */ |
| 21 | 21 | class Mailcode_Factory_CommandSets_Set_ElseIf extends Mailcode_Factory_CommandSets_IfBase |
| 22 | 22 | { |
| 23 | - public function elseIf(string $condition, string $type='') : Mailcode_Commands_Command_ElseIf |
|
| 23 | + public function elseIf (string $condition, string $type = '') : Mailcode_Commands_Command_ElseIf |
|
| 24 | 24 | { |
| 25 | 25 | $command = $this->instantiator->buildIf('ElseIf', $condition, $type); |
| 26 | 26 | |
| 27 | - if($command instanceof Mailcode_Commands_Command_ElseIf) |
|
| 27 | + if ($command instanceof Mailcode_Commands_Command_ElseIf) |
|
| 28 | 28 | { |
| 29 | 29 | return $command; |
| 30 | 30 | } |
@@ -32,11 +32,11 @@ discard block |
||
| 32 | 32 | throw $this->instantiator->exceptionUnexpectedType('ElseIf', $command); |
| 33 | 33 | } |
| 34 | 34 | |
| 35 | - public function elseIfVar(string $variable, string $operand, string $value, bool $quoteValue=false) : Mailcode_Commands_Command_ElseIf_Variable |
|
| 35 | + public function elseIfVar(string $variable, string $operand, string $value, bool $quoteValue = false) : Mailcode_Commands_Command_ElseIf_Variable |
|
| 36 | 36 | { |
| 37 | 37 | $command = $this->instantiator->buildIfVar('ElseIf', $variable, $operand, $value, $quoteValue); |
| 38 | 38 | |
| 39 | - if($command instanceof Mailcode_Commands_Command_ElseIf_Variable) |
|
| 39 | + if ($command instanceof Mailcode_Commands_Command_ElseIf_Variable) |
|
| 40 | 40 | { |
| 41 | 41 | return $command; |
| 42 | 42 | } |
@@ -48,7 +48,7 @@ discard block |
||
| 48 | 48 | { |
| 49 | 49 | $command = $this->instantiator->buildIfVar('ElseIf', $variable, $operand, $value, true); |
| 50 | 50 | |
| 51 | - if($command instanceof Mailcode_Commands_Command_ElseIf_Variable) |
|
| 51 | + if ($command instanceof Mailcode_Commands_Command_ElseIf_Variable) |
|
| 52 | 52 | { |
| 53 | 53 | return $command; |
| 54 | 54 | } |
@@ -56,11 +56,11 @@ discard block |
||
| 56 | 56 | throw $this->instantiator->exceptionUnexpectedType('ElseIfVarString', $command); |
| 57 | 57 | } |
| 58 | 58 | |
| 59 | - public function elseIfVarEquals(string $variable, string $value, bool $quoteValue=false) : Mailcode_Commands_Command_ElseIf_Variable |
|
| 59 | + public function elseIfVarEquals(string $variable, string $value, bool $quoteValue = false) : Mailcode_Commands_Command_ElseIf_Variable |
|
| 60 | 60 | { |
| 61 | 61 | $command = $this->instantiator->buildIfVar('ElseIf', $variable, '==', $value, $quoteValue); |
| 62 | 62 | |
| 63 | - if($command instanceof Mailcode_Commands_Command_ElseIf_Variable) |
|
| 63 | + if ($command instanceof Mailcode_Commands_Command_ElseIf_Variable) |
|
| 64 | 64 | { |
| 65 | 65 | return $command; |
| 66 | 66 | } |
@@ -72,7 +72,7 @@ discard block |
||
| 72 | 72 | { |
| 73 | 73 | $command = $this->instantiator->buildIfVar('ElseIf', $variable, '==', $value, true); |
| 74 | 74 | |
| 75 | - if($command instanceof Mailcode_Commands_Command_ElseIf_Variable) |
|
| 75 | + if ($command instanceof Mailcode_Commands_Command_ElseIf_Variable) |
|
| 76 | 76 | { |
| 77 | 77 | return $command; |
| 78 | 78 | } |
@@ -80,11 +80,11 @@ discard block |
||
| 80 | 80 | throw $this->instantiator->exceptionUnexpectedType('ElseIfVarEqualsString', $command); |
| 81 | 81 | } |
| 82 | 82 | |
| 83 | - public function elseIfVarNotEquals(string $variable, string $value, bool $quoteValue=false) : Mailcode_Commands_Command_ElseIf_Variable |
|
| 83 | + public function elseIfVarNotEquals(string $variable, string $value, bool $quoteValue = false) : Mailcode_Commands_Command_ElseIf_Variable |
|
| 84 | 84 | { |
| 85 | 85 | $command = $this->instantiator->buildIfVar('ElseIf', $variable, '!=', $value, $quoteValue); |
| 86 | 86 | |
| 87 | - if($command instanceof Mailcode_Commands_Command_ElseIf_Variable) |
|
| 87 | + if ($command instanceof Mailcode_Commands_Command_ElseIf_Variable) |
|
| 88 | 88 | { |
| 89 | 89 | return $command; |
| 90 | 90 | } |
@@ -96,7 +96,7 @@ discard block |
||
| 96 | 96 | { |
| 97 | 97 | $command = $this->instantiator->buildIfVar('ElseIf', $variable, '!=', $value, true); |
| 98 | 98 | |
| 99 | - if($command instanceof Mailcode_Commands_Command_ElseIf_Variable) |
|
| 99 | + if ($command instanceof Mailcode_Commands_Command_ElseIf_Variable) |
|
| 100 | 100 | { |
| 101 | 101 | return $command; |
| 102 | 102 | } |
@@ -104,11 +104,11 @@ discard block |
||
| 104 | 104 | throw $this->instantiator->exceptionUnexpectedType('ElseIfVarNotEqualsString', $command); |
| 105 | 105 | } |
| 106 | 106 | |
| 107 | - public function elseIfContains(string $variable, string $search, bool $caseInsensitive=false) : Mailcode_Commands_Command_ElseIf_Contains |
|
| 107 | + public function elseIfContains(string $variable, string $search, bool $caseInsensitive = false) : Mailcode_Commands_Command_ElseIf_Contains |
|
| 108 | 108 | { |
| 109 | 109 | $command = $this->instantiator->buildIfContains('ElseIf', $variable, $search, $caseInsensitive); |
| 110 | 110 | |
| 111 | - if($command instanceof Mailcode_Commands_Command_ElseIf_Contains) |
|
| 111 | + if ($command instanceof Mailcode_Commands_Command_ElseIf_Contains) |
|
| 112 | 112 | { |
| 113 | 113 | return $command; |
| 114 | 114 | } |
@@ -120,7 +120,7 @@ discard block |
||
| 120 | 120 | { |
| 121 | 121 | $command = $this->instantiator->buildIfEmpty('ElseIf', $variable); |
| 122 | 122 | |
| 123 | - if($command instanceof Mailcode_Commands_Command_ElseIf_Empty) |
|
| 123 | + if ($command instanceof Mailcode_Commands_Command_ElseIf_Empty) |
|
| 124 | 124 | { |
| 125 | 125 | return $command; |
| 126 | 126 | } |
@@ -132,7 +132,7 @@ discard block |
||
| 132 | 132 | { |
| 133 | 133 | $command = $this->instantiator->buildIfNotEmpty('ElseIf', $variable); |
| 134 | 134 | |
| 135 | - if($command instanceof Mailcode_Commands_Command_ElseIf_NotEmpty) |
|
| 135 | + if ($command instanceof Mailcode_Commands_Command_ElseIf_NotEmpty) |
|
| 136 | 136 | { |
| 137 | 137 | return $command; |
| 138 | 138 | } |
@@ -34,7 +34,7 @@ |
||
| 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 | } |
@@ -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 | } |
@@ -128,11 +128,11 @@ discard block |
||
| 128 | 128 | throw $this->instantiator->exceptionUnexpectedType('IfNotEmpty', $command); |
| 129 | 129 | } |
| 130 | 130 | |
| 131 | - public function ifContains(string $variable, string $search, bool $caseInsensitive=false) : Mailcode_Commands_Command_If_Contains |
|
| 131 | + public function ifContains(string $variable, string $search, bool $caseInsensitive = false) : Mailcode_Commands_Command_If_Contains |
|
| 132 | 132 | { |
| 133 | 133 | $command = $this->instantiator->buildIfContains('If', $variable, $search, $caseInsensitive); |
| 134 | 134 | |
| 135 | - if($command instanceof Mailcode_Commands_Command_If_Contains) |
|
| 135 | + if ($command instanceof Mailcode_Commands_Command_If_Contains) |
|
| 136 | 136 | { |
| 137 | 137 | return $command; |
| 138 | 138 | } |
@@ -20,11 +20,11 @@ discard block |
||
| 20 | 20 | */ |
| 21 | 21 | class Mailcode_Factory_Instantiator |
| 22 | 22 | { |
| 23 | - public function buildIf(string $ifType, string $params, string $type='') : Mailcode_Commands_IfBase |
|
| 23 | + public function buildIf(string $ifType, string $params, string $type = '') : Mailcode_Commands_IfBase |
|
| 24 | 24 | { |
| 25 | 25 | $stringType = $type; |
| 26 | 26 | |
| 27 | - if(!empty($type)) |
|
| 27 | + if (!empty($type)) |
|
| 28 | 28 | { |
| 29 | 29 | $stringType = ' '.$type; |
| 30 | 30 | } |
@@ -43,7 +43,7 @@ discard block |
||
| 43 | 43 | |
| 44 | 44 | $this->checkCommand($command); |
| 45 | 45 | |
| 46 | - if($command instanceof Mailcode_Commands_IfBase) |
|
| 46 | + if ($command instanceof Mailcode_Commands_IfBase) |
|
| 47 | 47 | { |
| 48 | 48 | return $command; |
| 49 | 49 | } |
@@ -51,9 +51,9 @@ discard block |
||
| 51 | 51 | throw $this->exceptionUnexpectedType('IfBase', $command); |
| 52 | 52 | } |
| 53 | 53 | |
| 54 | - public function buildIfVar(string $ifType, string $variable, string $operand, string $value, bool $quoteValue=false) : Mailcode_Commands_IfBase |
|
| 54 | + public function buildIfVar(string $ifType, string $variable, string $operand, string $value, bool $quoteValue = false) : Mailcode_Commands_IfBase |
|
| 55 | 55 | { |
| 56 | - if($quoteValue) |
|
| 56 | + if ($quoteValue) |
|
| 57 | 57 | { |
| 58 | 58 | $value = $this->quoteString($value); |
| 59 | 59 | } |
@@ -78,11 +78,11 @@ discard block |
||
| 78 | 78 | return $this->buildIf($ifType, $this->filterVariableName($variable), 'not-empty'); |
| 79 | 79 | } |
| 80 | 80 | |
| 81 | - public function buildIfContains(string $ifType, string $variable, string $search, bool $caseInsensitive=false) : Mailcode_Commands_IfBase |
|
| 81 | + public function buildIfContains(string $ifType, string $variable, string $search, bool $caseInsensitive = false) : Mailcode_Commands_IfBase |
|
| 82 | 82 | { |
| 83 | 83 | $keyword = ' '; |
| 84 | 84 | |
| 85 | - if($caseInsensitive) |
|
| 85 | + if ($caseInsensitive) |
|
| 86 | 86 | { |
| 87 | 87 | $keyword = ' insensitive: '; |
| 88 | 88 | } |
@@ -106,7 +106,7 @@ discard block |
||
| 106 | 106 | |
| 107 | 107 | public function checkCommand(Mailcode_Commands_Command $command) : void |
| 108 | 108 | { |
| 109 | - if($command->isValid()) |
|
| 109 | + if ($command->isValid()) |
|
| 110 | 110 | { |
| 111 | 111 | return; |
| 112 | 112 | } |
@@ -35,14 +35,14 @@ |
||
| 35 | 35 | */ |
| 36 | 36 | private $misc; |
| 37 | 37 | |
| 38 | - /** |
|
| 39 | - * @var Mailcode_Factory_CommandSets_Set_Set |
|
| 40 | - */ |
|
| 38 | + /** |
|
| 39 | + * @var Mailcode_Factory_CommandSets_Set_Set |
|
| 40 | + */ |
|
| 41 | 41 | private $set; |
| 42 | 42 | |
| 43 | - /** |
|
| 44 | - * @var Mailcode_Factory_CommandSets_Set_ElseIf |
|
| 45 | - */ |
|
| 43 | + /** |
|
| 44 | + * @var Mailcode_Factory_CommandSets_Set_ElseIf |
|
| 45 | + */ |
|
| 46 | 46 | private $elseIf; |
| 47 | 47 | |
| 48 | 48 | public function if() : Mailcode_Factory_CommandSets_Set_If |
@@ -45,9 +45,9 @@ discard block |
||
| 45 | 45 | */ |
| 46 | 46 | private $elseIf; |
| 47 | 47 | |
| 48 | - public function if() : Mailcode_Factory_CommandSets_Set_If |
|
| 48 | + public function if () : Mailcode_Factory_CommandSets_Set_If |
|
| 49 | 49 | { |
| 50 | - if(!isset($this->if)) |
|
| 50 | + if (!isset($this->if)) |
|
| 51 | 51 | { |
| 52 | 52 | $this->if = new Mailcode_Factory_CommandSets_Set_If(); |
| 53 | 53 | } |
@@ -55,9 +55,9 @@ discard block |
||
| 55 | 55 | return $this->if; |
| 56 | 56 | } |
| 57 | 57 | |
| 58 | - public function elseIf() : Mailcode_Factory_CommandSets_Set_ElseIf |
|
| 58 | + public function elseIf () : Mailcode_Factory_CommandSets_Set_ElseIf |
|
| 59 | 59 | { |
| 60 | - if(!isset($this->elseIf)) |
|
| 60 | + if (!isset($this->elseIf)) |
|
| 61 | 61 | { |
| 62 | 62 | $this->elseIf = new Mailcode_Factory_CommandSets_Set_ElseIf(); |
| 63 | 63 | } |
@@ -67,7 +67,7 @@ discard block |
||
| 67 | 67 | |
| 68 | 68 | public function show() : Mailcode_Factory_CommandSets_Set_Show |
| 69 | 69 | { |
| 70 | - if(!isset($this->show)) |
|
| 70 | + if (!isset($this->show)) |
|
| 71 | 71 | { |
| 72 | 72 | $this->show = new Mailcode_Factory_CommandSets_Set_Show(); |
| 73 | 73 | } |
@@ -77,7 +77,7 @@ discard block |
||
| 77 | 77 | |
| 78 | 78 | public function misc() : Mailcode_Factory_CommandSets_Set_Misc |
| 79 | 79 | { |
| 80 | - if(!isset($this->misc)) |
|
| 80 | + if (!isset($this->misc)) |
|
| 81 | 81 | { |
| 82 | 82 | $this->misc = new Mailcode_Factory_CommandSets_Set_Misc(); |
| 83 | 83 | } |
@@ -87,7 +87,7 @@ discard block |
||
| 87 | 87 | |
| 88 | 88 | public function set() : Mailcode_Factory_CommandSets_Set_Set |
| 89 | 89 | { |
| 90 | - if(!isset($this->set)) |
|
| 90 | + if (!isset($this->set)) |
|
| 91 | 91 | { |
| 92 | 92 | $this->set = new Mailcode_Factory_CommandSets_Set_Set(); |
| 93 | 93 | } |