From d048d60d04b377b242273abdcc1194f00aaa4db9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gregori=20Pi=C3=B1eres?= Date: Sat, 10 Apr 2021 11:51:13 -0400 Subject: [PATCH] Ignore the absence of the tests folder --- src/Exceptions/InvalidUsesPath.php | 24 ------------------------ src/PendingObjects/UsesCall.php | 12 +++++------- 2 files changed, 5 insertions(+), 31 deletions(-) delete mode 100644 src/Exceptions/InvalidUsesPath.php diff --git a/src/Exceptions/InvalidUsesPath.php b/src/Exceptions/InvalidUsesPath.php deleted file mode 100644 index dff16367..00000000 --- a/src/Exceptions/InvalidUsesPath.php +++ /dev/null @@ -1,24 +0,0 @@ -targets = array_map(function ($target): string { - $isValid = is_dir($target) || file_exists($target); - if (!$isValid) { - throw new InvalidUsesPath($target); + $this->targets = array_reduce($targets, function (array $accumulator, string $target): array { + if (is_dir($target) || file_exists($target)) { + $accumulator[] = (string) realpath($target); } - return (string) realpath($target); - }, $targets); + return $accumulator; + }, []); } /**