cvs: pear /Spreadsheet_Excel_Writer/Writer Parser.php
| From: | Xavier Noguer Gallego | Date: | Fri, 11 Nov 2005 14:51:09 +0000 |
| Subject: | cvs: pear /Spreadsheet_Excel_Writer/Writer Parser.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-36210@lists.php.net to get a copy of this message | ||
xnoguer Fri Nov 11 09:51:09 2005 EDT
Modified files:
/pear/Spreadsheet_Excel_Writer/Writer Parser.php
Log:
improving readablity
http://cvs.php.net/diff.php/pear/Spreadsheet_Excel_Writer/Writer/Parser.php?r1=1.52&r2=1.53&ty=u
Index: pear/Spreadsheet_Excel_Writer/Writer/Parser.php
diff -u pear/Spreadsheet_Excel_Writer/Writer/Parser.php:1.52
pear/Spreadsheet_Excel_Writer/Writer/Parser.php:1.53
--- pear/Spreadsheet_Excel_Writer/Writer/Parser.php:1.52 Mon Nov 7 19:22:35 2005
+++ pear/Spreadsheet_Excel_Writer/Writer/Parser.php Fri Nov 11 09:51:07 2005
@@ -1387,7 +1387,7 @@
if (PEAR::isError($result)) {
return $result;
}
- while (($this->_current_token == SPREADSHEET_EXCEL_WRITER_ADD) ||
+ while (($this->_current_token == SPREADSHEET_EXCEL_WRITER_ADD) or
($this->_current_token == SPREADSHEET_EXCEL_WRITER_SUB))
{
if ($this->_current_token == SPREADSHEET_EXCEL_WRITER_ADD) {
@@ -1436,7 +1436,7 @@
if (PEAR::isError($result)) {
return $result;
}
- while (($this->_current_token == SPREADSHEET_EXCEL_WRITER_MUL) ||
+ while (($this->_current_token == SPREADSHEET_EXCEL_WRITER_MUL) or
($this->_current_token == SPREADSHEET_EXCEL_WRITER_DIV))
{
if ($this->_current_token == SPREADSHEET_EXCEL_WRITER_MUL)
@@ -1554,9 +1554,10 @@
$function = $this->_current_token;
$this->_advance();
$this->_advance(); // eat the "("
- while ($this->_current_token != ')') {
+ while ($this->_current_token != ')')
+ {
if ($num_args > 0) {
- if ($this->_current_token == SPREADSHEET_EXCEL_WRITER_COMA ||
+ if ($this->_current_token == SPREADSHEET_EXCEL_WRITER_COMA or
$this->_current_token == SPREADSHEET_EXCEL_WRITER_SEMICOLON)
{
$this->_advance(); // eat the "," or ";"
@@ -1664,10 +1665,10 @@
$polish .= $converted_tree;
}
// if it's a function convert it here (so we can set it's arguments)
- if (preg_match("/^[A-Z0-9\xc0-\xdc\.]+$/",$tree['value']) &&
- !preg_match('/^([A-Ia-i]?[A-Za-z])(\d+)$/',$tree['value'])
&&
-
!preg_match("/^[A-Ia-i]?[A-Za-z](\d+)\.\.[A-Ia-i]?[A-Za-z](\d+)$/",$tree['value'])
&&
- !is_numeric($tree['value']) &&
+ if (preg_match("/^[A-Z0-9\xc0-\xdc\.]+$/",$tree['value']) and
+ !preg_match('/^([A-Ia-i]?[A-Za-z])(\d+)$/',$tree['value']) and
+
!preg_match("/^[A-Ia-i]?[A-Za-z](\d+)\.\.[A-Ia-i]?[A-Za-z](\d+)$/",$tree['value'])
and
+ !is_numeric($tree['value']) and
!isset($this->ptg[$tree['value']]))
{
// left subtree for a function is always an array.