for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace MabeEnumTest\TestAsset;
use MabeEnum\Enum;
/**
* @link http://github.com/marc-mabe/php-enum for the canonical source repository
* @copyright Copyright (c) 2015 Marc Bennewitz
* @license http://github.com/marc-mabe/php-enum/blob/master/LICENSE.txt New BSD License
*/
class FailureEnumWithArguments extends Enum
{
const VALIDATION_ERROR = 'validation error';
const DB_ERROR = 'db error';
* @var string
private $message;
* @param $message
* @return FailureEnumWithArguments
public static function VALIDATION_ERROR($message)
$failure = self::byValue(self::VALIDATION_ERROR);
$failure->message = $message;
return $failure;
}
* @param string $message
public static function DB_ERROR($message)
$failure = self::byValue(self::DB_ERROR);
* @return string
public function message()
return $this->message;