WebProject-xyz/ikea-tradfri-php

View on GitHub
Lock file maintenance #1259
renovate[bot] authored 7175eead
complete00:00:27
1
git clone
2
codeclimate validate-config
View output
codeclimate validate-config
No errors or warnings found in .codeclimate.yml.
3
codeclimate prepare
View output
codeclimate prepare
4
builder pull-engines
View output
determining required images
docker pull codeclimate/codeclimate-phpmd:b291
b291: Pulling from codeclimate/codeclimate-phpmd
41dcc117e123: Pulling fs layer
e7cb8c1bd7da: Pulling fs layer
382dd9e936d2: Pulling fs layer
01d3fd4ccf07: Pulling fs layer
d54cbc0233c4: Pulling fs layer
a01b3d804127: Pulling fs layer
02aaff91dfc2: Pulling fs layer
25d9a4b72163: Pulling fs layer
378b764b6ee5: Pulling fs layer
d8ae1ee899c7: Pulling fs layer
f11257bedacf: Pulling fs layer
40adf26d4529: Pulling fs layer
01d3fd4ccf07: Waiting
d54cbc0233c4: Waiting
02aaff91dfc2: Waiting
a01b3d804127: Waiting
25d9a4b72163: Waiting
f11257bedacf: Waiting
378b764b6ee5: Waiting
40adf26d4529: Waiting
d8ae1ee899c7: Waiting
382dd9e936d2: Verifying Checksum
382dd9e936d2: Download complete
e7cb8c1bd7da: Verifying Checksum
e7cb8c1bd7da: Download complete
41dcc117e123: Verifying Checksum
41dcc117e123: Download complete
01d3fd4ccf07: Verifying Checksum
01d3fd4ccf07: Download complete
d54cbc0233c4: Verifying Checksum
d54cbc0233c4: Download complete
41dcc117e123: Pull complete
a01b3d804127: Download complete
e7cb8c1bd7da: Pull complete
25d9a4b72163: Verifying Checksum
25d9a4b72163: Download complete
382dd9e936d2: Pull complete
02aaff91dfc2: Verifying Checksum
01d3fd4ccf07: Pull complete
d8ae1ee899c7: Download complete
378b764b6ee5: Download complete
d54cbc0233c4: Pull complete
f11257bedacf: Download complete
a01b3d804127: Pull complete
40adf26d4529: Verifying Checksum
40adf26d4529: Download complete
02aaff91dfc2: Pull complete
25d9a4b72163: Pull complete
378b764b6ee5: Pull complete
d8ae1ee899c7: Pull complete
f11257bedacf: Pull complete
40adf26d4529: Pull complete
Digest: sha256:100ad83154de1d7143edb4360753a5a3c2c35f8a0fd8f00352718003e2b63bfa
Status: Downloaded newer image for registry.prod.codeclimate.net/codeclimate/codeclimate-phpmd:b291
docker pull codeclimate/codeclimate-phpcodesniffer:b163
b163: Pulling from codeclimate/codeclimate-phpcodesniffer
a0710691c81a: Pulling fs layer
a3ed95caeb02: Pulling fs layer
f3c17b6c6935: Pulling fs layer
c3166a36a8d9: Pulling fs layer
83a051f0858f: Pulling fs layer
f0e9f15ec462: Pulling fs layer
034c114563b8: Pulling fs layer
5edc25e33d4e: Pulling fs layer
83a051f0858f: Waiting
f0e9f15ec462: Waiting
c3166a36a8d9: Waiting
034c114563b8: Waiting
5edc25e33d4e: Waiting
a3ed95caeb02: Verifying Checksum
a3ed95caeb02: Download complete
f3c17b6c6935: Verifying Checksum
f3c17b6c6935: Download complete
a0710691c81a: Verifying Checksum
a0710691c81a: Download complete
83a051f0858f: Verifying Checksum
83a051f0858f: Download complete
a0710691c81a: Pull complete
a3ed95caeb02: Pull complete
c3166a36a8d9: Verifying Checksum
c3166a36a8d9: Download complete
034c114563b8: Verifying Checksum
034c114563b8: Download complete
f3c17b6c6935: Pull complete
5edc25e33d4e: Download complete
f0e9f15ec462: Verifying Checksum
f0e9f15ec462: Download complete
c3166a36a8d9: Pull complete
83a051f0858f: Pull complete
f0e9f15ec462: Pull complete
034c114563b8: Pull complete
5edc25e33d4e: Pull complete
Digest: sha256:cab8fcc753b6ae0e309b899665b22b1b62c26c56dab9b3c6a938fa72ca7c0640
Status: Downloaded newer image for registry.prod.codeclimate.net/codeclimate/codeclimate-phpcodesniffer:b163
docker pull codeclimate/codeclimate-sonar-php:b23
b23: Pulling from codeclimate/codeclimate-sonar-php
97518928ae5f: Pulling fs layer
043df9f67e9a: Pulling fs layer
a42e650909d2: Pulling fs layer
0dff3d7a1a0e: Pulling fs layer
e109c25d106c: Pulling fs layer
b2fb00c172a9: Pulling fs layer
1519b1438731: Pulling fs layer
cfbd8af1af7a: Pulling fs layer
ea3b98fb78f4: Pulling fs layer
1c654bf89a09: Pulling fs layer
1519b1438731: Waiting
cfbd8af1af7a: Waiting
e109c25d106c: Waiting
ea3b98fb78f4: Waiting
0dff3d7a1a0e: Waiting
b2fb00c172a9: Waiting
1c654bf89a09: Waiting
a42e650909d2: Verifying Checksum
a42e650909d2: Download complete
97518928ae5f: Download complete
e109c25d106c: Verifying Checksum
e109c25d106c: Download complete
97518928ae5f: Pull complete
b2fb00c172a9: Download complete
0dff3d7a1a0e: Verifying Checksum
0dff3d7a1a0e: Download complete
cfbd8af1af7a: Verifying Checksum
cfbd8af1af7a: Download complete
043df9f67e9a: Download complete
1519b1438731: Verifying Checksum
1519b1438731: Download complete
ea3b98fb78f4: Verifying Checksum
ea3b98fb78f4: Download complete
043df9f67e9a: Pull complete
a42e650909d2: Pull complete
1c654bf89a09: Download complete
0dff3d7a1a0e: Pull complete
e109c25d106c: Pull complete
b2fb00c172a9: Pull complete
1519b1438731: Pull complete
cfbd8af1af7a: Pull complete
ea3b98fb78f4: Pull complete
1c654bf89a09: Pull complete
Digest: sha256:600639355d67f629857951762cd4d8d2bc9eb16a0496c67a3d6049830edcc87b
Status: Downloaded newer image for registry.prod.codeclimate.net/codeclimate/codeclimate-sonar-php:b23
5
structure
View output
12
Parser process id: 12
codeclimate-parser socket not present
waiting 1s...
W, [2024-04-26T02:10:56.210719 #1]  WARN -- : Skipping src/Service/GatewayApiService.php due to CC::Parser::Client::HTTPError
W, [2024-04-26T02:10:56.210766 #1]  WARN -- : Response status: 422
W, [2024-04-26T02:10:56.214027 #1]  WARN -- : Skipping src/Service/ServiceInterface.php due to CC::Parser::Client::HTTPError
W, [2024-04-26T02:10:56.214055 #1]  WARN -- : Response status: 422
W, [2024-04-26T02:10:56.222402 #1]  WARN -- : Skipping src/Serializer/Normalizer/ArrayNestingNormalizer.php due to CC::Parser::Client::HTTPError
W, [2024-04-26T02:10:56.222429 #1]  WARN -- : Response status: 422
W, [2024-04-26T02:10:56.225021 #1]  WARN -- : Skipping src/Serializer/JsonDeviceDataSerializer.php due to CC::Parser::Client::HTTPError
W, [2024-04-26T02:10:56.225055 #1]  WARN -- : Response status: 422
W, [2024-04-26T02:10:56.227245 #1]  WARN -- : Skipping src/Command/Put.php due to CC::Parser::Client::HTTPError
W, [2024-04-26T02:10:56.227277 #1]  WARN -- : Response status: 422
W, [2024-04-26T02:10:56.229893 #1]  WARN -- : Skipping src/Command/AbstractCommand.php due to CC::Parser::Client::HTTPError
W, [2024-04-26T02:10:56.229919 #1]  WARN -- : Response status: 422
W, [2024-04-26T02:10:56.231801 #1]  WARN -- : Skipping src/Command/Post.php due to CC::Parser::Client::HTTPError
W, [2024-04-26T02:10:56.231825 #1]  WARN -- : Response status: 422
W, [2024-04-26T02:10:56.233873 #1]  WARN -- : Skipping src/Command/GatewayHelperCommands.php due to CC::Parser::Client::HTTPError
W, [2024-04-26T02:10:56.233900 #1]  WARN -- : Response status: 422
W, [2024-04-26T02:10:56.245004 #1]  WARN -- : Skipping src/Command/Coap/Group/GroupSwitchStateCommand.php due to CC::Parser::Client::HTTPError
W, [2024-04-26T02:10:56.245036 #1]  WARN -- : Response status: 422
W, [2024-04-26T02:10:56.249209 #1]  WARN -- : Skipping src/Command/Coap/Group/GroupDimmerCommand.php due to CC::Parser::Client::HTTPError
W, [2024-04-26T02:10:56.249242 #1]  WARN -- : Response status: 422
W, [2024-04-26T02:10:56.253824 #1]  WARN -- : Skipping src/Command/Coap/Keys.php due to CC::Parser::Client::HTTPError
W, [2024-04-26T02:10:56.253857 #1]  WARN -- : Response status: 422
W, [2024-04-26T02:10:56.256768 #1]  WARN -- : Skipping src/Command/Coap/Receiver.php due to CC::Parser::Client::HTTPError
W, [2024-04-26T02:10:56.256801 #1]  WARN -- : Response status: 422
W, [2024-04-26T02:10:56.260089 #1]  WARN -- : Skipping src/Command/Coap/Light/LightSwitchStateCommand.php due to CC::Parser::Client::HTTPError
W, [2024-04-26T02:10:56.260117 #1]  WARN -- : Response status: 422
W, [2024-04-26T02:10:56.262379 #1]  WARN -- : Skipping src/Command/Coap/Light/LightDimmerCommand.php due to CC::Parser::Client::HTTPError
W, [2024-04-26T02:10:56.262407 #1]  WARN -- : Response status: 422
W, [2024-04-26T02:10:56.265844 #1]  WARN -- : Skipping src/Command/Coap/Light/LightChangeLightTemperatureCommand.php due to CC::Parser::Client::HTTPError
W, [2024-04-26T02:10:56.265876 #1]  WARN -- : Response status: 422
W, [2024-04-26T02:10:56.267830 #1]  WARN -- : Skipping src/Command/Coap/Blinds/BlindsGetCurrentPositionCommand.php due to CC::Parser::Client::HTTPError
W, [2024-04-26T02:10:56.267857 #1]  WARN -- : Response status: 422
W, [2024-04-26T02:10:56.271905 #1]  WARN -- : Skipping src/Command/Get.php due to CC::Parser::Client::HTTPError
W, [2024-04-26T02:10:56.271930 #1]  WARN -- : Response status: 422
W, [2024-04-26T02:10:56.303560 #1]  WARN -- : Skipping src/Adapter/CoapAdapter.php due to CC::Parser::Client::HTTPError
W, [2024-04-26T02:10:56.303590 #1]  WARN -- : Response status: 422
W, [2024-04-26T02:10:56.344646 #1]  WARN -- : Skipping src/Dto/CoapResponse/DeviceDto.php due to CC::Parser::Client::HTTPError
W, [2024-04-26T02:10:56.344671 #1]  WARN -- : Response status: 422
W, [2024-04-26T02:10:56.346434 #1]  WARN -- : Skipping src/Dto/CoapResponse/BlindControlDto.php due to CC::Parser::Client::HTTPError
W, [2024-04-26T02:10:56.346461 #1]  WARN -- : Response status: 422
W, [2024-04-26T02:10:56.348246 #1]  WARN -- : Skipping src/Dto/CoapResponse/LightControlDto.php due to CC::Parser::Client::HTTPError
W, [2024-04-26T02:10:56.348271 #1]  WARN -- : Response status: 422
W, [2024-04-26T02:10:56.350109 #1]  WARN -- : Skipping src/Dto/CoapResponse/DeviceInfoDto.php due to CC::Parser::Client::HTTPError
W, [2024-04-26T02:10:56.350135 #1]  WARN -- : Response status: 422
W, [2024-04-26T02:10:56.352160 #1]  WARN -- : Skipping src/Dto/CoapResponse/GroupDto.php due to CC::Parser::Client::HTTPError
W, [2024-04-26T02:10:56.352195 #1]  WARN -- : Response status: 422
W, [2024-04-26T02:10:56.354168 #1]  WARN -- : Skipping src/Dto/CoapGatewayRequestPayloadDto.php due to CC::Parser::Client::HTTPError
W, [2024-04-26T02:10:56.354193 #1]  WARN -- : Response status: 422
W, [2024-04-26T02:10:56.356055 #1]  WARN -- : Skipping src/Dto/CoapGatewayAuthConfigDto.php due to CC::Parser::Client::HTTPError
W, [2024-04-26T02:10:56.356080 #1]  WARN -- : Response status: 422
W, [2024-04-26T02:10:56.405324 #1]  WARN -- : Skipping src/Device/Helper/Type.php due to CC::Parser::Client::HTTPError
W, [2024-04-26T02:10:56.405359 #1]  WARN -- : Response status: 422
W, [2024-04-26T02:10:56.435458 #1]  WARN -- : Skipping src/Factory/GatewayServiceFactory.php due to CC::Parser::Client::HTTPError
W, [2024-04-26T02:10:56.435484 #1]  WARN -- : Response status: 422
6
duplication
View output
12
Parser process id: 12
codeclimate-parser socket not present
waiting 1s...
W, [2024-04-26T02:10:59.903413 #1]  WARN -- : Skipping ./src/Service/GatewayApiService.php due to CC::Parser::Client::HTTPError
W, [2024-04-26T02:10:59.903462 #1]  WARN -- : Response status: 422
W, [2024-04-26T02:10:59.905112 #1]  WARN -- : Skipping ./src/Service/ServiceInterface.php due to CC::Parser::Client::HTTPError
W, [2024-04-26T02:10:59.905142 #1]  WARN -- : Response status: 422
W, [2024-04-26T02:10:59.909893 #1]  WARN -- : Skipping ./src/Serializer/Normalizer/ArrayNestingNormalizer.php due to CC::Parser::Client::HTTPError
W, [2024-04-26T02:10:59.910111 #1]  WARN -- : Response status: 422
W, [2024-04-26T02:10:59.912254 #1]  WARN -- : Skipping ./src/Serializer/JsonDeviceDataSerializer.php due to CC::Parser::Client::HTTPError
W, [2024-04-26T02:10:59.912282 #1]  WARN -- : Response status: 422
W, [2024-04-26T02:10:59.915217 #1]  WARN -- : Skipping ./src/Command/Put.php due to CC::Parser::Client::HTTPError
W, [2024-04-26T02:10:59.915319 #1]  WARN -- : Response status: 422
W, [2024-04-26T02:10:59.915283 #1]  WARN -- : Skipping ./src/Command/AbstractCommand.php due to CC::Parser::Client::HTTPError
W, [2024-04-26T02:10:59.915440 #1]  WARN -- : Response status: 422
W, [2024-04-26T02:10:59.917239 #1]  WARN -- : Skipping ./src/Command/Post.php due to CC::Parser::Client::HTTPError
W, [2024-04-26T02:10:59.917263 #1]  WARN -- : Response status: 422
W, [2024-04-26T02:10:59.918373 #1]  WARN -- : Skipping ./src/Command/GatewayHelperCommands.php due to CC::Parser::Client::HTTPError
W, [2024-04-26T02:10:59.918399 #1]  WARN -- : Response status: 422
W, [2024-04-26T02:10:59.921039 #1]  WARN -- : Skipping ./src/Command/Coap/Group/GroupSwitchStateCommand.php due to CC::Parser::Client::HTTPError
W, [2024-04-26T02:10:59.921064 #1]  WARN -- : Response status: 422
W, [2024-04-26T02:10:59.922408 #1]  WARN -- : Skipping ./src/Command/Coap/Group/GroupDimmerCommand.php due to CC::Parser::Client::HTTPError
W, [2024-04-26T02:10:59.922432 #1]  WARN -- : Response status: 422
W, [2024-04-26T02:10:59.924722 #1]  WARN -- : Skipping ./src/Command/Coap/Keys.php due to CC::Parser::Client::HTTPError
W, [2024-04-26T02:10:59.924748 #1]  WARN -- : Response status: 422
W, [2024-04-26T02:10:59.925795 #1]  WARN -- : Skipping ./src/Command/Coap/Receiver.php due to CC::Parser::Client::HTTPError
W, [2024-04-26T02:10:59.925818 #1]  WARN -- : Response status: 422
W, [2024-04-26T02:10:59.926913 #1]  WARN -- : Skipping ./src/Command/Coap/Light/LightSwitchStateCommand.php due to CC::Parser::Client::HTTPError
W, [2024-04-26T02:10:59.926937 #1]  WARN -- : Response status: 422
W, [2024-04-26T02:10:59.927917 #1]  WARN -- : Skipping ./src/Command/Coap/Light/LightDimmerCommand.php due to CC::Parser::Client::HTTPError
W, [2024-04-26T02:10:59.927946 #1]  WARN -- : Response status: 422
W, [2024-04-26T02:10:59.928963 #1]  WARN -- : Skipping ./src/Command/Coap/Light/LightChangeLightTemperatureCommand.php due to CC::Parser::Client::HTTPError
W, [2024-04-26T02:10:59.928989 #1]  WARN -- : Response status: 422
W, [2024-04-26T02:10:59.930004 #1]  WARN -- : Skipping ./src/Command/Coap/Blinds/BlindsGetCurrentPositionCommand.php due to CC::Parser::Client::HTTPError
W, [2024-04-26T02:10:59.930028 #1]  WARN -- : Response status: 422
W, [2024-04-26T02:10:59.931988 #1]  WARN -- : Skipping ./src/Command/Get.php due to CC::Parser::Client::HTTPError
W, [2024-04-26T02:10:59.932013 #1]  WARN -- : Response status: 422
W, [2024-04-26T02:10:59.957971 #1]  WARN -- : Skipping ./src/Adapter/CoapAdapter.php due to CC::Parser::Client::HTTPError
W, [2024-04-26T02:10:59.958163 #1]  WARN -- : Response status: 422
W, [2024-04-26T02:10:59.983141 #1]  WARN -- : Skipping ./src/Dto/CoapResponse/DeviceDto.php due to CC::Parser::Client::HTTPError
W, [2024-04-26T02:10:59.992542 #1]  WARN -- : Response status: 422
W, [2024-04-26T02:10:59.994260 #1]  WARN -- : Skipping ./src/Dto/CoapResponse/BlindControlDto.php due to CC::Parser::Client::HTTPError
W, [2024-04-26T02:10:59.994284 #1]  WARN -- : Response status: 422
W, [2024-04-26T02:10:59.995350 #1]  WARN -- : Skipping ./src/Dto/CoapResponse/LightControlDto.php due to CC::Parser::Client::HTTPError
W, [2024-04-26T02:10:59.995385 #1]  WARN -- : Response status: 422
W, [2024-04-26T02:10:59.996381 #1]  WARN -- : Skipping ./src/Dto/CoapResponse/DeviceInfoDto.php due to CC::Parser::Client::HTTPError
W, [2024-04-26T02:10:59.996405 #1]  WARN -- : Response status: 422
W, [2024-04-26T02:10:59.997476 #1]  WARN -- : Skipping ./src/Dto/CoapResponse/GroupDto.php due to CC::Parser::Client::HTTPError
W, [2024-04-26T02:10:59.997511 #1]  WARN -- : Response status: 422
W, [2024-04-26T02:10:59.998750 #1]  WARN -- : Skipping ./src/Dto/CoapGatewayRequestPayloadDto.php due to CC::Parser::Client::HTTPError
W, [2024-04-26T02:10:59.998775 #1]  WARN -- : Response status: 422
W, [2024-04-26T02:10:59.999838 #1]  WARN -- : Skipping ./src/Dto/CoapGatewayAuthConfigDto.php due to CC::Parser::Client::HTTPError
W, [2024-04-26T02:10:59.999873 #1]  WARN -- : Response status: 422
W, [2024-04-26T02:11:00.028365 #1]  WARN -- : Skipping ./src/Device/Helper/Type.php due to CC::Parser::Client::HTTPError
W, [2024-04-26T02:11:00.028390 #1]  WARN -- : Response status: 422
W, [2024-04-26T02:11:00.052638 #1]  WARN -- : Skipping ./src/Factory/GatewayServiceFactory.php due to CC::Parser::Client::HTTPError
W, [2024-04-26T02:11:00.052822 #1]  WARN -- : Response status: 422
7
phpmd
phpmd engine documentation
8
phpcodesniffer
phpcodesniffer engine documentation
9
sonar-php
sonar-php engine documentation
View output
INFO: Java 1.8.0_322 Amazon.com Inc. (64-bit)
INFO: Linux 4.4.0-1128-aws amd64
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/usr/src/app/build/libs/sonarlint-core-2.17.0.899.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/usr/src/app/build/libs/sonarlint-cli-2.1.0.566.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [ch.qos.logback.classic.util.ContextSelectorStaticBinder]
INFO: Index files
INFO: 99 files indexed
INFO: 80 source files to be analyzed
ERROR: Unable to parse file: /code/src/Service/GatewayApiService.php
ERROR: Parse error at line 31 column 18:

21: use IKEA\Tradfri\Device\Device;
22: use IKEA\Tradfri\Device\DeviceInterface;
23: use IKEA\Tradfri\Device\LightBulb;
24: use IKEA\Tradfri\Device\RollerBlind;
25: use IKEA\Tradfri\Device\SwitchableInterface;
26: use IKEA\Tradfri\Exception\RuntimeException;
27: use IKEA\Tradfri\Group\LightGroup;
28: 
29: final class GatewayApiService implements ServiceInterface
30: {
31:     final public const INVALID_DEVICE_TYPE = 'invalid device type: ';
                     ^
32: 
33:     public function __construct(protected ClientInterface $client)
34:     {
35:     }
36: 
37:     public function getLights(): LightBulbs
38:     {
39:         return $this->getDevices()->getLightBulbs();
40:     }
41: 

ERROR: Unable to parse file: /code/src/Service/ServiceInterface.php
ERROR: Parse error at line 38 column 40:

28:     public function getDevices(): Devices;
29: 
30:     /**
31:      * @throws \IKEA\Tradfri\Exception\RuntimeException
32:      */
33:     public function allLightsOff(LightBulbs $lightBulbsCollection): bool;
34: 
35:     /**
36:      * @throws \IKEA\Tradfri\Exception\RuntimeException
37:      */
38:     public function on(DeviceInterface&SwitchableInterface $device): bool;
                                           ^
39: 
40:     /**
41:      * @throws \IKEA\Tradfri\Exception\RuntimeException
42:      */
43:     public function off(DeviceInterface&SwitchableInterface $device): bool;
44: 
45:     /**
46:      * @throws \IKEA\Tradfri\Exception\RuntimeException
47:      */
48:     public function dim(BrightnessStateInterface&DeviceInterface $device, int $level): bool;

ERROR: Unable to parse file: /code/src/Serializer/Normalizer/ArrayNestingNormalizer.php
ERROR: Parse error at line 23 column 18:

13: 
14: namespace IKEA\Tradfri\Serializer\Normalizer;
15: 
16: use Psr\Log\LoggerAwareInterface;
17: use Symfony\Component\Serializer\Normalizer\DenormalizerInterface;
18: use Symfony\Component\Serializer\Normalizer\NormalizerInterface;
19: 
20: final class ArrayNestingNormalizer implements DenormalizerInterface, LoggerAwareInterface, NormalizerInterface
21: {
22:     use \Psr\Log\LoggerAwareTrait;
23:     final public const ATTR_LIGHT_CONTROL = 'ATTR_LIGHT_CONTROL';
                     ^
24:     final public const ATTR_DEVICE_STATE  = 'ATTR_DEVICE_STATE';
25: 
26:     public function __construct(
27:         private readonly DenormalizerInterface&NormalizerInterface $normalizer,
28:     ) {
29:     }
30: 
31:     public function normalize(mixed $object, ?string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string
32:     {
33:         return $this->normalizer->normalize($object, $format, $context);

ERROR: Unable to parse file: /code/src/Serializer/JsonDeviceDataSerializer.php
ERROR: Parse error at line 28 column 18:

18: use Symfony\Component\Serializer\Encoder\JsonEncoder;
19: use Symfony\Component\Serializer\Mapping\Factory\ClassMetadataFactory;
20: use Symfony\Component\Serializer\Mapping\Loader\AttributeLoader;
21: use Symfony\Component\Serializer\NameConverter\MetadataAwareNameConverter;
22: use Symfony\Component\Serializer\Normalizer\AbstractObjectNormalizer;
23: use Symfony\Component\Serializer\Normalizer\PropertyNormalizer;
24: use Symfony\Component\Serializer\Serializer;
25: 
26: final class JsonDeviceDataSerializer implements \Symfony\Component\Serializer\SerializerInterface
27: {
28:     final public const FORMAT = JsonEncoder::FORMAT;
                     ^
29:     private Serializer $serializer;
30: 
31:     public function __construct()
32:     {
33:         $this->initSerializer();
34:     }
35: 
36:     public function deserialize(mixed $data, string $type, string $format, array $context = []): array|DeviceDto
37:     {
38:         return $this->serializer->deserialize(

ERROR: Unable to parse file: /code/src/Command/Put.php
ERROR: Parse error at line 24 column 18:

14: namespace IKEA\Tradfri\Command;
15: 
16: use IKEA\Tradfri\Helper\CommandRunnerInterface;
17: use IKEA\Tradfri\Values\CoapCommandPattern;
18: 
19: /**
20:  * @final
21:  */
22: class Put extends AbstractCommand
23: {
24:     final public const COAP_COMMAND   = 'coap-client -m put -u "%s" -k "%s"';
                     ^
25:     private const COAP_COMMAND_FORMAT = '%s %s "%s/%s"';
26: 
27:     public function __construct(\IKEA\Tradfri\Dto\CoapGatewayAuthConfigDto $authConfig)
28:     {
29:         parent::__construct($authConfig, CoapCommandPattern::PUT);
30:     }
31: 
32:     public function requestCommand(Request|string $request, string $payload): string
33:     {
34:         if ($request instanceof Request) {

ERROR: Unable to parse file: /code/src/Command/AbstractCommand.php
ERROR: Parse error at line 21 column 9:

11:  * @see https://github.com/WebProject-xyz/ikea-tradfri-php
12:  */
13: 
14: namespace IKEA\Tradfri\Command;
15: 
16: use IKEA\Tradfri\Helper\CommandRunnerInterface;
17: 
18: abstract class AbstractCommand implements CommandInterface
19: {
20:     public function __construct(
21:         protected readonly \IKEA\Tradfri\Dto\CoapGatewayAuthConfigDto $authConfig,
            ^
22:         protected \IKEA\Tradfri\Values\CoapCommandPattern $commandPattern,
23:     ) {
24:     }
25: 
26:     public function __toString(): string
27:     {
28:         return $this->command();
29:     }
30: 
31:     final public function command(): string

ERROR: Unable to parse file: /code/src/Command/Post.php
ERROR: Parse error at line 21 column 18:

11:  * @see https://github.com/WebProject-xyz/ikea-tradfri-php
12:  */
13: 
14: namespace IKEA\Tradfri\Command;
15: 
16: use IKEA\Tradfri\Helper\CommandRunnerInterface;
17: use IKEA\Tradfri\Values\CoapCommandPattern;
18: 
19: final class Post extends AbstractCommand
20: {
21:     final public const COAP_COMMAND   = 'coap-client -m post -u "%s" -k "%s"';
                     ^
22:     private const COAP_COMMAND_FORMAT = '%s %s "%s/%s"';
23: 
24:     public function __construct(\IKEA\Tradfri\Dto\CoapGatewayAuthConfigDto $authConfig)
25:     {
26:         parent::__construct($authConfig, CoapCommandPattern::POST);
27:     }
28: 
29:     public function requestCommand(Request|string $request, string $payload): string
30:     {
31:         if ($request instanceof Request) {

ERROR: Unable to parse file: /code/src/Command/GatewayHelperCommands.php
ERROR: Parse error at line 21 column 7:

11:  * @see https://github.com/WebProject-xyz/ikea-tradfri-php
12:  */
13: 
14: namespace IKEA\Tradfri\Command;
15: 
16: use IKEA\Tradfri\Command\Coap\Keys;
17: use IKEA\Tradfri\Exception\RuntimeException;
18: use IKEA\Tradfri\Helper\CommandRunner;
19: use IKEA\Tradfri\Helper\CommandRunnerInterface;
20: 
21: final readonly class GatewayHelperCommands
          ^
22: {
23:     /**
24:      * @throws \InvalidArgumentException
25:      * @throws RuntimeException
26:      */
27:     public function __construct(
28:         private \IKEA\Tradfri\Dto\CoapGatewayAuthConfigDto $authConfig,
29:         private CommandRunnerInterface $runner = new CommandRunner(),
30:     ) {
31:     }

ERROR: Unable to parse file: /code/src/Command/Request.php
ERROR: Parse error at line 16 column 6:

 6:  * Copyright (c) 2024 Benjamin Fahl
 7:  *
 8:  * For the full copyright and license information, please view
 9:  * the LICENSE.md file that was distributed with this source code.
10:  *
11:  * @see https://github.com/WebProject-xyz/ikea-tradfri-php
12:  */
13: 
14: namespace IKEA\Tradfri\Command;
15: 
16: enum Request: string
         ^
17: {
18:     case RootDevices = Coap\Keys::ROOT_DEVICES;
19:     case RootGroups  = Coap\Keys::ROOT_GROUPS;
20:     case RootGateway = Coap\Keys::ROOT_GATEWAY;
21: 
22:     public function withTargetId(int|string $deviceId): string
23:     {
24:         return $this->value . '/' . $deviceId;
25:     }
26: }

ERROR: Unable to parse file: /code/src/Command/Coap/Group/GroupSwitchStateCommand.php
ERROR: Parse error at line 27 column 9:

17: use IKEA\Tradfri\Command\Put;
18: use IKEA\Tradfri\Command\Request;
19: use IKEA\Tradfri\Dto\CoapGatewayAuthConfigDto;
20: use IKEA\Tradfri\Dto\CoapGatewayRequestPayloadDto;
21: use IKEA\Tradfri\Helper\CommandRunnerInterface;
22: 
23: final class GroupSwitchStateCommand extends Put
24: {
25:     public function __construct(
26:         CoapGatewayAuthConfigDto $authConfig,
27:         private readonly int $groupId,
            ^
28:         private readonly bool $state,
29:     ) {
30:         parent::__construct($authConfig);
31:     }
32: 
33:     public function __toString(): string
34:     {
35:         return $this->requestCommand(
36:             Request::RootGroups->withTargetId($this->groupId),
37:             CoapGatewayRequestPayloadDto::fromValues(

ERROR: Unable to parse file: /code/src/Command/Coap/Group/GroupDimmerCommand.php
ERROR: Parse error at line 26 column 9:

16: use IKEA\Tradfri\Command\Coap\Keys;
17: use IKEA\Tradfri\Command\Put;
18: use IKEA\Tradfri\Command\Request;
19: use IKEA\Tradfri\Dto\CoapGatewayAuthConfigDto;
20: use IKEA\Tradfri\Dto\CoapGatewayRequestPayloadDto;
21: 
22: final class GroupDimmerCommand extends Put
23: {
24:     public function __construct(
25:         CoapGatewayAuthConfigDto $authConfig,
26:         private readonly int $groupId,
            ^
27:         private readonly int $level,
28:     ) {
29:         parent::__construct($authConfig);
30:     }
31: 
32:     public function __toString(): string
33:     {
34:         return $this->requestCommand(
35:             Request::RootGroups->withTargetId($this->groupId),
36:             CoapGatewayRequestPayloadDto::fromValues(

ERROR: Unable to parse file: /code/src/Command/Coap/Keys.php
ERROR: Parse error at line 24 column 18:

14: namespace IKEA\Tradfri\Command\Coap;
15: 
16: /**
17:  * @todo: enum
18:  *
19:  * @see Source and Thanks to "ggravlingen"
20:  * https://github.com/ggravlingen/pytradfri/blob/master/pytradfri/const.py
21:  */
22: final class Keys
23: {
24:     final public const ROOT_DEVICES                                = '15001';
                     ^
25:     final public const ROOT_GATEWAY                                = '15011';
26:     final public const ROOT_GROUPS                                 = '15004';
27:     final public const ROOT_MOODS                                  = '15005';
28:     final public const ROOT_NOTIFICATION                           = '15006';  // speculative name
29:     final public const ROOT_REMOTE_CONTROL                         = '15009';
30:     final public const ROOT_SIGNAL_REPEATER                        = '15014';
31:     final public const ROOT_SMART_TASKS                            = '15010';
32:     final public const ROOT_START_ACTION                           = '15013';  // found under ATTR_START_ACTION
33:     final public const ATTR_START_BLINDS                           = '15015';
34:     final public const ROOT_AIR_PURIFIER                           = '15025';

ERROR: Unable to parse file: /code/src/Command/Coap/Receiver.php
ERROR: Parse error at line 21 column 18:

11:  * @see https://github.com/WebProject-xyz/ikea-tradfri-php
12:  */
13: 
14: namespace IKEA\Tradfri\Command\Coap;
15: 
16: /**
17:  * Receiver is specific service with its own contract and can be only concrete.
18:  */
19: final class Receiver
20: {
21:     final public const COAP_COMMAND = '%s invalid %s';
                     ^
22:     private string $requestType;
23:     private string $injectCommand;
24: 
25:     /**
26:      * @var list<string>
27:      */
28:     private array $output = [];
29: 
30:     public function __construct(
31:         protected string $ipAddress,

ERROR: Unable to parse file: /code/src/Command/Coap/Light/LightSwitchStateCommand.php
ERROR: Parse error at line 27 column 9:

17: use IKEA\Tradfri\Command\Put;
18: use IKEA\Tradfri\Command\Request;
19: use IKEA\Tradfri\Dto\CoapGatewayAuthConfigDto;
20: use IKEA\Tradfri\Dto\CoapGatewayRequestPayloadDto;
21: use IKEA\Tradfri\Helper\CommandRunnerInterface;
22: 
23: final class LightSwitchStateCommand extends Put
24: {
25:     public function __construct(
26:         CoapGatewayAuthConfigDto $authConfig,
27:         private readonly int $deviceId,
            ^
28:         private readonly bool $state,
29:     ) {
30:         parent::__construct($authConfig);
31:     }
32: 
33:     public function __toString(): string
34:     {
35:         return $this->requestCommand(
36:             Request::RootDevices->withTargetId($this->deviceId),
37:             (string) CoapGatewayRequestPayloadDto::fromValues(

ERROR: Unable to parse file: /code/src/Command/Coap/Light/LightDimmerCommand.php
ERROR: Parse error at line 26 column 9:

16: use IKEA\Tradfri\Command\Coap\Keys;
17: use IKEA\Tradfri\Command\Put;
18: use IKEA\Tradfri\Command\Request;
19: use IKEA\Tradfri\Dto\CoapGatewayAuthConfigDto;
20: use IKEA\Tradfri\Dto\CoapGatewayRequestPayloadDto;
21: 
22: final class LightDimmerCommand extends Put
23: {
24:     public function __construct(
25:         CoapGatewayAuthConfigDto $authConfig,
26:         private readonly int $deviceId,
            ^
27:         private readonly int $value,
28:     ) {
29:         parent::__construct($authConfig);
30:     }
31: 
32:     public function __toString(): string
33:     {
34:         return $this->requestCommand(
35:             Request::RootDevices->withTargetId($this->deviceId),
36:             (string) CoapGatewayRequestPayloadDto::fromValues(

ERROR: Unable to parse file: /code/src/Command/Coap/Light/LightChangeLightTemperatureCommand.php
ERROR: Parse error at line 24 column 9:

14: namespace IKEA\Tradfri\Command\Coap\Light;
15: 
16: use IKEA\Tradfri\Command\Put;
17: use IKEA\Tradfri\Command\Request;
18: use IKEA\Tradfri\Dto\CoapGatewayRequestPayloadDto;
19: 
20: final class LightChangeLightTemperatureCommand extends Put
21: {
22:     public function __construct(
23:         \IKEA\Tradfri\Dto\CoapGatewayAuthConfigDto $authConfig,
24:         private readonly int $deviceId,
            ^
25:         /**
26:          * @phpstan-param value-of<\IKEA\Tradfri\Dto\CoapGatewayRequestPayloadDto::COLORS>|string $color
27:          */
28:         private readonly string $color,
29:     ) {
30:         parent::__construct($authConfig);
31:     }
32: 
33:     public function __toString(): string
34:     {

ERROR: Unable to parse file: /code/src/Command/Coap/Blinds/BlindsGetCurrentPositionCommand.php
ERROR: Parse error at line 26 column 9:

16: use IKEA\Tradfri\Command\Coap\Keys;
17: use IKEA\Tradfri\Command\Put;
18: use IKEA\Tradfri\Command\Request;
19: use IKEA\Tradfri\Dto\CoapGatewayAuthConfigDto;
20: use IKEA\Tradfri\Dto\CoapGatewayRequestPayloadDto;
21: 
22: final class BlindsGetCurrentPositionCommand extends Put
23: {
24:     public function __construct(
25:         CoapGatewayAuthConfigDto $authConfig,
26:         private readonly int $deviceId,
            ^
27:         private readonly int $value,
28:     ) {
29:         parent::__construct($authConfig);
30:     }
31: 
32:     public function __toString(): string
33:     {
34:         return $this->requestCommand(
35:             Request::RootDevices->withTargetId($this->deviceId),
36:             (string) CoapGatewayRequestPayloadDto::fromValues(

ERROR: Unable to parse file: /code/src/Command/Get.php
ERROR: Parse error at line 21 column 18:

11:  * @see https://github.com/WebProject-xyz/ikea-tradfri-php
12:  */
13: 
14: namespace IKEA\Tradfri\Command;
15: 
16: use IKEA\Tradfri\Helper\CommandRunnerInterface;
17: use IKEA\Tradfri\Values\CoapCommandPattern;
18: 
19: final class Get extends AbstractCommand
20: {
21:     final public const COAP_COMMAND                  = 'coap-client -m get -u "%s" -k "%s"';
                     ^
22:     private const COAP_COMMAND_FORMAT                = '%s "%s/%s"';
23:     private const COAP_COMMAND_FORMAT_WITH_DEVICE_ID = '%s "%s/%s/%s"';
24: 
25:     public function __construct(\IKEA\Tradfri\Dto\CoapGatewayAuthConfigDto $authConfig)
26:     {
27:         parent::__construct($authConfig, CoapCommandPattern::GET);
28:     }
29: 
30:     public function requestCommand(Request|string $request, ?int $deviceId = null): string
31:     {

ERROR: Unable to parse file: /code/src/Group/DeviceGroup.php
ERROR: Parse error at line 33 column 15:

23: use IKEA\Tradfri\Traits\ProvidesState;
24: 
25: /**
26:  * @final
27:  */
28: class DeviceGroup implements \JsonSerializable, BooleanStateInterface, DeviceInterface
29: {
30:     use ProvidesId;
31:     use ProvidesName;
32:     use ProvidesState;
33:     protected GatewayApiService|ServiceInterface $_service;
                  ^
34:     protected Devices $_devices;
35:     protected array $_deviceIds = [];
36: 
37:     public function __construct(int $deviceId, ServiceInterface $service)
38:     {
39:         $this->setId($deviceId);
40:         $this->setService($service);
41:     }
42: 
43:     public function setService(ServiceInterface $service): self

ERROR: Unable to parse file: /code/src/Mapper/MapperInterface.php
ERROR: Parse error at line 33 column 5:

23: {
24:     /**
25:      * @phpstan-param AbstractCollection $collection
26:      *
27:      * @phpstan-return AbstractCollection
28:      */
29:     public function map(
30:         ServiceInterface $service,
31:         iterable $dataItems,
32:         AbstractCollection $collection,
33:     ): AbstractCollection;
        ^
34: }
35: 

ERROR: Unable to parse file: /code/src/Mapper/GroupData.php
ERROR: Parse error at line 43 column 5:

33: 
34:     /**
35:      * @phpstan-param Groups $collection
36:      *
37:      * @phpstan-return Groups
38:      */
39:     public function map(
40:         ServiceInterface $service,
41:         iterable $dataItems,
42:         AbstractCollection $collection,
43:     ): AbstractCollection {
        ^
44:         foreach ($dataItems as $device) {
45:             if (false === $this->isValidData($device)) {
46:                 $this->logger?->warning('invalid device detected - skipped', ['device' => \serialize($device), 'type' => \get_debug_type($device)]);
47:                 continue;
48:             }
49: 
50:             $group = new LightGroup(
51:                 (int) $device->{Keys::ATTR_ID},
52:                 $service,
53:             );

ERROR: Unable to parse file: /code/src/Mapper/DeviceData.php
ERROR: Parse error at line 50 column 5:

40:      *
41:      * @phpstan-param Devices $collection
42:      * @phpstan-param DeviceDto[] $dataItems
43:      *
44:      * @phpstan-return Devices
45:      */
46:     public function map(
47:         ServiceInterface $service,
48:         iterable $dataItems,
49:         \IKEA\Tradfri\Collection\AbstractCollection $collection = new Devices(),
50:     ): \IKEA\Tradfri\Collection\AbstractCollection {
        ^
51:         foreach ($dataItems as $device) {
52:             if (!$device instanceof DeviceDto) {
53:                 $this->logger?->warning('invalid device detected - skipped', ['device' => \serialize($device), 'type' => \get_debug_type($device)]);
54:                 continue;
55:             }
56: 
57:             $model = $this->getModel(
58:                 $device,
59:             );
60:             $model->setService($service);

ERROR: Unable to parse file: /code/src/Adapter/CoapAdapter.php
ERROR: Parse error at line 46 column 9:

36: use IKEA\Tradfri\Util\JsonIntTypeNormalizer;
37: use Psr\Log\LoggerAwareInterface;
38: use Psr\Log\LoggerAwareTrait;
39: 
40: final class CoapAdapter implements AdapterInterface, LoggerAwareInterface
41: {
42:     use LoggerAwareTrait;
43:     private const COULD_NOT_SWITCH_STATE = 'Could not switch state';
44: 
45:     public function __construct(
46:         private readonly CoapGatewayAuthConfigDto $authConfig,
            ^
47:         private readonly GatewayHelperCommands $commands,
48:         private readonly DeviceData $deviceDataMapper,
49:         private readonly GroupData $groupDataMapper,
50:         private readonly CommandRunnerInterface $runner = new CommandRunner(),
51:         private readonly JsonDeviceDataSerializer $deviceSerializer = new JsonDeviceDataSerializer(),
52:     ) {
53:     }
54: 
55:     /**
56:      * @throws \JsonException|RuntimeException

ERROR: Unable to parse file: /code/src/Validator/Group/Data.php
ERROR: Parse error at line 26 column 20:

16: use IKEA\Tradfri\Command\Coap\Keys;
17: use IKEA\Tradfri\Exception\RuntimeException;
18: use IKEA\Tradfri\Exception\TypeException;
19: use IKEA\Tradfri\Validator\ValidatorInterface;
20: 
21: final class Data implements ValidatorInterface
22: {
23:     /**
24:      * @var list<string>
25:      */
26:     private static array $mustHaves = [
                       ^
27:         Keys::ATTR_ID,
28:         Keys::ATTR_NAME,
29:         Keys::ATTR_GROUP_MEMBERS,
30:     ];
31: 
32:     /**
33:      * @throws RuntimeException
34:      */
35:     public function isValid(mixed $data): bool
36:     {

ERROR: Unable to parse file: /code/src/Validator/Device/Data.php
ERROR: Parse error at line 46 column 28:

36: 
37:             $this->_hasDataField($device);
38: 
39:             $data = $this->_getData($device);
40: 
41:             $this->_hasDataType($data);
42: 
43:             $this->_hasDataManufacturer($data);
44: 
45:             $this->_hasDataVersion($data);
46:         } catch (\Throwable) {
                               ^
47:             $isValid = false;
48:         }
49: 
50:         return $isValid;
51:     }
52: 
53:     /**
54:      * @throws RuntimeException
55:      */
56:     private function _hasIdField(\stdClass $device): void

ERROR: Unable to parse file: /code/src/Dto/CoapResponse/DeviceDto.php
ERROR: Parse error at line 19 column 7:

 9:  * the LICENSE.md file that was distributed with this source code.
10:  *
11:  * @see https://github.com/WebProject-xyz/ikea-tradfri-php
12:  */
13: 
14: namespace IKEA\Tradfri\Dto\CoapResponse;
15: 
16: use Symfony\Component\Serializer\Annotation\SerializedName;
17: use Symfony\Component\Validator\Constraints as Assert;
18: 
19: final readonly class DeviceDto
          ^
20: {
21:     public const ATTR_MAP = [
22:         // - root node
23:         '"ATTR_ID"'                      => '#"' . \IKEA\Tradfri\Dto\CoapApiResponseDto::ATTR_ID . '"#',
24:         '"ATTR_NAME"'                    => '#"' . \IKEA\Tradfri\Dto\CoapApiResponseDto::ATTR_NAME . '"#',
25:         // - device info = node
26:         '"ATTR_DEVICE_INFO"'             => '#"' . \IKEA\Tradfri\Dto\CoapApiResponseDto::ATTR_DEVICE_INFO . '"#',
27:         '"ATTR_DEVICE_MODEL_NUMBER"'     => '#"' . \IKEA\Tradfri\Dto\CoapApiResponseDto::ATTR_DEVICE_MODEL_NUMBER . '"#',
28:         '"ATTR_DEVICE_FIRMWARE_VERSION"' => '#"' . \IKEA\Tradfri\Dto\CoapApiResponseDto::ATTR_DEVICE_FIRMWARE_VERSION . '"#',
29:         '"ATTR_DEVICE_MANUFACTURER"'     => '#"' . \IKEA\Tradfri\Dto\CoapApiResponseDto::ATTR_DEVICE_MANUFACTURER . '"#',

ERROR: Unable to parse file: /code/src/Dto/CoapResponse/BlindControlDto.php
ERROR: Parse error at line 18 column 7:

 8:  * For the full copyright and license information, please view
 9:  * the LICENSE.md file that was distributed with this source code.
10:  *
11:  * @see https://github.com/WebProject-xyz/ikea-tradfri-php
12:  */
13: 
14: namespace IKEA\Tradfri\Dto\CoapResponse;
15: 
16: use Symfony\Component\Serializer\Annotation\SerializedName;
17: 
18: final readonly class BlindControlDto
          ^
19: {
20:     public function __construct(
21:         #[SerializedName(serializedName: 'ATTR_BLIND_CURRENT_POSITION')]
22:         private int $state = 0,
23:     ) {
24:     }
25: 
26:     public function getState(): int
27:     {
28:         return $this->state;

ERROR: Unable to parse file: /code/src/Dto/CoapResponse/LightControlDto.php
ERROR: Parse error at line 18 column 7:

 8:  * For the full copyright and license information, please view
 9:  * the LICENSE.md file that was distributed with this source code.
10:  *
11:  * @see https://github.com/WebProject-xyz/ikea-tradfri-php
12:  */
13: 
14: namespace IKEA\Tradfri\Dto\CoapResponse;
15: 
16: use Symfony\Component\Serializer\Annotation\SerializedName;
17: 
18: final readonly class LightControlDto
          ^
19: {
20:     public function __construct(
21:         #[SerializedName(serializedName: 'ATTR_DEVICE_STATE')]
22:         private int $state = 0,
23:         #[SerializedName(serializedName: 'ATTR_LIGHT_DIMMER')]
24:         private int $brightness = 0,
25:         #[SerializedName(serializedName: 'ATTR_LIGHT_COLOR_HEX')]
26:         private ?string $colorHex = null,
27:     ) {
28:     }

ERROR: Unable to parse file: /code/src/Dto/CoapResponse/DeviceInfoDto.php
ERROR: Parse error at line 18 column 7:

 8:  * For the full copyright and license information, please view
 9:  * the LICENSE.md file that was distributed with this source code.
10:  *
11:  * @see https://github.com/WebProject-xyz/ikea-tradfri-php
12:  */
13: 
14: namespace IKEA\Tradfri\Dto\CoapResponse;
15: 
16: use Symfony\Component\Serializer\Annotation\SerializedName;
17: 
18: final readonly class DeviceInfoDto
          ^
19: {
20:     public function __construct(
21:         #[SerializedName(serializedName: 'ATTR_DEVICE_MANUFACTURER')]
22:         private string $manufacturer,
23:         #[SerializedName(serializedName: 'ATTR_DEVICE_MODEL_NUMBER')]
24:         private string $type,
25:         #[SerializedName(serializedName: 'ATTR_DEVICE_FIRMWARE_VERSION')]
26:         private string $version,
27:     ) {
28:     }

ERROR: Unable to parse file: /code/src/Dto/CoapResponse/GroupDto.php
ERROR: Parse error at line 19 column 7:

 9:  * the LICENSE.md file that was distributed with this source code.
10:  *
11:  * @see https://github.com/WebProject-xyz/ikea-tradfri-php
12:  */
13: 
14: namespace IKEA\Tradfri\Dto\CoapResponse;
15: 
16: use Symfony\Component\Serializer\Annotation\SerializedName;
17: use Symfony\Component\Validator\Constraints as Assert;
18: 
19: final readonly class GroupDto
          ^
20: {
21:     public function __construct(
22:         #[SerializedName(serializedName: 'ATTR_ID')]
23:         #[Assert\NotBlank()]
24:         private int $id,
25:         #[SerializedName(serializedName: 'ATTR_NAME')]
26:         #[Assert\NotBlank()]
27:         private ?string $name,
28:     ) {
29:     }

ERROR: Unable to parse file: /code/src/Dto/CoapGatewayRequestPayloadDto.php
ERROR: Parse error at line 19 column 7:

 9:  * the LICENSE.md file that was distributed with this source code.
10:  *
11:  * @see https://github.com/WebProject-xyz/ikea-tradfri-php
12:  */
13: 
14: namespace IKEA\Tradfri\Dto;
15: 
16: use IKEA\Tradfri\Command\Coap\Keys;
17: use IKEA\Tradfri\Exception\RuntimeException;
18: 
19: final readonly class CoapGatewayRequestPayloadDto implements \Stringable
          ^
20: {
21:     public const COLOR_WARM             = 'warm';
22:     public const COLOR_NORMAL           = 'normal';
23:     public const COLOR_COLD             = 'cold';
24:     private const COLORS                = [
25:         self::COLOR_COLD,
26:         self::COLOR_NORMAL,
27:         self::COLOR_WARM,
28:     ];
29:     private const FORMAT_DEVICE      = '-e \'{ "%s": [{ "%s": %s }] }\'';

ERROR: Unable to parse file: /code/src/Dto/CoapGatewayAuthConfigDto.php
ERROR: Parse error at line 16 column 7:

 6:  * Copyright (c) 2024 Benjamin Fahl
 7:  *
 8:  * For the full copyright and license information, please view
 9:  * the LICENSE.md file that was distributed with this source code.
10:  *
11:  * @see https://github.com/WebProject-xyz/ikea-tradfri-php
12:  */
13: 
14: namespace IKEA\Tradfri\Dto;
15: 
16: final readonly class CoapGatewayAuthConfigDto
          ^
17: {
18:     public function __construct(
19:         private string $username,
20:         #[\SensitiveParameter()]
21:         private string $apiKey,
22:         #[\SensitiveParameter()]
23:         private string $gatewaySecret,
24:         private string $gatewayIp,
25:     ) {
26:         $this->checkIp($this->gatewayIp);

ERROR: Unable to parse file: /code/src/Device/MotionSensor.php
ERROR: Parse error at line 28 column 9:

18: final class MotionSensor extends Device
19: {
20:     /**
21:      * @throws \IKEA\Tradfri\Exception\RuntimeException
22:      */
23:     public function __construct(int $deviceId)
24:     {
25:         parent::__construct(
26:             $deviceId,
27:             Keys::ATTR_DEVICE_INFO_TYPE_MOTION_SENSOR,
28:         );
            ^
29:     }
30: }
31: 

ERROR: Unable to parse file: /code/src/Device/BrightnessStateInterface.php
ERROR: Parse error at line 25 column 45:

15: 
16: use IKEA\Tradfri\Exception\RuntimeException;
17: 
18: interface BrightnessStateInterface
19: {
20:     /**
21:      * @throws RuntimeException
22:      */
23:     public function dim(int $levelInPercent): bool;
24: 
25:     public function setBrightnessLevel(float|int $levelInPercent): void;
                                                ^
26: 
27:     public function setBrightness(int $brightness): void;
28: 
29:     public function getBrightness(): float;
30: }
31: 

ERROR: Unable to parse file: /code/src/Device/Driver.php
ERROR: Parse error at line 28 column 9:

18: final class Driver extends Device
19: {
20:     /**
21:      * @throws \IKEA\Tradfri\Exception\RuntimeException
22:      */
23:     public function __construct(int $deviceId)
24:     {
25:         parent::__construct(
26:             $deviceId,
27:             Keys::ATTR_DEVICE_INFO_TYPE_DRIVER_30W,
28:         );
            ^
29:     }
30: }
31: 

ERROR: Unable to parse file: /code/src/Device/Unknown.php
ERROR: Parse error at line 26 column 9:

16: final class Unknown extends Device
17: {
18:     /**
19:      * @throws \IKEA\Tradfri\Exception\RuntimeException
20:      */
21:     public function __construct(int $deviceId, string $type)
22:     {
23:         parent::__construct(
24:             $deviceId,
25:             'TRADFRI unknown' . $type,
26:         );
            ^
27:     }
28: }
29: 

ERROR: Unable to parse file: /code/src/Device/ControlOutlet.php
ERROR: Parse error at line 28 column 9:

18: final class ControlOutlet extends Device
19: {
20:     /**
21:      * @throws \IKEA\Tradfri\Exception\RuntimeException
22:      */
23:     public function __construct(int $deviceId)
24:     {
25:         parent::__construct(
26:             $deviceId,
27:             Keys::ATTR_DEVICE_INFO_TYPE_CONTROL_OUTLET,
28:         );
            ^
29:     }
30: }
31: 

ERROR: Unable to parse file: /code/src/Device/Remote.php
ERROR: Parse error at line 28 column 9:

18: final class Remote extends Device
19: {
20:     /**
21:      * @throws \IKEA\Tradfri\Exception\RuntimeException
22:      */
23:     public function __construct(int $deviceId)
24:     {
25:         parent::__construct(
26:             $deviceId,
27:             Keys::ATTR_DEVICE_INFO_TYPE_REMOTE_CONTROL,
28:         );
            ^
29:     }
30: }
31: 

ERROR: Unable to parse file: /code/src/Device/Helper/Type.php
ERROR: Parse error at line 34 column 18:

24: use IKEA\Tradfri\Device\Remote;
25: use IKEA\Tradfri\Device\Repeater;
26: use IKEA\Tradfri\Device\RollerBlind;
27: use IKEA\Tradfri\Exception\RuntimeException;
28: 
29: /**
30:  * todo: enum.
31:  */
32: final class Type
33: {
34:     final public const BLUB                    = 'TRADFRI bulb';
                     ^
35:     final public const BLUB_CLASS              = LightBulb::class;
36:     final public const MOTION_SENSOR           = 'TRADFRI motion sensor';
37:     final public const MOTION_SENSOR_CLASS     = MotionSensor::class;
38:     final public const REMOTE                  = 'TRADFRI remote control';
39:     final public const REMOTE_CLASS            = Remote::class;
40:     final public const DIMMER                  = 'TRADFRI dimmer';
41:     final public const DIMMER_CLASS            = Dimmer::class;
42:     final public const DRIVER                  = 'TRADFRI Driver ';
43:     final public const DRIVER_CLASS            = Driver::class;
44:     final public const FLOALT                  = 'FLOALT panel ';

ERROR: Unable to parse file: /code/src/Collection/LightBulbs.php
ERROR: Parse error at line 34 column 20:

24:  */
25: final class LightBulbs extends Devices
26: {
27:     public function sortByState(): self
28:     {
29:         $items = $this->toArray();
30: 
31:         \usort(
32:             $items,
33:             /** @phpstan-ignore-next-line */
34:             static fn (LightBulb $lightBulbOne, LightBulb $lightBulbTwo) => \strcmp(
                       ^
35:                 $lightBulbOne->getReadableState(),
36:                 $lightBulbTwo->getReadableState(),
37:             ),
38:         );
39: 
40:         return $this->createFrom($items);
41:     }
42: 
43:     public function getActive(): self
44:     {

ERROR: Unable to parse file: /code/src/Client/Client.php
ERROR: Parse error at line 29 column 33:

19: use IKEA\Tradfri\Device\LightBulb;
20: use IKEA\Tradfri\Device\RollerBlind;
21: use IKEA\Tradfri\Group\LightGroup as Group;
22: use IKEA\Tradfri\Service\ServiceInterface;
23: 
24: /**
25:  * @phpstan-type LevelType = int<0,100>
26:  */
27: final class Client implements ClientInterface
28: {
29:     public function __construct(protected AdapterInterface $adapter)
                                    ^
30:     {
31:     }
32: 
33:     public function getDevices(ServiceInterface $service): Devices
34:     {
35:         return $this->adapter->getDeviceCollection($service);
36:     }
37: 
38:     public function getGroups(ServiceInterface $service): Groups
39:     {

ERROR: Unable to parse file: /code/src/Factory/GatewayServiceFactory.php
ERROR: Parse error at line 21 column 7:

11:  * @see https://github.com/WebProject-xyz/ikea-tradfri-php
12:  */
13: 
14: namespace IKEA\Tradfri\Factory;
15: 
16: use IKEA\Tradfri\Adapter\CoapAdapter as Adapter;
17: use IKEA\Tradfri\Command\GatewayHelperCommands;
18: use IKEA\Tradfri\Dto\CoapGatewayAuthConfigDto;
19: use IKEA\Tradfri\Service\ServiceInterface;
20: 
21: final readonly class GatewayServiceFactory
          ^
22: {
23:     public function __construct(
24:         private CoapGatewayAuthConfigDto $authConfig,
25:     ) {
26:     }
27: 
28:     public function __invoke(): ServiceInterface
29:     {
30:         $deviceMapper = new \IKEA\Tradfri\Mapper\DeviceData();
31:         $groupMapper  = new \IKEA\Tradfri\Mapper\GroupData();

ERROR: Unable to parse file: /code/src/Values/CoapCommandPattern.php
ERROR: Parse error at line 16 column 6:

 6:  * Copyright (c) 2024 Benjamin Fahl
 7:  *
 8:  * For the full copyright and license information, please view
 9:  * the LICENSE.md file that was distributed with this source code.
10:  *
11:  * @see https://github.com/WebProject-xyz/ikea-tradfri-php
12:  */
13: 
14: namespace IKEA\Tradfri\Values;
15: 
16: enum CoapCommandPattern: string
         ^
17: {
18:     case PUT  = 'coap-client -m put -u "%s" -k "%s"';
19:     case GET  = 'coap-client -m get -u "%s" -k "%s"';
20:     case POST = 'coap-client -m post -u "%s" -k "%s"';
21: }
22: 

ERROR: Unable to parse file: /code/src/Traits/ProvidesColor.php
ERROR: Parse error at line 18 column 15:

 8:  * For the full copyright and license information, please view
 9:  * the LICENSE.md file that was distributed with this source code.
10:  *
11:  * @see https://github.com/WebProject-xyz/ikea-tradfri-php
12:  */
13: 
14: namespace IKEA\Tradfri\Traits;
15: 
16: trait ProvidesColor
17: {
18:     protected string $color = '';
                  ^
19: 
20:     public function getColor(): string
21:     {
22:         return \mb_strtoupper($this->color);
23:     }
24: 
25:     public function setColor(string $color): self
26:     {
27:         $this->color = $color;
28: 

ERROR: Unable to parse file: /code/src/Traits/ProvidesName.php
ERROR: Parse error at line 18 column 15:

 8:  * For the full copyright and license information, please view
 9:  * the LICENSE.md file that was distributed with this source code.
10:  *
11:  * @see https://github.com/WebProject-xyz/ikea-tradfri-php
12:  */
13: 
14: namespace IKEA\Tradfri\Traits;
15: 
16: trait ProvidesName
17: {
18:     protected string $name;
                  ^
19: 
20:     public function getName(): string
21:     {
22:         return $this->name;
23:     }
24: 
25:     public function setName(string $name): self
26:     {
27:         $this->name = $name;
28: 

ERROR: Unable to parse file: /code/src/Traits/ProvidesManufacturer.php
ERROR: Parse error at line 18 column 15:

 8:  * For the full copyright and license information, please view
 9:  * the LICENSE.md file that was distributed with this source code.
10:  *
11:  * @see https://github.com/WebProject-xyz/ikea-tradfri-php
12:  */
13: 
14: namespace IKEA\Tradfri\Traits;
15: 
16: trait ProvidesManufacturer
17: {
18:     protected string $manufacturer;
                  ^
19: 
20:     public function getManufacturer(): string
21:     {
22:         return $this->manufacturer;
23:     }
24: 
25:     public function setManufacturer(string $manufacturer): self
26:     {
27:         $this->manufacturer = $manufacturer;
28: 

ERROR: Unable to parse file: /code/src/Traits/ProvidesId.php
ERROR: Parse error at line 18 column 15:

 8:  * For the full copyright and license information, please view
 9:  * the LICENSE.md file that was distributed with this source code.
10:  *
11:  * @see https://github.com/WebProject-xyz/ikea-tradfri-php
12:  */
13: 
14: namespace IKEA\Tradfri\Traits;
15: 
16: trait ProvidesId
17: {
18:     protected int $id;
                  ^
19: 
20:     public function getId(): int
21:     {
22:         return $this->id;
23:     }
24: 
25:     public function setId(int $id): self
26:     {
27:         $this->id = $id;
28: 

ERROR: Unable to parse file: /code/src/Traits/ProvidesType.php
ERROR: Parse error at line 20 column 15:

10:  *
11:  * @see https://github.com/WebProject-xyz/ikea-tradfri-php
12:  */
13: 
14: namespace IKEA\Tradfri\Traits;
15: 
16: use IKEA\Tradfri\Device\Helper\Type;
17: 
18: trait ProvidesType
19: {
20:     protected string $type;
                  ^
21: 
22:     public function getType(): string
23:     {
24:         return $this->type;
25:     }
26: 
27:     public function setType(string $type): self
28:     {
29:         $this->type = $type;
30: 

ERROR: Unable to parse file: /code/src/Traits/ProvidesService.php
ERROR: Parse error at line 20 column 15:

10:  *
11:  * @see https://github.com/WebProject-xyz/ikea-tradfri-php
12:  */
13: 
14: namespace IKEA\Tradfri\Traits;
15: 
16: use IKEA\Tradfri\Service\ServiceInterface;
17: 
18: trait ProvidesService
19: {
20:     protected ?ServiceInterface $service = null;
                  ^
21: 
22:     public function getService(): ServiceInterface
23:     {
24:         if (!$this->hasService()) {
25:             throw new \RuntimeException('Service missing');
26:         }
27: 
28:         return $this->service;
29:     }
30: 

ERROR: Unable to parse file: /code/src/Traits/ProvidesVersion.php
ERROR: Parse error at line 18 column 15:

 8:  * For the full copyright and license information, please view
 9:  * the LICENSE.md file that was distributed with this source code.
10:  *
11:  * @see https://github.com/WebProject-xyz/ikea-tradfri-php
12:  */
13: 
14: namespace IKEA\Tradfri\Traits;
15: 
16: trait ProvidesVersion
17: {
18:     protected string $version;
                  ^
19: 
20:     /**
21:      * Get Version.
22:      */
23:     public function getVersion(): string
24:     {
25:         return $this->version;
26:     }
27: 
28:     public function setVersion(string $name): self

ERROR: Unable to parse file: /code/src/Traits/ProvidesDarkenedState.php
ERROR: Parse error at line 18 column 15:

 8:  * For the full copyright and license information, please view
 9:  * the LICENSE.md file that was distributed with this source code.
10:  *
11:  * @see https://github.com/WebProject-xyz/ikea-tradfri-php
12:  */
13: 
14: namespace IKEA\Tradfri\Traits;
15: 
16: trait ProvidesDarkenedState
17: {
18:     protected int $darkenedState = 0;
                  ^
19: 
20:     public function setDarkenedState(int $state): self
21:     {
22:         $this->darkenedState = $state;
23: 
24:         return $this;
25:     }
26: 
27:     public function getDarkenedState(): int
28:     {

ERROR: Unable to parse file: /code/src/Traits/ProvidesState.php
ERROR: Parse error at line 18 column 15:

 8:  * For the full copyright and license information, please view
 9:  * the LICENSE.md file that was distributed with this source code.
10:  *
11:  * @see https://github.com/WebProject-xyz/ikea-tradfri-php
12:  */
13: 
14: namespace IKEA\Tradfri\Traits;
15: 
16: trait ProvidesState
17: {
18:     protected bool $state = false;
                  ^
19: 
20:     public function setState(bool $state): self
21:     {
22:         $this->state = $state;
23: 
24:         return $this;
25:     }
26: 
27:     public function getReadableState(): string
28:     {

ERROR: Unable to parse file: /code/src/Traits/ProvidesBrightness.php
ERROR: Parse error at line 18 column 15:

 8:  * For the full copyright and license information, please view
 9:  * the LICENSE.md file that was distributed with this source code.
10:  *
11:  * @see https://github.com/WebProject-xyz/ikea-tradfri-php
12:  */
13: 
14: namespace IKEA\Tradfri\Traits;
15: 
16: trait ProvidesBrightness
17: {
18:     protected float $brightness = 0;
                  ^
19: 
20:     public function setBrightnessLevel(float|int $levelInPercent): void
21:     {
22:         $this->brightness = (int) \round($levelInPercent);
23:     }
24: 
25:     public function getBrightness(): float
26:     {
27:         return $this->brightness;
28:     }

ERROR: Unable to parse file: /code/src/Helper/CommandRunnerInterface.php
ERROR: Parse error at line 26 column 114:

16: interface CommandRunnerInterface
17: {
18:     /**
19:      * Execute a command and return it's output. Either wait
20:      * until the command exits or the timeout has expired.
21:      * Found at @see https://stackoverflow.com/a/20992213/3578430.
22:      *
23:      * @param string $cmd     command to execute
24:      * @param int    $timeout timeout in seconds
25:      */
26:     public function execWithTimeout(string $cmd, int $timeout, ?bool $asArray = null, bool $throw = false): array|string;
                                                                                                                     ^
27: }
28: 

ERROR: Unable to parse file: /code/src/Helper/CommandRunner.php
ERROR: Parse error at line 37 column 5:

27:      * Found at @see https://stackoverflow.com/a/20992213/3578430.
28:      *
29:      * @param string $cmd     command to execute
30:      * @param int    $timeout timeout in seconds
31:      */
32:     public function execWithTimeout(
33:         string $cmd,
34:         int $timeout,
35:         ?bool $asArray = null,
36:         bool $throw = false,
37:     ): array|string {
        ^
38:         $process = Process::fromShellCommandline(command: $cmd, timeout: $timeout);
39:         $process->run();
40: 
41:         if (!$process->isSuccessful()) {
42:             return $this->_parseErrors($throw, $process->getErrorOutput());
43:         }
44: 
45:         $output = $process->getOutput();
46: 
47:         return $asArray

ERROR: Unable to parse file: /code/rector.php
ERROR: Parse error at line 25 column 14:

15: use Rector\TypeDeclaration\Rector\ClassMethod\AddVoidReturnTypeWhereNoReturnRector;
16: 
17: return RectorConfig::configure()
18:     ->withPaths([
19:         __DIR__ . '/src',
20:         __DIR__ . '/tests',
21:         __DIR__ . '/wiki',
22:     ])
23:     // uncomment to reach your current PHP version
24:     ->withPhpSets(
25:         php82: true,
                 ^
26:     )
27:     ->withSets([
28:         Rector\Symfony\Set\SymfonySetList::ANNOTATIONS_TO_ATTRIBUTES,
29:         Rector\Symfony\Set\SymfonySetList::SYMFONY_64,
30:         Rector\Symfony\Set\SymfonySetList::SYMFONY_CODE_QUALITY,
31:         Rector\Symfony\Set\SymfonySetList::SYMFONY_CONSTRUCTOR_INJECTION,
32: 
33:         Rector\Doctrine\Set\DoctrineSetList::DOCTRINE_CODE_QUALITY,
34:     ])
35:     ->withRules([

INFO: 80/80 source files have been analyzed
INFO: ------------------------------------------------------------------------
INFO: EXECUTION SUCCESS
INFO: ------------------------------------------------------------------------
INFO: Total time: 0.502s
INFO: Final Memory: 11M/95M
INFO: ------------------------------------------------------------------------