Passed
Push — master ( 9e8075...242c87 )
by Dedipyaman
01:41
created
src/Type/Username.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -26,17 +26,17 @@
 block discarded – undo
26 26
      */
27 27
     private $username;
28 28
 
29
-    private function getOption(int $key, $arr = [], $default) {
30
-        return isset($arr[$key]) ? $arr[$key]: $default;
29
+    private function getOption(int $key, $arr = [ ], $default) {
30
+        return isset($arr[ $key ]) ? $arr[ $key ] : $default;
31 31
     }
32
-    public function __construct(string $username, $options = [], Validator $validator = null)
32
+    public function __construct(string $username, $options = [ ], Validator $validator = null)
33 33
     {
34 34
         if ($validator == null) {
35 35
             // use the default validator
36 36
             $validator = new UsernameValidator(
37 37
                 $this->getOption(self::OPT_MIN_LEN, $options, 4),
38 38
                 $this->getOption(self::OPT_MAX_LEN, $options, 12),
39
-                $this->getOption(self::OPT_ALLOWED_SPECIAL_CHARS, $options, ['-', '_']));
39
+                $this->getOption(self::OPT_ALLOWED_SPECIAL_CHARS, $options, [ '-', '_' ]));
40 40
         }
41 41
 
42 42
         $result = $validator->validate($username, $options);
Please login to merge, or discard this patch.
src/Validator/UsernameValidator.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -30,9 +30,9 @@
 block discarded – undo
30 30
     /**
31 31
      * @var array $allowedChars
32 32
      */
33
-    private $allowedSpecialChars = [];
33
+    private $allowedSpecialChars = [ ];
34 34
 
35
-    public function __construct(int $minLength = 4, int $maxLength = 12, $allowedSpecialChars = [])
35
+    public function __construct(int $minLength = 4, int $maxLength = 12, $allowedSpecialChars = [ ])
36 36
     {
37 37
         $this->minLength = $minLength;
38 38
         $this->maxLength = $maxLength;
Please login to merge, or discard this patch.