From f7f998b6759b3ffbf50421e54844f51ca082093a Mon Sep 17 00:00:00 2001 From: thunderdw <85177135+thunderdw@users.noreply.github.com> Date: Tue, 30 Jul 2024 06:56:59 -0700 Subject: [PATCH] =?UTF-8?q?=F0=9F=A7=91=E2=80=8D=F0=9F=92=BB=20Add=20`modi?= =?UTF-8?q?fyField`=20to=20Builder=20intellisense=20(#272)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/AcfComposer.php | 2 +- src/Builder.php | 1 + src/Builder/AccordionBuilder.php | 1 + src/Builder/ChoiceFieldBuilder.php | 1 + src/Builder/FieldBuilder.php | 1 + src/Builder/FlexibleContentBuilder.php | 1 + src/Builder/GroupBuilder.php | 1 + src/Builder/RepeaterBuilder.php | 1 + src/Builder/TabBuilder.php | 1 + src/Console/StubPublishCommand.php | 4 ++-- 10 files changed, 11 insertions(+), 3 deletions(-) diff --git a/src/AcfComposer.php b/src/AcfComposer.php index ab9b6e6b..53656b43 100644 --- a/src/AcfComposer.php +++ b/src/AcfComposer.php @@ -208,7 +208,7 @@ public function registerPath(string $path, ?string $namespace = null): array $namespace = $this->app->getNamespace(); } - foreach ((new Finder())->in($paths->toArray())->files()->sortByName() as $file) { + foreach ((new Finder)->in($paths->toArray())->files()->sortByName() as $file) { $relativePath = str_replace( Str::finish($path, DIRECTORY_SEPARATOR), '', diff --git a/src/Builder.php b/src/Builder.php index d8568495..d6e1bc76 100644 --- a/src/Builder.php +++ b/src/Builder.php @@ -23,6 +23,7 @@ * @method Builder endFlexibleContent() * @method Builder endGroup() * @method Builder endRepeater() + * @method Builder modifyField(string $name, array|\Closure $modify) * @method ChoiceFieldBuilder addButtonGroup(string $name, array $args = []) * @method ChoiceFieldBuilder addCheckbox(string $name, array $args = []) * @method ChoiceFieldBuilder addChoiceField(string $name, string $type, array $args = []) diff --git a/src/Builder/AccordionBuilder.php b/src/Builder/AccordionBuilder.php index 7d623d89..2482a66b 100644 --- a/src/Builder/AccordionBuilder.php +++ b/src/Builder/AccordionBuilder.php @@ -10,6 +10,7 @@ * @method \Log1x\AcfComposer\Builder endFlexibleContent() * @method \Log1x\AcfComposer\Builder endGroup() * @method \Log1x\AcfComposer\Builder endRepeater() + * @method \Log1x\AcfComposer\Builder modifyField(string $name, array|\Closure $modify) * @method ChoiceFieldBuilder addButtonGroup(string $name, array $args = []) * @method ChoiceFieldBuilder addCheckbox(string $name, array $args = []) * @method ChoiceFieldBuilder addChoiceField(string $name, string $type, array $args = []) diff --git a/src/Builder/ChoiceFieldBuilder.php b/src/Builder/ChoiceFieldBuilder.php index d7022c28..0b28f27d 100644 --- a/src/Builder/ChoiceFieldBuilder.php +++ b/src/Builder/ChoiceFieldBuilder.php @@ -10,6 +10,7 @@ * @method Builder endFlexibleContent() * @method Builder endGroup() * @method Builder endRepeater() + * @method Builder modifyField(string $name, array|\Closure $modify) * @method ChoiceFieldBuilder addButtonGroup(string $name, array $args = []) * @method ChoiceFieldBuilder addCheckbox(string $name, array $args = []) * @method ChoiceFieldBuilder addChoiceField(string $name, string $type, array $args = []) diff --git a/src/Builder/FieldBuilder.php b/src/Builder/FieldBuilder.php index 24f80f8c..ce8e7450 100644 --- a/src/Builder/FieldBuilder.php +++ b/src/Builder/FieldBuilder.php @@ -13,6 +13,7 @@ * @method Builder endFlexibleContent() * @method Builder endGroup() * @method Builder endRepeater() + * @method Builder modifyField(string $name, array|\Closure $modify) * @method ChoiceFieldBuilder addButtonGroup(string $name, array $args = []) * @method ChoiceFieldBuilder addCheckbox(string $name, array $args = []) * @method ChoiceFieldBuilder addChoiceField(string $name, string $type, array $args = []) diff --git a/src/Builder/FlexibleContentBuilder.php b/src/Builder/FlexibleContentBuilder.php index 7a2354fd..e0bae906 100644 --- a/src/Builder/FlexibleContentBuilder.php +++ b/src/Builder/FlexibleContentBuilder.php @@ -12,6 +12,7 @@ * @method Builder endFlexibleContent() * @method Builder endGroup() * @method Builder endRepeater() + * @method Builder modifyField(string $name, array|\Closure $modify) * @method ChoiceFieldBuilder addButtonGroup(string $name, array $args = []) * @method ChoiceFieldBuilder addCheckbox(string $name, array $args = []) * @method ChoiceFieldBuilder addChoiceField(string $name, string $type, array $args = []) diff --git a/src/Builder/GroupBuilder.php b/src/Builder/GroupBuilder.php index d359c091..8ccf1f20 100644 --- a/src/Builder/GroupBuilder.php +++ b/src/Builder/GroupBuilder.php @@ -12,6 +12,7 @@ * @method Builder endFlexibleContent() * @method Builder endGroup() * @method Builder endRepeater() + * @method Builder modifyField(string $name, array|\Closure $modify) * @method ChoiceFieldBuilder addButtonGroup(string $name, array $args = []) * @method ChoiceFieldBuilder addCheckbox(string $name, array $args = []) * @method ChoiceFieldBuilder addChoiceField(string $name, string $type, array $args = []) diff --git a/src/Builder/RepeaterBuilder.php b/src/Builder/RepeaterBuilder.php index 40c8cd01..80455fc4 100644 --- a/src/Builder/RepeaterBuilder.php +++ b/src/Builder/RepeaterBuilder.php @@ -12,6 +12,7 @@ * @method Builder endFlexibleContent() * @method Builder endGroup() * @method Builder endRepeater() + * @method Builder modifyField(string $name, array|\Closure $modify) * @method ChoiceFieldBuilder addButtonGroup(string $name, array $args = []) * @method ChoiceFieldBuilder addCheckbox(string $name, array $args = []) * @method ChoiceFieldBuilder addChoiceField(string $name, string $type, array $args = []) diff --git a/src/Builder/TabBuilder.php b/src/Builder/TabBuilder.php index f1de7ee8..6ed8fb6b 100644 --- a/src/Builder/TabBuilder.php +++ b/src/Builder/TabBuilder.php @@ -10,6 +10,7 @@ * @method \Log1x\AcfComposer\Builder endFlexibleContent() * @method \Log1x\AcfComposer\Builder endGroup() * @method \Log1x\AcfComposer\Builder endRepeater() + * @method \Log1x\AcfComposer\Builder modifyField(string $name, array|\Closure $modify) * @method ChoiceFieldBuilder addButtonGroup(string $name, array $args = []) * @method ChoiceFieldBuilder addCheckbox(string $name, array $args = []) * @method ChoiceFieldBuilder addChoiceField(string $name, string $type, array $args = []) diff --git a/src/Console/StubPublishCommand.php b/src/Console/StubPublishCommand.php index 9726c09d..2ca57458 100644 --- a/src/Console/StubPublishCommand.php +++ b/src/Console/StubPublishCommand.php @@ -46,11 +46,11 @@ class StubPublishCommand extends Command public function handle() { if (! is_dir($stubsPath = $this->app->basePath('stubs/acf-composer'))) { - (new Filesystem())->makeDirectory($stubsPath, 0755, true); + (new Filesystem)->makeDirectory($stubsPath, 0755, true); } if (! is_dir($stubsPath.'/views')) { - (new Filesystem())->makeDirectory($stubsPath.'/views', 0755, true); + (new Filesystem)->makeDirectory($stubsPath.'/views', 0755, true); } $files = collect($this->stubs)