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

Parameter is null #140

Closed
dmitrach opened this issue May 31, 2020 · 2 comments
Closed

Parameter is null #140

dmitrach opened this issue May 31, 2020 · 2 comments
Assignees
Labels

Comments

@dmitrach
Copy link

I have function public function setMarginsFromArray(array $array = null)

The description was generated:
/**
* Undocumented function
*
* @param array $array
* @return void
*/

I expect the following description (php 7.0):
/**
* Sets margins from the array.
*
* @param array|null $array
* @return void
*/
public function setMarginsFromArray(array $array = null)

@umairkhan-dev
Copy link

umairkhan-dev commented Jul 8, 2020

You have to tell that this param may be null or array like

/**
 * Undocumented function
 *
 * @param array|null $array
 * @return void
 */
public function test(?array $array=null)
{
    # code...
}

See the ? before array (type) in public function test(?array $array=null)

@neild3r neild3r self-assigned this Aug 11, 2021
@neild3r neild3r added the bug label Aug 11, 2021
@neild3r
Copy link
Owner

neild3r commented Aug 31, 2021

This is supported as of v2.3.0

@neild3r neild3r closed this as completed Aug 31, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants