for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Atrapalo\PHPTools\Parser\Values;
/**
* Class Method
* @package Atrapalo\PHPTools\Parser\Values
*
* @author Guillermo González <[email protected]>
*/
class Method
{
/** @var bool */
private $isStatic;
/** @var string */
private $name;
private $return;
/** @var Param[] */
private $params;
private $description;
* Method constructor.
* @param bool $isStatic
* @param string $name
public function __construct(bool $isStatic, string $name)
$this->isStatic = $isStatic;
$this->setName($name);
}
* @return bool
public function isStatic(): bool
return $this->isStatic;
* @return string
public function name(): string
return $this->name;
* @return Method
private function setName(string $name)
if (empty($name)) {
throw new \InvalidArgumentException('Name is mandatory and can not be empty');
$this->name = $name;
return $this;
public function return ()
return $this->return;
* @param string $return
public function setReturn(string $return)
$this->return = $return;
* @return Param[]
public function params()
return $this->params;
* @param Param[] $params
public function setParams(array $params)
$this->params = $params;
public function description()
return $this->description;
* @param string $description
public function setDescription(string $description)
$this->description = $description;