From 7ded60ce9c5d5917c644d576b80a43e12507dee3 Mon Sep 17 00:00:00 2001 From: Tristan Date: Sun, 3 Dec 2023 16:49:46 +0100 Subject: [PATCH] Fix 'hasExampleData' --- phpunit.xml | 21 --------------------- src/Solution.php | 5 ++++- 2 files changed, 4 insertions(+), 22 deletions(-) delete mode 100644 phpunit.xml diff --git a/phpunit.xml b/phpunit.xml deleted file mode 100644 index ca2bf4d..0000000 --- a/phpunit.xml +++ /dev/null @@ -1,21 +0,0 @@ - - - - - tests - - - - - - src - - - - - - - diff --git a/src/Solution.php b/src/Solution.php index 92304b5..264708b 100644 --- a/src/Solution.php +++ b/src/Solution.php @@ -103,7 +103,10 @@ abstract class Solution public function hasExampleData(): bool { - return $this->exampleData['global'] !== []; + return + ($this->exampleData['global'] !== null && $this->exampleData['global'] !== []) + || ($this->exampleData['part1'] !== null && $this->exampleData['part1'] !== []) + || ($this->exampleData['part2'] !== null && $this->exampleData['part2'] !== []); } /**