1
0
Fork 0
php-language-server/fixtures/signature_help/calls.php

61 lines
1007 B
PHP
Raw Normal View History

2017-08-16 11:53:16 +00:00
<?php
namespace Foo;
class Test
{
/**
* Constructor comment goes here
*
* @param string $first First param
* @param int $second Second param
* @param Test $third Third param with a longer description
*/
public function __construct(string $first, int $second, Test $third)
{
}
/**
* Function doc
*
* @param SomethingElse $a A param with a different doc type
* @param int|null $b Param with default value
*/
public function foo(\DateTime $a, int $b = null)
{
}
public static function bar($a)
{
}
/**
* Method with no params
*/
public function baz()
{
}
}
/**
* @param int $i Global function param one
* @param bool $b Default false param
2017-12-08 22:43:15 +00:00
* @param Test|null ...$things Test things
2017-08-16 11:53:16 +00:00
*/
2017-12-08 22:43:15 +00:00
function foo(int $i, bool $b = false, Test ...$things = null)
2017-08-16 11:53:16 +00:00
{
}
$t = new Test();
$t->foo();
2017-08-17 04:19:47 +00:00
$t->foo(1,
$t->foo(1,);
2017-08-16 11:53:16 +00:00
$t->baz();
2017-12-08 22:43:15 +00:00
foo(
1,
foo(1, 2,
);
2017-08-16 11:53:16 +00:00
Test::bar();