@@ -24,9 +24,9 @@ discard block |
||
| 24 | 24 | |
| 25 | 25 | const VALIDATION_VARIABLE_COUNT_MISMATCH = 52001; |
| 26 | 26 | |
| 27 | - /** |
|
| 28 | - * @var Mailcode_Variables_Variable|NULL |
|
| 29 | - */ |
|
| 27 | + /** |
|
| 28 | + * @var Mailcode_Variables_Variable|NULL |
|
| 29 | + */ |
|
| 30 | 30 | protected $variable; |
| 31 | 31 | |
| 32 | 32 | public function getName() : string |
@@ -49,15 +49,15 @@ discard block |
||
| 49 | 49 | return true; |
| 50 | 50 | } |
| 51 | 51 | |
| 52 | - /** |
|
| 53 | - * Retrieves the variable to show. |
|
| 54 | - * |
|
| 55 | - * NOTE: Only available once the command has been |
|
| 56 | - * validated. Always use isValid() first. |
|
| 57 | - * |
|
| 58 | - * @throws Mailcode_Exception |
|
| 59 | - * @return Mailcode_Variables_Variable |
|
| 60 | - */ |
|
| 52 | + /** |
|
| 53 | + * Retrieves the variable to show. |
|
| 54 | + * |
|
| 55 | + * NOTE: Only available once the command has been |
|
| 56 | + * validated. Always use isValid() first. |
|
| 57 | + * |
|
| 58 | + * @throws Mailcode_Exception |
|
| 59 | + * @return Mailcode_Variables_Variable |
|
| 60 | + */ |
|
| 61 | 61 | public function getVariable() : Mailcode_Variables_Variable |
| 62 | 62 | { |
| 63 | 63 | $this->validate(); |
@@ -74,15 +74,15 @@ discard block |
||
| 74 | 74 | ); |
| 75 | 75 | } |
| 76 | 76 | |
| 77 | - /** |
|
| 78 | - * Retrieves the full name of the variable to show. |
|
| 79 | - * |
|
| 80 | - * NOTE: Only available once the command has been |
|
| 81 | - * validated. Always use isValid() first. |
|
| 82 | - * |
|
| 83 | - * @throws Mailcode_Exception |
|
| 84 | - * @return string |
|
| 85 | - */ |
|
| 77 | + /** |
|
| 78 | + * Retrieves the full name of the variable to show. |
|
| 79 | + * |
|
| 80 | + * NOTE: Only available once the command has been |
|
| 81 | + * validated. Always use isValid() first. |
|
| 82 | + * |
|
| 83 | + * @throws Mailcode_Exception |
|
| 84 | + * @return string |
|
| 85 | + */ |
|
| 86 | 86 | public function getVariableName() : string |
| 87 | 87 | { |
| 88 | 88 | return $this->getVariable()->getFullName(); |
@@ -90,19 +90,19 @@ discard block |
||
| 90 | 90 | |
| 91 | 91 | protected function validateSyntax_require_variable() : void |
| 92 | 92 | { |
| 93 | - $vars = $this->getVariables()->getGroupedByName(); |
|
| 94 | - $amount = count($vars); |
|
| 93 | + $vars = $this->getVariables()->getGroupedByName(); |
|
| 94 | + $amount = count($vars); |
|
| 95 | 95 | |
| 96 | - if($amount === 1) |
|
| 97 | - { |
|
| 98 | - $this->variable = array_pop($vars); |
|
| 99 | - return; |
|
| 100 | - } |
|
| 96 | + if($amount === 1) |
|
| 97 | + { |
|
| 98 | + $this->variable = array_pop($vars); |
|
| 99 | + return; |
|
| 100 | + } |
|
| 101 | 101 | |
| 102 | - $this->validationResult->makeError( |
|
| 102 | + $this->validationResult->makeError( |
|
| 103 | 103 | t('Command has %1$s variables, %2$s expected.', $amount, 1), |
| 104 | 104 | self::VALIDATION_VARIABLE_COUNT_MISMATCH |
| 105 | - ); |
|
| 105 | + ); |
|
| 106 | 106 | } |
| 107 | 107 | |
| 108 | 108 | protected function getValidations() : array |
@@ -62,7 +62,7 @@ discard block |
||
| 62 | 62 | { |
| 63 | 63 | $this->validate(); |
| 64 | 64 | |
| 65 | - if(isset($this->variable)) |
|
| 65 | + if (isset($this->variable)) |
|
| 66 | 66 | { |
| 67 | 67 | return $this->variable; |
| 68 | 68 | } |
@@ -93,7 +93,7 @@ discard block |
||
| 93 | 93 | $vars = $this->getVariables()->getGroupedByName(); |
| 94 | 94 | $amount = count($vars); |
| 95 | 95 | |
| 96 | - if($amount === 1) |
|
| 96 | + if ($amount === 1) |
|
| 97 | 97 | { |
| 98 | 98 | $this->variable = array_pop($vars); |
| 99 | 99 | return; |