Passed
Push — master ( d3eb9e...ba3bb3 )
by Sebastian
03:58
created
src/Mailcode/Interfaces/Commands/Validation/NoHTML.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@
 block discarded – undo
8 8
 {
9 9
     public const VALIDATION_NAME_NOHTML = 'nohtml';
10 10
 
11
-    public function setHTMLEnabled(bool $enabled=true);
11
+    public function setHTMLEnabled(bool $enabled = true);
12 12
 
13 13
     public function isHTMLEnabled() : bool;
14 14
 
Please login to merge, or discard this patch.
src/Mailcode/Parser/Statement.php 2 patches
Indentation   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -26,24 +26,24 @@  discard block
 block discarded – undo
26 26
     public const VALIDATION_EMPTY = 48801;
27 27
     public const VALIDATION_UNQUOTED_STRING_LITERALS = 48802;
28 28
     
29
-   /**
30
-    * @var string
31
-    */
29
+    /**
30
+     * @var string
31
+     */
32 32
     protected $statement;
33 33
     
34
-   /**
35
-    * @var OperationResult
36
-    */
34
+    /**
35
+     * @var OperationResult
36
+     */
37 37
     protected $result;
38 38
     
39
-   /**
40
-    * @var Mailcode_Parser_Statement_Tokenizer
41
-    */
39
+    /**
40
+     * @var Mailcode_Parser_Statement_Tokenizer
41
+     */
42 42
     protected $tokenizer;
43 43
     
44
-   /**
45
-    * @var Mailcode_Parser_Statement_Info|NULL
46
-    */
44
+    /**
45
+     * @var Mailcode_Parser_Statement_Info|NULL
46
+     */
47 47
     protected $info;
48 48
 
49 49
     /**
@@ -123,7 +123,7 @@  discard block
 block discarded – undo
123 123
         if($unknown)
124 124
         {
125 125
             $this->result->makeError(
126
-               t('Unquoted string literal found:').' ('.htmlspecialchars($unknown->getMatchedText()).')',
126
+                t('Unquoted string literal found:').' ('.htmlspecialchars($unknown->getMatchedText()).')',
127 127
                 self::VALIDATION_UNQUOTED_STRING_LITERALS
128 128
             );
129 129
         }
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
      */
57 57
     private $sourceCommand;
58 58
 
59
-    public function __construct(string $statement, bool $freeform=false, ?Mailcode_Commands_Command $sourceCommand=null)
59
+    public function __construct(string $statement, bool $freeform = false, ?Mailcode_Commands_Command $sourceCommand = null)
60 60
     {
61 61
         $this->sourceCommand = $sourceCommand;
62 62
         $this->statement = $this->prepareStatement($statement);
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
     
107 107
     public function getInfo() : Mailcode_Parser_Statement_Info
108 108
     {
109
-        if($this->info instanceof Mailcode_Parser_Statement_Info)
109
+        if ($this->info instanceof Mailcode_Parser_Statement_Info)
110 110
         {
111 111
             return $this->info; 
112 112
         }
@@ -118,12 +118,12 @@  discard block
 block discarded – undo
118 118
     
119 119
     protected function validate() : void
120 120
     {
121
-        if($this->freeform)
121
+        if ($this->freeform)
122 122
         {
123 123
             return;
124 124
         }
125 125
 
126
-        if(!$this->tokenizer->hasTokens())
126
+        if (!$this->tokenizer->hasTokens())
127 127
         {
128 128
             $this->result->makeError(
129 129
                 t('Empty statement'),
@@ -135,7 +135,7 @@  discard block
 block discarded – undo
135 135
         
136 136
         $unknown = $this->tokenizer->getFirstUnknown();
137 137
         
138
-        if($unknown)
138
+        if ($unknown)
139 139
         {
140 140
             $this->result->makeError(
141 141
                t('Unquoted string literal found:').' ('.htmlspecialchars($unknown->getMatchedText()).')',
Please login to merge, or discard this patch.
src/Mailcode/Commands/Command/ShowNumber.php 2 patches
Indentation   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -31,10 +31,10 @@  discard block
 block discarded – undo
31 31
     public const VALIDATION_INVALID_DECIMAL_SEPARATOR = 72209;
32 32
     public const VALIDATION_SEPARATORS_SAME_CHARACTER = 72210;
33 33
     
34
-   /**
35
-    * The default number format string.
36
-    * @var string
37
-    */
34
+    /**
35
+     * The default number format string.
36
+     * @var string
37
+     */
38 38
     private $formatString = Mailcode_Number_Info::DEFAULT_FORMAT;
39 39
 
40 40
     /**
@@ -65,16 +65,16 @@  discard block
 block discarded – undo
65 65
 
66 66
     protected function validateSyntax_check_format() : void
67 67
     {
68
-         $tokens = $this->params->getInfo()->getStringLiterals();
68
+            $tokens = $this->params->getInfo()->getStringLiterals();
69 69
          
70
-         // no format specified? Use the default one.
71
-         if(empty($tokens))
72
-         {
73
-             return;
74
-         }
75
-
76
-         $token = array_pop($tokens);
77
-         $this->parseFormatString($token->getText());
70
+            // no format specified? Use the default one.
71
+            if(empty($tokens))
72
+            {
73
+                return;
74
+            }
75
+
76
+            $token = array_pop($tokens);
77
+            $this->parseFormatString($token->getText());
78 78
     }
79 79
 
80 80
     protected function validateSyntax_absolute() : void
@@ -107,11 +107,11 @@  discard block
 block discarded – undo
107 107
         );
108 108
     }
109 109
     
110
-   /**
111
-    * Retrieves the format string used to format the number.
112
-    * 
113
-    * @return string
114
-    */
110
+    /**
111
+     * Retrieves the format string used to format the number.
112
+     * 
113
+     * @return string
114
+     */
115 115
     public function getFormatString() : string
116 116
     {
117 117
         return $this->formatString;
@@ -132,11 +132,11 @@  discard block
 block discarded – undo
132 132
 
133 133
         if($absolute === true && !isset($this->absoluteKeyword))
134 134
         {
135
-             $this->params
136
-                 ->getInfo()
137
-                 ->addKeyword(Mailcode_Commands_Keywords::TYPE_ABSOLUTE);
135
+                $this->params
136
+                    ->getInfo()
137
+                    ->addKeyword(Mailcode_Commands_Keywords::TYPE_ABSOLUTE);
138 138
 
139
-             $this->validateSyntax_absolute();
139
+                $this->validateSyntax_absolute();
140 140
         }
141 141
 
142 142
         return $this;
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
          $tokens = $this->params->getInfo()->getStringLiterals();
69 69
          
70 70
          // no format specified? Use the default one.
71
-         if(empty($tokens))
71
+         if (empty($tokens))
72 72
          {
73 73
              return;
74 74
          }
@@ -81,9 +81,9 @@  discard block
 block discarded – undo
81 81
     {
82 82
         $keywords = $this->params->getInfo()->getKeywords();
83 83
 
84
-        foreach($keywords as $keyword)
84
+        foreach ($keywords as $keyword)
85 85
         {
86
-            if($keyword->getKeyword() === Mailcode_Commands_Keywords::TYPE_ABSOLUTE)
86
+            if ($keyword->getKeyword() === Mailcode_Commands_Keywords::TYPE_ABSOLUTE)
87 87
             {
88 88
                 $this->absoluteKeyword = $keyword;
89 89
                 break;
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
     {
96 96
         $result = new Mailcode_Number_Info($format);
97 97
 
98
-        if($result->isValid())
98
+        if ($result->isValid())
99 99
         {
100 100
             $this->formatString = $format;
101 101
             return;
@@ -124,13 +124,13 @@  discard block
 block discarded – undo
124 124
 
125 125
     public function setAbsolute(bool $absolute) : Mailcode_Commands_Command_ShowNumber
126 126
     {
127
-        if($absolute === false && isset($this->absoluteKeyword))
127
+        if ($absolute === false && isset($this->absoluteKeyword))
128 128
         {
129 129
             $this->params->getInfo()->removeKeyword($this->absoluteKeyword->getKeyword());
130 130
             $this->absoluteKeyword = null;
131 131
         }
132 132
 
133
-        if($absolute === true && !isset($this->absoluteKeyword))
133
+        if ($absolute === true && !isset($this->absoluteKeyword))
134 134
         {
135 135
              $this->params
136 136
                  ->getInfo()
Please login to merge, or discard this patch.