cvs: pear-core /PEAR/PackageFile/v2 Validator.php
| From: | Helgi �ormar �orbj�rnsson | Date: | Fri, 28 Mar 2008 22:23:41 +0000 |
| Subject: | cvs: pear-core /PEAR/PackageFile/v2 Validator.php | ||
| Groups: | php.pear.cvs php.pear.core | ||
| Request: | Send a blank email to pear-core+get-7413@lists.php.net to get a copy of this message | ||
dufuz Fri Mar 28 22:23:41 2008 UTC
Modified files:
/pear-core/PEAR/PackageFile/v2 Validator.php
Log:
Small cosmetics to make things a bit more readable
http://cvs.php.net/viewvc.cgi/pear-core/PEAR/PackageFile/v2/Validator.php?r1=1.105&r2=1.106&diff_format=u
Index: pear-core/PEAR/PackageFile/v2/Validator.php
diff -u pear-core/PEAR/PackageFile/v2/Validator.php:1.105
pear-core/PEAR/PackageFile/v2/Validator.php:1.106
--- pear-core/PEAR/PackageFile/v2/Validator.php:1.105 Fri Mar 28 20:47:16 2008
+++ pear-core/PEAR/PackageFile/v2/Validator.php Fri Mar 28 22:23:41 2008
@@ -15,7 +15,7 @@
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2008 The PHP Group
* @license http://www.php.net/license/3_0.txt
PHP License 3.0
- * @version CVS: $Id: Validator.php,v 1.105 2008/03/28 20:47:16 dufuz Exp $
+ * @version CVS: $Id: Validator.php,v 1.106 2008/03/28 22:23:41 dufuz Exp $
* @link http://pear.php.net/package/PEAR
* @since File available since Release 1.4.0a8
*/
@@ -79,7 +79,8 @@
}
if (!isset($this->_packageInfo['attribs']['version']) ||
($this->_packageInfo['attribs']['version'] != '2.0'
&&
- $this->_packageInfo['attribs']['version'] !=
'2.1')) {
+ $this->_packageInfo['attribs']['version'] != '2.1')
+ ) {
$this->_noPackageVersion();
}
$structure =
@@ -118,7 +119,8 @@
isset($test['dependencies']['required']['pearinstaller']) &&
isset($test['dependencies']['required']['pearinstaller']['min'])
&&
version_compare('@package_version@',
-
$test['dependencies']['required']['pearinstaller']['min'],
'<')) {
+
$test['dependencies']['required']['pearinstaller']['min'],
'<')
+ ) {
$this->_pearVersionTooLow($test['dependencies']['required']['pearinstaller']['min']);
return false;
}
@@ -138,18 +140,13 @@
if (array_key_exists('_lastversion', $test)) {
unset($test['_lastversion']);
}
- if (!$this->_stupidSchemaValidate($structure,
- $test, '<package>')) {
+ if (!$this->_stupidSchemaValidate($structure, $test, '<package>')) {
return false;
}
if (empty($this->_packageInfo['name'])) {
$this->_tagCannotBeEmpty('name');
}
- if (isset($this->_packageInfo['uri'])) {
- $test = 'uri';
- } else {
- $test = 'channel';
- }
+ $test = isset($this->_packageInfo['uri']) ? 'uri'
:'channel';
if (empty($this->_packageInfo[$test])) {
$this->_tagCannotBeEmpty($test);
}