Skip to content

Commit 8041ea3

Browse files
committed
Fix PHPStan and code style issues
Signed-off-by: Nicolai Ehrhardt <245527909+predictor2718@users.noreply.github.com>
1 parent 26b7d61 commit 8041ea3

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

phpstan-baseline.neon

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1620,11 +1620,6 @@ parameters:
16201620
count: 1
16211621
path: src/Token.php
16221622

1623-
-
1624-
message: "#^Only booleans are allowed in a negated boolean, int\\<0, 16\\> given\\.$#"
1625-
count: 1
1626-
path: src/Token.php
1627-
16281623
-
16291624
message: "#^Only booleans are allowed in a negated boolean, int\\<0, 2\\> given\\.$#"
16301625
count: 1

src/Token.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,10 @@ public function extract()
264264
}
265265
} elseif (($this->flags & self::FLAG_NUMBER_APPROXIMATE) || ($this->flags & self::FLAG_NUMBER_FLOAT)) {
266266
$ret = (float) $ret;
267-
} elseif (! ($this->flags & self::FLAG_NUMBER_BINARY) && ! ($this->flags & self::FLAG_NUMBER_HEX_STRING)) {
267+
} elseif (
268+
($this->flags & self::FLAG_NUMBER_BINARY) === 0
269+
&& ($this->flags & self::FLAG_NUMBER_HEX_STRING) === 0
270+
) {
268271
$ret = (int) $ret;
269272
}
270273

0 commit comments

Comments
 (0)