-
Notifications
You must be signed in to change notification settings - Fork 61
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PHPStan error with addFields method, using composing fields #137
Comments
@perruche This is interesting. The error message references, singular class name, |
I triple check my local code to make sure i only have plural Thanks for the help tho |
I dug a bit into this issue, and it seems that adding the methods throwing a warning to the doc block of the diff --git a/src/FieldBuilder.php b/src/FieldBuilder.php
index 2460728..22fe301 100644
--- a/src/FieldBuilder.php
+++ b/src/FieldBuilder.php
@@ -5,6 +5,7 @@ namespace StoutLogic\AcfBuilder;
/**
* Builds configurations for an ACF Field
* @method FieldBuilder addField(string $name, string $type, array $args = [])
+ * @method FieldBuilder addFields(FieldsBuilder|array $fields)
* @method FieldBuilder addChoiceField(string $name, string $type, array $args = [])
* @method FieldBuilder addText(string $name, array $args = [])
* @method FieldBuilder addTextarea(string $name, array $args = [])
@@ -34,6 +35,7 @@ namespace StoutLogic\AcfBuilder;
* @method FieldBuilder addTab(string $label, array $args = [])
* @method FieldBuilder addRange(string $name, array $args = [])
* @method FieldBuilder addMessage(string $label, string $message, array $args = [])
+ * @method FieldBuilder addRelationship(string $name, array $args = [])
* @method GroupBuilder addGroup(string $name, array $args = [])
* @method GroupBuilder endGroup()
* @method RepeaterBuilder addRepeater(string $name, array $args = []) As |
Hello,
First thanks a lot for this wonderful lib, it's a pleasure to work with it.
I am getting a PHPStan Error which should not be, while using composing fields.
addFields
is the only method that is throwing this errorA code snippet of the implementation :
The text was updated successfully, but these errors were encountered: