Skip to content

Conversation

TomasVotruba
Copy link
Contributor

/**
 * @param mixed[] $value
 */
public function someMethod(array $value) ...

is interpretted incorretly like array. That matters, because here it is useful - we know there is mixed

/**
 * @param array
 */
public function someMethod(array $value) ...

But here not, because we forget to specify the type. And it could be more SomeType[], string[] etc.

```php
/**
 * @param mixed[] $value
 */
public function someMethod(array $value) ...
```

is interpretted incorretly like `array`. That matters, because here it is useful - we **know** there is mixed

```php
/**
 * @param array
 */
public function someMethod(array $value) ...
```

But here not, because we forget to specify the type. And it could be more `SomeType[]`, `string[]` etc.
@TomasVotruba
Copy link
Contributor Author

TomasVotruba commented Nov 29, 2017

Test would probably fail now. I fix them after feedback and more guidance where to solve this

@jaapio
Copy link
Member

jaapio commented Dec 10, 2017

Your assumption seems to be correct to me. What would you want to know to continue this PR?

@GrahamCampbell
Copy link
Contributor

And it could be more SomeType[], string[] etc.

Potentially, mixed[] could still be string[], but the typing is just too wide?

@TomasVotruba
Copy link
Contributor Author

Not relevant anymore, I migrated to https://github.com/phpstan/phpdoc-parser

@TomasVotruba TomasVotruba deleted the patch-1 branch May 28, 2018 13:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants