diff --git a/.phpactor.json b/.phpactor.json new file mode 100644 index 0000000..012dd58 --- /dev/null +++ b/.phpactor.json @@ -0,0 +1,5 @@ +{ + "$schema": "/Users/t.siebers/.local/share/nvim/mason/packages/phpactor/phpactor.schema.json", + "language_server_phpstan.enabled": true, + "language_server_php_cs_fixer.enabled": true +} \ No newline at end of file diff --git a/Taskfile.yaml b/Taskfile.yaml index b535ce2..89f3ddc 100644 --- a/Taskfile.yaml +++ b/Taskfile.yaml @@ -2,9 +2,6 @@ version: '3' -vars: - PHP_IMAGE: php:8.1 - tasks: default: cmds: diff --git a/src/Solution.php b/src/Solution.php index 08c32ca..a3c0c63 100644 --- a/src/Solution.php +++ b/src/Solution.php @@ -29,6 +29,7 @@ abstract class Solution /** * @var array|null> The example data to use. */ + #[ArrayShape(['part1' => 'array|null', 'part2' => 'array|null', 'global' => 'array|null'])] public array $exampleData = [ 'global' => null, 'part1' => null, @@ -102,7 +103,7 @@ abstract class Solution public function hasExampleData(): bool { - return $this->exampleData !== []; + return $this->exampleData['global'] !== []; } /**