for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* Author: Nil Portugués Calderó <[email protected]>
* Date: 9/20/14
* Time: 11:46 AM
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace NilPortugues\Validator\Validation;
* Class GenericAttribute
* @package Tests\NilPortugues\Validator\Validation
class GenericValidation
{
* @param string|null $value
* @return bool
public static function isRequired($value)
return isset($value) === true
&& \is_null($value) === false
&& empty($value) === false;
}
public static function isNotNull($value)
return $value !== null && $value !== '';