for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace BestServedCold\PhalueObjects\Mathematical\Operator;
/**
* Class TypeTrait
*
* @package BestServedCold\PhalueObjects\Mathematical\Operator
* @author Adam Lewis <[email protected]>
* @copyright Copyright (c) 2015 Best Served Cold Media Limited
* @license http://http://opensource.org/licenses/GPL-3.0 GPL License
* @link http://bestservedcold.com
* @since 0.0.1-alpha
* @version 0.0.2-alpha
*/
trait TypeTrait
{
* @return int
public abstract function getValue();
* @return bool
public function isPositive()
return $this->getValue() > 0;
}
public function isNegative()
return $this->getValue() < 0;
public function isZero()
return $this->getValue() === 0;
public function isNegativeOrZero()
return $this->isNegative() || $this->isZero();
public function isPositiveOrZero()
return $this->isPositive() || $this->isZero();