for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* Many changes have been made in this file.
* By Pierre-Henry SORIA.
*/
namespace PFBC;
use PH7\Framework\Security\Validate\Validate;
abstract class Validation extends Base
{
protected $oValidate, $message;
Only declaring a single property per statement allows you to later on add doc comments more easily.
It is also recommended by PSR2, so it is a common style that many people expect.
public function __construct($message = '')
$this->oValidate = new Validate;
if (!empty($message)) {
$this->message = t('%element% is invalid.');
}
public function getMessage()
return $this->message;
public function isNotApplicable($value)
return (is_null($value) || is_array($value) || $value === '');
public abstract function isValid($value);
Only declaring a single property per statement allows you to later on add doc comments more easily.
It is also recommended by PSR2, so it is a common style that many people expect.