Passed
Push — master ( 6e90f8...abd917 )
by Sebastian
04:44
created
src/Mailcode/Commands/Command/ShowDate.php 1 patch
Indentation   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -20,15 +20,15 @@  discard block
 block discarded – undo
20 20
  */
21 21
 class Mailcode_Commands_Command_ShowDate extends Mailcode_Commands_ShowBase
22 22
 {
23
-   /**
24
-    * The date format string.
25
-    * @var string
26
-    */
23
+    /**
24
+     * The date format string.
25
+     * @var string
26
+     */
27 27
     private $formatString;
28 28
     
29
-   /**
30
-    * @var Mailcode_Date_FormatInfo
31
-    */
29
+    /**
30
+     * @var Mailcode_Date_FormatInfo
31
+     */
32 32
     private $formatInfo;
33 33
 
34 34
     public function getName() : string
@@ -88,11 +88,11 @@  discard block
 block discarded – undo
88 88
         );
89 89
     }
90 90
     
91
-   /**
92
-    * Retrieves the format string used to format the date.
93
-    * 
94
-    * @return string A PHP compatible date format string.
95
-    */
91
+    /**
92
+     * Retrieves the format string used to format the date.
93
+     * 
94
+     * @return string A PHP compatible date format string.
95
+     */
96 96
     public function getFormatString() : string
