Skip to content
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

[PHP-Symfony] Fix wrong PHP Symfony typehint #1453

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -424,6 +424,10 @@ public Map<String, Object> postProcessModels(Map<String, Object> objs) {
var.vendorExtensions.put("x-parameterType", typeHint);
}

if (var.isContainer) {
var.vendorExtensions.put("x-parameterType", getTypeHint(var.dataType + "[]"));
}

// Create a variable to display the correct data type in comments for models
var.vendorExtensions.put("x-commentType", var.dataType);
if (var.isContainer) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ public function getPhotoUrls()
*
* @return $this
*/
public function setPhotoUrls($photoUrls)
public function setPhotoUrls(array $photoUrls)
{
$this->photoUrls = $photoUrls;

Expand All @@ -227,7 +227,7 @@ public function getTags()
*
* @return $this
*/
public function setTags(Tag $tags = null)
public function setTags(array $tags = null)
{
$this->tags = $tags;

Expand Down