Skip to content

Commit

Permalink
πŸ§‘β€πŸ’» Add modifyField to Builder intellisense (#272)
Browse files Browse the repository at this point in the history
  • Loading branch information
thunderdw authored Jul 30, 2024
1 parent 4771016 commit f7f998b
Show file tree
Hide file tree
Showing 10 changed files with 11 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/AcfComposer.php
Original file line number Diff line number Diff line change
Expand Up @@ -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),
'',
Expand Down
1 change: 1 addition & 0 deletions src/Builder.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [])
Expand Down
1 change: 1 addition & 0 deletions src/Builder/AccordionBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [])
Expand Down
1 change: 1 addition & 0 deletions src/Builder/ChoiceFieldBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [])
Expand Down
1 change: 1 addition & 0 deletions src/Builder/FieldBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [])
Expand Down
1 change: 1 addition & 0 deletions src/Builder/FlexibleContentBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [])
Expand Down
1 change: 1 addition & 0 deletions src/Builder/GroupBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [])
Expand Down
1 change: 1 addition & 0 deletions src/Builder/RepeaterBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [])
Expand Down
1 change: 1 addition & 0 deletions src/Builder/TabBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [])
Expand Down
4 changes: 2 additions & 2 deletions src/Console/StubPublishCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit f7f998b

Please sign in to comment.