97 97
     {
98 98
         return $this->formatString;
Please login to merge, or discard this patch.
src/Mailcode/Commands.php 1 patch
Indentation   +40 added lines, -40 removed lines patch added patch discarded remove patch
@@ -27,21 +27,21 @@  discard block
 block discarded – undo
27 27
     const ERROR_COMMAND_DOES_NOT_EXIST = 45902;
28 28
     const ERROR_INVALID_DUMMY_COMMAND_TYPE = 45903;
29 29
     
30
-   /**
31
-    * @var Mailcode_Commands_Command[]
32
-    */
30
+    /**
31
+     * @var Mailcode_Commands_Command[]
32
+     */
33 33
     private $commands = array();
34 34
     
35
-   /**
36
-    * @var array<string,Mailcode_Commands_Command>
37
-    */
35
+    /**
36
+     * @var array<string,Mailcode_Commands_Command>
37
+     */
38 38
     private static $dummyCommands = array();
39 39
     
40
-   /**
41
-    * Retrieves a list of all available command IDs.
42
-    * 
43
-    * @return string[]
44
-    */
40
+    /**
41
+     * Retrieves a list of all available command IDs.
42
+     * 
43
+     * @return string[]
44
+     */
45 45
     public function getIDs() : array
46 46
     {
47 47
         static $ids = array();
@@ -87,12 +87,12 @@  discard block
 block discarded – undo
87 87
         return $result;
88 88
     }
89 89
     
90
-   /**
91
-    * Gets an available command by its ID.
92
-    * 
93
-    * @param string $id
94
-    * @return Mailcode_Commands_Command
95
-    */
90
+    /**
91
+     * Gets an available command by its ID.
92
+     * 
93
+     * @param string $id
94
+     * @return Mailcode_Commands_Command
95
+     */
96 96
     public function getByID(string $id) : Mailcode_Commands_Command
97 97
     {
98 98
         static $instances = array();
@@ -105,15 +105,15 @@  discard block
 block discarded – undo
105 105
         return $instances[$id];
106 106
     }
107 107
     
108
-   /**
109
-    * Retrieves the ID of a command by its name.
110
-    * 
111
-    * @param string $name
112
-    * @throws Mailcode_Exception
113
-    * @return string
114
-    * 
115
-    * @see Mailcode_Commands::ERROR_COMMAND_NAME_DOES_NOT_EXIST
116
-    */
108
+    /**
109
+     * Retrieves the ID of a command by its name.
110
+     * 
111
+     * @param string $name
112
+     * @throws Mailcode_Exception
113
+     * @return string
114
+     * 
115
+     * @see Mailcode_Commands::ERROR_COMMAND_NAME_DOES_NOT_EXIST
116
+     */
117 117
     public function getIDByName(string $name) : string
118 118
     {
119 119
         $items = $this->getAll();
@@ -142,12 +142,12 @@  discard block
 block discarded – undo
142 142
         return in_array($id, $ids);
143 143
     }
144 144
     
145
-   /**
146
-    * Checks wether the specified name exists.
147
-    * 
148
-    * @param string $name For example: "showvar".
149
-    * @return bool
150
-    */
145
+    /**
146
+     * Checks wether the specified name exists.
147
+     * 
148
+     * @param string $name For example: "showvar".
149
+     * @return bool
150
+     */
151 151
     public function nameExists(string $name) : bool
152 152
     {
153 153
         $items = $this->getAll();
@@ -201,14 +201,14 @@  discard block
 block discarded – undo
201 201
         return $class;
202 202
     }
203 203
     
204
-   /**
205
-    * Translates the command type to the expected class naming scheme.
206
-    * 
207
-    * Example: not-empty => NotEmpty
208
-    * 
209
-    * @param string $type
210
-    * @return string
211
-    */
204
+    /**
205
+     * Translates the command type to the expected class naming scheme.
206
+     * 
207
+     * Example: not-empty => NotEmpty
208
+     * 
209
+     * @param string $type
210
+     * @return string
211
+     */
212 212
     private function adjustTypeName(string $type) : string
213 213
     {
214 214
         $type = str_replace('-', ' ', $type);
Please login to merge, or discard this patch.
src/Mailcode/Commands/Command.php 1 patch
Indentation   +46 added lines, -46 removed lines patch added patch discarded remove patch
@@ -43,44 +43,44 @@  discard block
 block discarded – undo
43 43
 
44 44
     const META_URL_ENCODING = 'url_encoding';
45 45
 
46
-   /**
47
-    * @var string
48
-    */
46
+    /**
47
+     * @var string
48
+     */
49 49
     protected $type = '';
50 50
 
51
-   /**
52
-    * @var string
53
-    */
51
+    /**
52
+     * @var string
53
+     */
54 54
     protected $paramsString = '';
55 55
     
56
-   /**
57
-    * @var string
58
-    */
56
+    /**
57
+     * @var string
58
+     */
59 59
     protected $matchedText = '';
60 60
 
61
-   /**
62
-    * @var string
63
-    */
61
+    /**
62
+     * @var string
63
+     */
64 64
     protected $hash = '';
65 65
     
66
-   /**
67
-    * @var OperationResult
68
-    */
66
+    /**
67
+     * @var OperationResult
68
+     */
69 69
     protected $validationResult = null;
70 70
     
71
-   /**
72
-    * @var Mailcode
73
-    */
71
+    /**
72
+     * @var Mailcode
73
+     */
74 74
     protected $mailcode;
75 75
     
76
-   /**
77
-    * @var Mailcode_Parser_Statement
78
-    */
76
+    /**
77
+     * @var Mailcode_Parser_Statement
78
+     */
79 79
     protected $params;
80 80
 
81
-   /**
82
-    * @var string[] 
83
-    */
81
+    /**
82
+     * @var string[] 
83
+     */
84 84
     protected $validations = array(
85 85
         Mailcode_Interfaces_Commands_Validation_EmptyParams::VALIDATION_NAME_EMPTY_PARAMS,
86 86
         Mailcode_Interfaces_Commands_Validation_ParamKeywords::VALIDATION_NAME_KEYWORDS,
@@ -89,24 +89,24 @@  discard block
 block discarded – undo
89 89
         Mailcode_Interfaces_Commands_Validation_TypeUnsupported::VALIDATION_NAME_TYPE_UNSUPPORTED
90 90
     );
91 91
     
92
-   /**
93
-    * @var string
94
-    */
92
+    /**
93
+     * @var string
94
+     */
95 95
     protected $comment = '';
96 96
     
97
-   /**
98
-    * @var Mailcode_Commands_LogicKeywords|NULL
99
-    */
97
+    /**
98
+     * @var Mailcode_Commands_LogicKeywords|NULL
99
+     */
100 100
     protected $logicKeywords;
101 101
     
102
-   /**
103
-    * @var Mailcode_Parser_Statement_Validator
104
-    */
102
+    /**
103
+     * @var Mailcode_Parser_Statement_Validator
104
+     */
105 105
     protected $validator;
106 106
     
107
-   /**
108
-    * @var boolean
109
-    */
107
+    /**
108
+     * @var boolean
109
+     */
110 110
     private $validated = false;
111 111
 
112 112
     /**
@@ -141,13 +141,13 @@  discard block
 block discarded – undo
141 141
         
142 142
     }
143 143
 
144
-   /**
145
-    * Sets the command's parent opening command, if any.
146
-    * NOTE: This is set automatically by the parser, and
147
-    * should not be called manually.
148
-    *
149
-    * @param Mailcode_Commands_Command $command
150
-    */
144
+    /**
145
+     * Sets the command's parent opening command, if any.
146
+     * NOTE: This is set automatically by the parser, and
147
+     * should not be called manually.
148
+     *
149
+     * @param Mailcode_Commands_Command $command
150
+     */
151 151
     public function setParent(Mailcode_Commands_Command $command) : void
152 152
     {
153 153
         $this->parent = $command;
@@ -289,9 +289,9 @@  discard block
 block discarded – undo
289 289
         return $this->validationResult->isValid();
290 290
     }
291 291
     
292
-   /**
293
-    * @return string[]
294
-    */
292
+    /**
293
+     * @return string[]
294
+     */
295 295
     abstract protected function getValidations() : array;
296 296
 
297 297
     protected function _validateNesting() : void
Please login to merge, or discard this patch.
src/Mailcode/Translator/Syntax/ApacheVelocity.php 1 patch
Indentation   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -21,8 +21,8 @@  discard block
 block discarded – undo
21 21
 abstract class Mailcode_Translator_Syntax_ApacheVelocity extends Mailcode_Translator_Command
22 22
 {
23 23
     /**
24
-    * @var string[]
25
-    */
24
+     * @var string[]
25
+     */
26 26
     private $regexSpecialChars = array(
27 27
         '?',
28 28
         '.',
@@ -47,15 +47,15 @@  discard block
 block discarded – undo
47 47
     }
48 48
 
49 49
     /**
50
-    * Filters the string for use in an Apache Velocity (Java)
51
-    * regex string: escapes all special characters.
52
-    *
53
-    * Velocity does its own escaping, so no need to escape special
54
-    * characters as if they were a javascript string.
55
-    * 
56
-    * @param string $string
57
-    * @return string
58
-    */
50
+     * Filters the string for use in an Apache Velocity (Java)
51
+     * regex string: escapes all special characters.
52
+     *
53
+     * Velocity does its own escaping, so no need to escape special
54
+     * characters as if they were a javascript string.
55
+     * 
56
+     * @param string $string
57
+     * @return string
58
+     */
59 59
     public function filterRegexString(string $string) : string
60 60
     {
61 61
         // Special case: previously escaped quotes. 
Please login to merge, or discard this patch.