Skip to content

Commit 31c9110

Browse files
mpociotgithub-actions[bot]
authored andcommitted
Fix styling
1 parent 6361c35 commit 31c9110

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

src/Compactor/Php.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ protected function compactContent(string $contents): string
3636
// Note: $tokens may be updated by reference as well!
3737
$retokenized = $this->retokenizeAttribute($tokens, $index);
3838

39-
if (null !== $retokenized) {
39+
if ($retokenized !== null) {
4040
array_splice($tokens, $index, 1, $retokenized);
4141
$tokenCount = count($tokens);
4242
}
@@ -65,7 +65,7 @@ protected function compactContent(string $contents): string
6565
// Handle whitespace potentially being split into two tokens after attribute retokenization.
6666
$nextToken = $tokens[$index + 1] ?? null;
6767

68-
if (null !== $nextToken
68+
if ($nextToken !== null
6969
&& $nextToken->is(T_WHITESPACE)
7070
) {
7171
$whitespace .= $nextToken->text;
@@ -119,16 +119,16 @@ private static function findAttributeCloser(array $tokens, int $opener): ?int
119119
$tokenText = $tokens[$i]->text;
120120

121121
// Allow for short arrays within attributes.
122-
if ('[' === $tokenText) {
122+
if ($tokenText === '[') {
123123
$brackets[] = $i;
124124

125125
continue;
126126
}
127127

128-
if (']' === $tokenText) {
128+
if ($tokenText === ']') {
129129
array_pop($brackets);
130130

131-
if (0 === count($brackets)) {
131+
if (count($brackets) === 0) {
132132
$closer = $i;
133133
break;
134134
}
@@ -157,7 +157,7 @@ private function retokenizeAttribute(array &$tokens, int $opener): ?array
157157

158158
// Multi-line attribute or attribute containing something which looks like a PHP close tag.
159159
// Retokenize the rest of the file after the attribute opener.
160-
if (null === $closer) {
160+
if ($closer === null) {
161161
foreach (array_slice($tokens, $opener + 1) as $token) {
162162
$attributeBody .= $token->text;
163163
}
@@ -167,7 +167,7 @@ private function retokenizeAttribute(array &$tokens, int $opener): ?array
167167

168168
$closer = self::findAttributeCloser($subTokens, 0);
169169

170-
if (null !== $closer) {
170+
if ($closer !== null) {
171171
array_splice(
172172
$tokens,
173173
$opener + 1,
@@ -179,7 +179,7 @@ private function retokenizeAttribute(array &$tokens, int $opener): ?array
179179
}
180180
}
181181

182-
if (null === $closer) {
182+
if ($closer === null) {
183183
return null;
184184
}
185185

src/MenuBar/MenuBar.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@
1111

1212
class MenuBar
1313
{
14-
use HasVibrancy;
1514
use HasDimensions;
1615
use HasPositioner;
1716
use HasUrl;
17+
use HasVibrancy;
1818

1919
protected string $icon = '';
2020

src/Windows/Window.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@
99

1010
class Window
1111
{
12-
use HasVibrancy;
1312
use HasDimensions;
1413
use HasUrl;
14+
use HasVibrancy;
1515

1616
protected bool $autoHideMenuBar = false;
1717

0 commit comments

Comments
 (0)