http://phing.info/

Source Code Coverage

Designed for use with PHPUnit2, Xdebug and Phing.

Methods: 1 LOC: 46 Statements: 8
Legend: executednot executeddead code
Source file Statements Methods Total coverage
NotNull.php 100.0% 100.0% 100.0%
 
1
<?php
2
/**
3
 * Xyster Framework
4
 *
5
 * This source file is subject to the new BSD license that is bundled
6
 * with this package in the file LICENSE.txt.
7
 * It is also available through the world-wide-web at this URL:
8
 * http://www.opensource.org/licenses/bsd-license.php
9
 *
10
 * @category  Xyster
11
 * @package   Xyster_Validate
12
 * @copyright Copyright LibreWorks, LLC (http://libreworks.net)
13
 * @license   http://www.opensource.org/licenses/bsd-license.php New BSD License
14
 * @version   $Id$
15
 */
16
namespace Xyster\Validate;
17
/**
18
 * A null value validator
19
 *
20
 * @category  Xyster
21
 * @package   Xyster_Validate
22
 * @copyright Copyright LibreWorks, LLC (http://libreworks.net)
23
 * @license   http://www.opensource.org/licenses/bsd-license.php New BSD License
24
 */
25
class NotNull extends \Zend_Validate_NotEmpty
26 1
{
27
    /**
28
     * Defined by Zend_Validate_Interface
29
     *
30
     * Returns true if $value is not null.
31
     *
32
     * @param  string $value
33
     * @return boolean
34
     */
35
    public function isValid($value)
36
    {
37 1
        $this->_setValue($value);
38
39 1
        if ($value === NULL) {
40 1
            $this->_error(self::IS_EMPTY);
41 1
            return false;
42
        }
43
44 1
        return true;
45
    }
46 1
}


Report generated at 2010-10-18T17:19:48-04:00