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

Added: php8 union types, constructor property AND param with default null #162

Closed
wants to merge 15 commits into from
Closed

Conversation

tianyiw2013
Copy link
Contributor

@tianyiw2013 tianyiw2013 commented May 16, 2021

php8 Union types #150

/**
 * PHP8 union types
 * 
 * @param int|bool $arg
 * @return int|bool
 */
function getPHP8UnionTypes(int|bool $arg): int|bool
{
}

php8 Constructor with property #156

  /**
   * php8 Constructor with property
   *
   * @param [type] $arg1
   * @param int $arg2
   * @param int|null $arg3
   */
  function __construct(public $arg1, protected int $arg2, PriVate ?int $arg3)
  {
  }

Param with default null

/**
 * Param with default null
 *
 * @param int|null $arg
 * @return void
 */
function paramDefaultNull(int $arg = null)
{
}

/**
 * Param with mixed and default null
 *
 * @param mixed $arg
 * @return void
 */
function paramMixedDefaultNull(mixed $arg = null)
{
}

compatibility with param syntax error

  /**
   * compatibility with param syntax error
   *
   * @param int $arg
   * @param syntax error 
   * @param syntax_error 
   * @param int $arg2
   * @param mixed $arg3
   * @return void
   */
  function compatibilitySyntaxError(syntax error int $arg, syntax error, syntax_error, int| $arg2, || $arg3)
  {
  }

@tianyiw2013 tianyiw2013 changed the title php8 Union types Fixed: php8 Union types AND Param with default null May 16, 2021
@tianyiw2013 tianyiw2013 changed the title Fixed: php8 Union types AND Param with default null Added: php8 Union types AND Param with default null May 18, 2021
@tianyiw2013 tianyiw2013 changed the title Added: php8 Union types AND Param with default null Added: php8 union types, constructor property AND param with default null May 18, 2021
@tianyiw2013

This comment has been minimized.

@tianyiw2013

This comment has been minimized.

@tianyiw2013
Copy link
Contributor Author

tianyiw2013 commented May 24, 2021

Sorry, the author's follow-up is too slow, I temporarily close the request, I temporarily released the vscode extension using my branch and named it php-docblocker2.If the author can continue to follow up, I will remove my version from the vscoed market.
Thank you.

@tianyiw2013
Copy link
Contributor Author

My branch version: https://marketplace.visualstudio.com/items?itemName=tianyiw.php-docblocker2

@harpreetsb
Copy link

thank you so much @tianyiw2013

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.

None yet

3 participants