Skip to content

Commit fa43ce4

Browse files
authored
[PWA-2721] upward-php latest develop not compatible with php 7.4 on cloud pro. (#8)
* Remove types that don't support 7.4 * Code style fixes * Add attribute until we drop support for 7.4
1 parent 2f1066a commit fa43ce4

File tree

4 files changed

+9
-6
lines changed

4 files changed

+9
-6
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,5 +151,6 @@ fabric.properties
151151
# End of https://www.gitignore.io/api/macos,linux,composer,phpstorm,visualstudiocode
152152

153153
.php_cs.cache
154+
.php-cs-fixer.cache
154155
phpunit.xml
155156
node_modules

src/AbstractKeyValueStore.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@ public function count(): int
2727
return \count($this->data);
2828
}
2929

30-
public function current(): mixed
30+
#[\ReturnTypeWillChange]
31+
public function current()
3132
{
3233
return $this->get($this->key());
3334
}
@@ -123,15 +124,14 @@ public function isList(): bool
123124

124125
/**
125126
* Data to include when serializing to JSON.
126-
*
127-
* @return array
128127
*/
129-
public function jsonSerialize(): mixed
128+
public function jsonSerialize(): array
130129
{
131130
return $this->toArray();
132131
}
133132

134-
public function key(): mixed
133+
#[\ReturnTypeWillChange]
134+
public function key()
135135
{
136136
return key($this->data);
137137
}

src/Controller.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ class Controller
2828
private $request;
2929

3030
/**
31+
* @param ?array $additionalResolvers
32+
*
3133
* @throws \RuntimeException if a required key is missing from $upwardCofig file
3234
*/
3335
public function __construct(

src/ResolverFactory.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ class ResolverFactory
3030
self::RESOLVER_TYPE_PROXY => Resolver\Proxy::class,
3131
self::RESOLVER_TYPE_SERVICE => Resolver\Service::class,
3232
self::RESOLVER_TYPE_TEMPLATE => Resolver\Template::class,
33-
self::RESOLVER_TYPE_URL => Resolver\Url::class
33+
self::RESOLVER_TYPE_URL => Resolver\Url::class,
3434
];
3535

3636
/**

0 commit comments

Comments
 (0)