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 ignores next parameter without type #60

Closed
jeremyvii opened this issue May 4, 2020 · 1 comment · Fixed by #61
Closed

PHP ignores next parameter without type #60

jeremyvii opened this issue May 4, 2020 · 1 comment · Fixed by #61

Comments

@jeremyvii
Copy link
Owner

Describe the bug
If the first function parameter has a type and the second parameter doesn't, the latter is ignored in PHP.

Expected behavior

<?php
/**
 * [test description]
 *
 * @param int $foo
 *   [$foo description]
 * @param [type] $bar
 *   [$bar description]
 *
 * @return [type]
 *   [return description]
 */
function test(int $foo,  $bar) {
}

Code Snippet

<?php
/**
 * [test description]
 *
 * @param int $bar
 *   [$bar description]
 *
 * @return [type]
 *   [return description]
 */
function test(int $foo,  $bar) {

}

Enviroment (please complete the following information):

  • OS: Xubuntu
  • Version 1.0.0
  • Language(s) PHP
@jeremyvii
Copy link
Owner Author

I am betting it is because this function isn't resetting expectParameterType flag after adding the name https://github.com/jeremyvii/vs-docblockr/blob/master/src/languages/php.ts#L221

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant