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