Skip to content

Commit 85783c8

Browse files
authored
Merge pull request #155 from 8ctopus/v.next
Fix deprecations on v.next branch
2 parents c62932a + bdfbd9a commit 85783c8

5 files changed

Lines changed: 9 additions & 4 deletions

File tree

src/ArrayTrait.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ public function offsetSet(mixed $offset, mixed $value): void
5959
* @return bool
6060
* @ignore
6161
*/
62+
#[\ReturnTypeWillChange]
6263
public function offsetExists($offset)
6364
{
6465
return is_callable([$this, 'get' . $offset]) ||
@@ -70,6 +71,7 @@ public function offsetExists($offset)
7071
* @param string $offset
7172
* @ignore
7273
*/
74+
#[\ReturnTypeWillChange]
7375
public function offsetUnset($offset)
7476
{
7577

@@ -84,6 +86,7 @@ public function offsetUnset($offset)
8486
* @return mixed|null
8587
* @ignore
8688
*/
89+
#[\ReturnTypeWillChange]
8790
public function offsetGet($offset)
8891
{
8992

src/Element/Declaration/Config.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ public static function getPath(string $path, mixed $default = null): mixed
109109
* @param mixed|null $default
110110
* @return array|mixed|null
111111
*/
112-
public static function getProperty (string $name = null, mixed $default = null): mixed
112+
public static function getProperty (?string $name = null, mixed $default = null): mixed
113113
{
114114

115115
if (is_null($name)) {
@@ -140,7 +140,7 @@ public static function getProperty (string $name = null, mixed $default = null):
140140
* @return array
141141
* @ignore
142142
*/
143-
public static function addSet ($shorthand, $pattern, array $properties, string $separator = null, string $shorthandOverride = null): array
143+
public static function addSet ($shorthand, $pattern, array $properties, ?string $separator = null, ?string $shorthandOverride = null): array
144144
{
145145

146146
$config = [];

src/Value/FontFamily.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ class FontFamily extends ShortHand
1212
* @inheritDoc
1313
*/
1414
public static function matchToken ($token, $previousToken = null, $previousValue = null, $nextToken = null, $nextValue = null, ?int $index = null, array $tokens = []): bool {
15+
return false;
16+
}
1517

1618
protected static string $propertyType = 'css-string';
1719
}

src/Value/ParsableTrait.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ trait ParsableTrait
88
/**
99
* @inheritDoc
1010
*/
11-
public static function matchToken ($token, $previousToken = null, $previousValue = null, $nextToken = null, $nextValue = null, int $index = null, array $tokens = []): bool {
11+
public static function matchToken ($token, $previousToken = null, $previousValue = null, $nextToken = null, $nextValue = null, ?int $index = null, array $tokens = []): bool {
1212

1313
return $token->type == static::$propertyType || (isset($token->value) && in_array($token->value, static::$keywords)) || $token->type == static::type();
1414
}

src/Value/Unit.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ public static function match (object $data, $type): bool {
2929
/**
3030
* @inheritDoc
3131
*/
32-
public static function matchToken($token, $previousToken = null, $previousValue = null, $nextToken = null, $nextValue = null, int $index = null, array $tokens = []): bool
32+
public static function matchToken($token, $previousToken = null, $previousValue = null, $nextToken = null, $nextValue = null, ?int $index = null, array $tokens = []): bool
3333
{
3434

3535
return $token->type == 'unit' || in_array($token->value, static::$keywords) || $token->type == static::type();

0 commit comments

Comments
 (0)