2016-10-09 23:54:58 +02:00
|
|
|
<?php
|
|
|
|
namespace Psalm;
|
|
|
|
|
|
|
|
class FunctionLikeParameter
|
|
|
|
{
|
2016-11-02 07:29:00 +01:00
|
|
|
/**
|
|
|
|
* @var string
|
|
|
|
*/
|
2016-10-09 23:54:58 +02:00
|
|
|
public $name;
|
|
|
|
|
2016-11-02 07:29:00 +01:00
|
|
|
/**
|
|
|
|
* @var bool
|
|
|
|
*/
|
2016-10-09 23:54:58 +02:00
|
|
|
public $by_ref;
|
|
|
|
|
2016-11-02 07:29:00 +01:00
|
|
|
/**
|
|
|
|
* @var Type\Union
|
|
|
|
*/
|
2016-10-09 23:54:58 +02:00
|
|
|
public $type;
|
|
|
|
|
2016-11-02 07:29:00 +01:00
|
|
|
/**
|
|
|
|
* @var Type\Union
|
|
|
|
*/
|
2016-10-16 00:01:04 +02:00
|
|
|
public $signature_type;
|
|
|
|
|
2016-11-02 07:29:00 +01:00
|
|
|
/**
|
|
|
|
* @var bool
|
|
|
|
*/
|
2016-10-09 23:54:58 +02:00
|
|
|
public $is_optional;
|
|
|
|
|
2016-11-02 07:29:00 +01:00
|
|
|
/**
|
|
|
|
* @var bool
|
|
|
|
*/
|
2016-10-09 23:54:58 +02:00
|
|
|
public $is_nullable;
|
|
|
|
|
2016-11-02 07:29:00 +01:00
|
|
|
/**
|
|
|
|
* @var int
|
|
|
|
*/
|
2016-10-15 06:12:57 +02:00
|
|
|
public $line;
|
|
|
|
|
2016-11-02 07:29:00 +01:00
|
|
|
/**
|
|
|
|
* @var bool
|
|
|
|
*/
|
2016-10-23 07:57:11 +02:00
|
|
|
public $is_variadic;
|
|
|
|
|
2016-10-15 06:12:57 +02:00
|
|
|
/**
|
|
|
|
* @param string $name
|
|
|
|
* @param boolean $by_ref
|
|
|
|
* @param Type\Union $type
|
|
|
|
* @param boolean $is_optional
|
|
|
|
* @param boolean $is_nullable
|
2016-10-19 06:31:32 +02:00
|
|
|
* @param boolean $is_variadic
|
2016-10-15 06:12:57 +02:00
|
|
|
*/
|
2016-11-02 07:29:00 +01:00
|
|
|
public function __construct(
|
|
|
|
$name,
|
|
|
|
$by_ref,
|
|
|
|
Type\Union $type,
|
|
|
|
$is_optional = true,
|
|
|
|
$is_nullable = false,
|
|
|
|
$is_variadic = false
|
|
|
|
) {
|
2016-10-09 23:54:58 +02:00
|
|
|
$this->name = $name;
|
|
|
|
$this->by_ref = $by_ref;
|
|
|
|
$this->type = $type;
|
2016-10-16 00:01:04 +02:00
|
|
|
$this->signature_type = $type;
|
2016-10-09 23:54:58 +02:00
|
|
|
$this->is_optional = $is_optional;
|
|
|
|
$this->is_nullable = $is_nullable;
|
2016-10-19 06:31:32 +02:00
|
|
|
$this->is_variadic = $is_variadic;
|
2016-10-09 23:54:58 +02:00
|
|
|
}
|
|
|
|
}
|