Skip to content

Commit

Permalink
Merge pull request #24 from bencroker/patch-1
Browse files Browse the repository at this point in the history
Fixes failing attribute defined test
  • Loading branch information
markhuot authored May 17, 2024
2 parents 1405f46 + 96d1261 commit b57f4d8
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions stubs/compiled_classes/FactoryFields.twig
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,12 @@
namespace markhuot\craftpest\storage;
/**
{% set type = 'mixed' %}
{% for field in fields %}
{% if attribute(field, 'valueType') is defined %}
{% if craft.app.version < 5 %}
{% set type = field.valueType() %}
{% elseif attribute(field, 'phpType') is defined %}
{% elseif craft.app.version > 5 %}
{% set type = field.phpType() %}
{% else %}
{% set type = 'mixed' %}
{% endif %}
* @method $this {{ field.handle }}({{ field.factoryTypeHint|default('mixed $value') }}): {{ type }} Sets the {{ field.name }} custom field
{% endfor %}
Expand Down

0 comments on commit b57f4d8

Please sign in to comment.