for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
*
*/
* GraphicalValue class
* @author Laurent De Coninck <[email protected]>
class GraphicalValue
{
* @var int
private $value;
private $year;
private $type;
* GraphicalValue constructor.
* @param int $value
* @param int $year
* @param int $type
public function __construct($value, $year, $type)
$this->value = $value;
$this->year = $year;
$this->type = $type;
}
* @return int
public function getValue()
return $this->value;
public function getYear()
return $this->year;
public function getType()
return $this->type;
* @param GraphicalValue $value
* @return GraphicalValue
public function add($value)
return new GraphicalValue($this->value + $value->getValue(), $this->year, $this->type);