Test Setup Failed
Pull Request — latest (#3)
by Mark
32:07
created
src/Exception/UnarchiveException.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@
 block discarded – undo
10 10
 {
11 11
     public function __construct(string $filename, ?string $message = null, ?Throwable $previous = null)
12 12
     {
13
-        if (! isset($message)) {
13
+        if (!isset($message)) {
14 14
             $message = \sprintf('Empty or corrupted archive: %s.', $filename);
15 15
         }
16 16
 
Please login to merge, or discard this patch.
src/Util/ImmutableArrayIterator.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
      */
48 48
     public function offsetExists($index) // phpcs:ignore
49 49
     {
50
-        if (! \array_key_exists($index, $this->getArrayCopy())) {
50
+        if (!\array_key_exists($index, $this->getArrayCopy())) {
51 51
             throw new \OutOfRangeException(\sprintf('Unknown property: %s', $index));
52 52
         }
53 53
 
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
         }
67 67
 
68 68
         $method = 'get' . \ucfirst(\substr($key, 0, 3) === 'get' ? \substr($key, 3) : $key);
69
-        if (! \method_exists($this, $method)) {
69
+        if (!\method_exists($this, $method)) {
70 70
             throw new \OutOfRangeException(\sprintf('Unknown property: %s', $key));
71 71
         }
72 72
 
Please login to merge, or discard this patch.
src/Util/Property.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -36,9 +36,9 @@  discard block
 block discarded – undo
36 36
         \preg_match(self::REGEX, $type, $matches, PREG_UNMATCHED_AS_NULL);
37 37
         $this->callback      = (string) ($matches['callback'] ?? null);
38 38
         $this->customType    = (string) ($matches['customType'] ?? null);
39
-        $this->emptyNullable = ! ! ($matches['emptyNullable'] ?? false);
40
-        $this->iterable      = ! ! ($matches['iterable'] ?? false);
41
-        $this->nullable      = ! ! ($this->emptyNullable || ($matches['nullable'] ?? false));
39
+        $this->emptyNullable = !!($matches['emptyNullable'] ?? false);
40
+        $this->iterable      = !!($matches['iterable'] ?? false);
41
+        $this->nullable      = !!($this->emptyNullable || ($matches['nullable'] ?? false));
42 42
         $this->type          = (string) ($matches['type'] ?? 'mixed');
43 43
         $this->isPhpType     = \in_array($this->type, self::TYPES, true);
44 44
     }
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
     public function castValue($value)
80 80
     {
81 81
         // Immediately return if nullable or empty.
82
-        if (($this->nullable && $value === null) || ($this->emptyNullable && ! $value)) {
82
+        if (($this->nullable && $value === null) || ($this->emptyNullable && !$value)) {
83 83
             return null;
84 84
         }
85 85
 
@@ -126,7 +126,7 @@  discard block
 block discarded – undo
126 126
             Normalize::setType($value, $this->type);
127 127
         }
128 128
 
129
-        return $this->emptyNullable && ! $value
129
+        return $this->emptyNullable && !$value
130 130
             ? null
131 131
             : $value;
132 132
     }
Please login to merge, or discard this patch.
src/Node/Node.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
         $this->next        = $sibling;
100 100
         $sibling->setParent($this->parent);
101 101
 
102
-        if (! $sibling->next && $sibling->parent) {
102
+        if (!$sibling->next && $sibling->parent) {
103 103
             $sibling->parent->lastChild = $sibling;
104 104
         }
105 105
     }
@@ -120,7 +120,7 @@  discard block
 block discarded – undo
120 120
         $this->previous = $sibling;
121 121
         $sibling->setParent($this->parent);
122 122
 
123
-        if (! $sibling->previous && $sibling->parent) {
123
+        if (!$sibling->previous && $sibling->parent) {
124 124
             $sibling->parent->firstChild = $sibling;
125 125
         }
126 126
     }
Please login to merge, or discard this patch.
src/Input/Input.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@
 block discarded – undo
47 47
 
48 48
     public function __construct(string $content, int $lineOffset = 0)
49 49
     {
50
-        if (! \mb_check_encoding($content, 'UTF-8')) {
50
+        if (!\mb_check_encoding($content, 'UTF-8')) {
51 51
             throw new UnexpectedEncodingException('Unexpected encoding - UTF-8 or ASCII was expected');
52 52
         }
53 53
 
Please login to merge, or discard this patch.
src/Util/Normalize.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
                 $emoji = new Emoji($emoji);
76 76
             }
77 77
 
78
-            if (! $emoji instanceof Emoji) {
78
+            if (!$emoji instanceof Emoji) {
79 79
                 throw new \RuntimeException(\sprintf('Passed array item must be an instance of %s.', Emoji::class));
80 80
             }
81 81
 
@@ -157,7 +157,7 @@  discard block
 block discarded – undo
157 157
     public static function setType(&$value, string $type): bool
158 158
     {
159 159
         // Immediately return if not a valid type.
160
-        if (! isset(self::TYPE_METHODS[$type])) {
160
+        if (!isset(self::TYPE_METHODS[$type])) {
161 161
             $value = null;
162 162
 
163 163
             return false;
@@ -182,7 +182,7 @@  discard block
 block discarded – undo
182 182
 
183 183
         /** @var string|string[] $shortcodes */
184 184
         foreach (\func_get_args() as $shortcodes) {
185
-            $normalized = \array_merge($normalized, \array_map(static function ($shortcode) {
185
+            $normalized = \array_merge($normalized, \array_map(static function($shortcode) {
186 186
                 return \preg_replace('/[^a-z0-9-]/', '-', \strtolower(\trim((string) $shortcode, ':(){}[]')));
187 187
             }, (array) $shortcodes));
188 188
         }
Please login to merge, or discard this patch.
src/Extension/EmojiCoreProcessor.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -42,12 +42,12 @@
 block discarded – undo
42 42
         // Ensure emojis are set to the correct stringable type.
43 43
         $walker = $e->getDocument()->walker();
44 44
         while ($event = $walker->next()) {
45
-            if (! $event->isEntering()) {
45
+            if (!$event->isEntering()) {
46 46
                 continue;
47 47
             }
48 48
 
49 49
             $node = $event->getNode();
50
-            if (! ($node instanceof Emoji)) {
50
+            if (!($node instanceof Emoji)) {
51 51
                 continue;
52 52
             }
53 53
 
Please login to merge, or discard this patch.
src/Parser/EmojiParser.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
         $this->lexer->moveNext();
68 68
 
69 69
         while (true) {
70
-            if (! $this->lexer->lookahead) {
70
+            if (!$this->lexer->lookahead) {
71 71
                 break;
72 72
             }
73 73
 
@@ -94,12 +94,12 @@  discard block
 block discarded – undo
94 94
     protected function parseEmoji(int $type, string $value): ?Emoji
95 95
     {
96 96
         // Immediately return if not a valid type.
97
-        if (! isset(self::INDICES[$type])) {
97
+        if (!isset(self::INDICES[$type])) {
98 98
             return null;
99 99
         }
100 100
 
101 101
         // Return if no emoji could be found.
102
-        if (! ($emoji = $this->environment->getRuntimeDataset(self::INDICES[$type])->offsetGet($value))) {
102
+        if (!($emoji = $this->environment->getRuntimeDataset(self::INDICES[$type])->offsetGet($value))) {
103 103
             return null;
104 104
         }
105 105
 
@@ -120,7 +120,7 @@  discard block
 block discarded – undo
120 120
             $this->lexer->moveNext();
121 121
         }
122 122
 
123
-        if (! $text) {
123
+        if (!$text) {
124 124
             return null;
125 125
         }
126 126
 
Please login to merge, or discard this patch.
src/Dataset/RuntimeDataset.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -56,13 +56,13 @@  discard block
 block discarded – undo
56 56
 
57 57
     public static function unarchive(string $filename): Dataset
58 58
     {
59
-        if (! \file_exists($filename)) {
59
+        if (!\file_exists($filename)) {
60 60
             throw new FileNotFoundException($filename);
61 61
         }
62 62
 
63 63
         if (
64
-            ! ($contents = \file_get_contents($filename)) ||
65
-            ! ($decoded = \gzdecode($contents))
64
+            !($contents = \file_get_contents($filename)) ||
65
+            !($decoded = \gzdecode($contents))
66 66
         ) {
67 67
             throw new UnarchiveException($filename);
68 68
         }
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
             throw new MalformedArchiveException($filename, $throwable);
75 75
         }
76 76
 
77
-        if (! $dataset instanceof Dataset) {
77
+        if (!$dataset instanceof Dataset) {
78 78
             throw new MalformedArchiveException($filename);
79 79
         }
80 80
 
Please login to merge, or discard this patch.