* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version CVS: $Id: Validate.php 313023 2011-07-06 19:17:11Z dufuz $
* @link http://pear.php.net/package/PEAR
* @since File available since Release 1.4.0a1
*/
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: 1.9.4
+ * @version Release: 1.10.1
* @link http://pear.php.net/package/PEAR
* @since Class available since Release 1.4.0a1
*/
* to the PEAR naming convention, so the method is final and static.
* @param string
* @final
- * @static
*/
- function validGroupName($name)
+ public static function validGroupName($name)
{
return (bool) preg_match('/^' . _PEAR_COMMON_PACKAGE_NAME_PREG . '\\z/', $name);
}
* Determine whether $state represents a valid stability level
* @param string
* @return bool
- * @static
* @final
*/
- function validState($state)
+ public static function validState($state)
{
return in_array($state, array('snapshot', 'devel', 'alpha', 'beta', 'stable'));
}
/**
* Get a list of valid stability levels
* @return array
- * @static
* @final
*/
- function getValidStates()
+ public static function getValidStates()
{
return array('snapshot', 'devel', 'alpha', 'beta', 'stable');
}
* by version_compare
* @param string
* @return bool
- * @static
* @final
*/
- function validVersion($ver)
+ public static function validVersion($ver)
{
return (bool) preg_match(PEAR_COMMON_PACKAGE_VERSION_PREG, $ver);
}
$this->_packagexml->getExtends()) {
$version = $this->_packagexml->getVersion() . '';
$name = $this->_packagexml->getPackage();
- $test = array_shift($a = explode('.', $version));
+ $a = explode('.', $version);
+ $test = array_shift($a);
if ($test == '0') {
return true;
}