for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* This file is part of the core-library package.
*
* (c) 2018 WEBEWEB
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace WBW\Library\Core\Validation\Status;
use WBW\Library\Core\Validation\API\ValidationStatusInterface;
* Abstract validation status.
* @author webeweb <https://github.com/webeweb/>
* @package WBW\Library\Core\Validation\Status
* @abstract
abstract class AbstractValidationStatus implements ValidationStatusInterface {
* Get the code.
* @var int
private $code;
* Message.
* @var string
private $message;
* Rule name.
private $ruleName;
* Constructor.
* @param int $code The code.
* @param string $message The message.
protected function __construct($code, $message) {
$this->setCode($code);
$this->setMessage($message);
}
* {@inheritdoc}
public function getCode() {
return $this->code;
public function getMessage() {
return $this->message;
public function getRuleName() {
return $this->ruleName;
* Set the code.
* @return ValidationStatusInterface Returns this validation status.
public function setCode($code) {
$this->code = $code;
return $this;
* Set the message.
public function setMessage($message) {
$this->message = $message;
public function setRuleName($ruleName) {
$this->ruleName = $ruleName;