for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* Date: 23.11.15
*
* @author Portey Vasil <[email protected]>
*/
namespace Youshido\GraphQL\Parser\Ast\ArgumentValue;
class Variable implements ValueInterface
{
/** @var string */
private $name;
/** @var mixed */
private $value;
private $type;
/** @var bool */
private $nullable = false;
private $isArray = false;
private $used = false;
public function __construct($name, $type, $nullable = false, $isArray = false)
$this->name = $name;
$this->type = $type;
$this->isArray = $isArray;
$this->nullable = $nullable;
}
* @return mixed
* @throws \LogicException
public function getValue()
if (null === $this->value) {
throw new \LogicException('Value is not set for variable "' . $this->name . '"');
return $this->value;
* @param mixed $value
public function setValue($value)
$this->value = $value;
* @return string
public function getName()
return $this->name;
* @param string $name
public function setName($name)
public function getTypeName()
return $this->type;
* @param string $type
public function setTypeName($type)
* @return boolean
public function isArray()
return $this->isArray;
* @param boolean $isArray
public function setIsArray($isArray)
public function isNullable()
return $this->nullable;
* @param boolean $nullable
public function setNullable($nullable)
public function isUsed()
return $this->used;
* @param boolean $used
* @return $this
public function setUsed($used)
$this->used = $used;
return $this;