for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Atrapalo\PHPTools\Parser\Values;
/**
* Class Param
* @package Atrapalo\PHPTools\Parser\Values
*
* @author Guillermo González <[email protected]>
*/
class Param
{
/** @var string */
private $name;
private $type;
* Param constructor.
* @param string $name
* @param string $type
public function __construct($name, $type = '')
$this->setName($name);
$this->type = $type;
}
* @return string
public function name(): string
return $this->name;
* @return Param
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 type(): string
return $this->type;