Skip to content

Commit

Permalink
Merge pull request #762 from mentisy/specify-type-add-edit-template
Browse files Browse the repository at this point in the history
Add more specific docblock typehinting for `add` and `edit` templates
  • Loading branch information
markstory authored Jul 26, 2021
2 parents cf7e15d + c0f9477 commit bfb856a
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions templates/bake/Template/add.twig
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@
{{- "\n" }}
{%- if associations.BelongsTo is defined %}
{%- for assocName, assocData in associations.BelongsTo %}
* @var array ${{ assocData.variable }}
* @var \Cake\Collection\CollectionInterface|string[] ${{ assocData.variable }}
{{- "\n" }}
{%- endfor %}
{% endif %}
{%- if associations.BelongsToMany is defined %}
{%- for assocName, assocData in associations.BelongsToMany %}
* @var array ${{ assocData.variable }}
* @var \Cake\Collection\CollectionInterface|string[] ${{ assocData.variable }}
{{- "\n" }}
{%- endfor %}
{% endif %}
Expand Down
4 changes: 2 additions & 2 deletions templates/bake/Template/edit.twig
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@
{{- "\n" }}
{%- if associations.BelongsTo is defined %}
{%- for assocName, assocData in associations.BelongsTo %}
* @var array ${{ assocData.variable }}
* @var string[]|\Cake\Collection\CollectionInterface ${{ assocData.variable }}
{{- "\n" }}
{%- endfor %}
{% endif %}
{%- if associations.BelongsToMany is defined %}
{%- for assocName, assocData in associations.BelongsToMany %}
* @var array ${{ assocData.variable }}
* @var string[]|\Cake\Collection\CollectionInterface ${{ assocData.variable }}
{{- "\n" }}
{%- endfor %}
{% endif %}
Expand Down
2 changes: 1 addition & 1 deletion tests/comparisons/Template/testBakeEdit.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/**
* @var \Bake\Test\App\View\AppView $this
* @var \Cake\Datasource\EntityInterface $author
* @var array $roles
* @var string[]|\Cake\Collection\CollectionInterface $roles
*/
?>
<div class="row">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
/**
* @var \Bake\Test\App\View\AppView $this
* @var \Cake\Datasource\EntityInterface $article
* @var array $authors
* @var array $tags
* @var string[]|\Cake\Collection\CollectionInterface $authors
* @var string[]|\Cake\Collection\CollectionInterface $tags
*/
?>
<div class="row">
Expand Down

0 comments on commit bfb856a

Please sign in to comment.