From b7de02a97fe40562eb55d36844c18d2d2eecada1 Mon Sep 17 00:00:00 2001 From: Michael Aerni Date: Tue, 13 Aug 2024 14:58:12 -0400 Subject: [PATCH] The files are required. Use constructor again. --- README.md | 2 +- src/Facades/Zipper.php | 13 ------------- src/Zipper.php | 12 +++++++----- src/ZipperTags.php | 2 +- 4 files changed, 9 insertions(+), 20 deletions(-) delete mode 100644 src/Facades/Zipper.php diff --git a/README.md b/README.md index f130eb0..741bdeb 100644 --- a/README.md +++ b/README.md @@ -81,7 +81,7 @@ php please zipper:clean --scope=force You may also use this addon programmatically, as shown below. ```php -use Aerni\Zipper\Facades\Zipper; +use Aerni\Zipper\Zipper; // Prepare an array of Statamic assets, paths, or URLs. $files = [ diff --git a/src/Facades/Zipper.php b/src/Facades/Zipper.php deleted file mode 100644 index 63bef86..0000000 --- a/src/Facades/Zipper.php +++ /dev/null @@ -1,13 +0,0 @@ -files($files) + $this->files($files) ->filename(time()) ->expiry((int) config('zipper.expiry')); } + public static function make(array $files): self + { + return new self($files); + } + /** * Get and set the files to zip. */ diff --git a/src/ZipperTags.php b/src/ZipperTags.php index ba4459b..840473e 100755 --- a/src/ZipperTags.php +++ b/src/ZipperTags.php @@ -2,7 +2,7 @@ namespace Aerni\Zipper; -use Aerni\Zipper\Facades\Zipper; +use Aerni\Zipper\Zipper; use Illuminate\Support\Arr; use Statamic\Contracts\Assets\Asset; use Statamic\Facades\Compare;