nystudio107 / generator-craftplugin

generator-craftplugin is a Yeoman generator for Craft CMS plugins
MIT License
74 stars 30 forks source link

Wrong code comment for Field::serializeValue #84

Closed spharion88 closed 4 years ago

spharion88 commented 5 years ago

The code comment block for the method serializeValue in a new field type is wrong. Seems like the generated code comment is the comment for another method.

/**
 * Modifies an element query.
 *
 * This method will be called whenever elements are being searched for that may have this field assigned to them.
 *
 * If the method returns `false`, the query will be stopped before it ever gets a chance to execute.
 *
 * @param ElementQueryInterface $query The element query
 * @param mixed                 $value The value that was set on this field’s corresponding [[ElementCriteriaModel]] param,
 *                                     if any.
 *
 * @return null|false `false` in the event that the method is sure that no elements are going to be found.
 */
public function serializeValue($value, ElementInterface $element = null)
{
    return parent::serializeValue($value, $element);
}

Steps to reproduce (via pluginfactory.io):

khalwat commented 4 years ago

Fixed in https://github.com/nystudio107/generator-craftplugin/commit/18079d2b705595e62c6b0fb966a1beb264c23eb1