Modifying a few constants to psr-2 standards

This commit is contained in:
MarkBaker 2015-05-23 23:41:38 +01:00
parent 98a087afb4
commit 003c259801
8 changed files with 283 additions and 283 deletions

View File

@ -74,80 +74,80 @@ class PHPExcel_Reader_Excel5 extends PHPExcel_Reader_Abstract implements PHPExce
const XLS_Worksheet = 0x0010; const XLS_Worksheet = 0x0010;
// record identifiers // record identifiers
const XLS_Type_FORMULA = 0x0006; const XLS_TYPE_FORMULA = 0x0006;
const XLS_Type_EOF = 0x000a; const XLS_TYPE_EOF = 0x000a;
const XLS_Type_PROTECT = 0x0012; const XLS_TYPE_PROTECT = 0x0012;
const XLS_Type_OBJECTPROTECT = 0x0063; const XLS_TYPE_OBJECTPROTECT = 0x0063;
const XLS_Type_SCENPROTECT = 0x00dd; const XLS_TYPE_SCENPROTECT = 0x00dd;
const XLS_Type_PASSWORD = 0x0013; const XLS_TYPE_PASSWORD = 0x0013;
const XLS_Type_HEADER = 0x0014; const XLS_TYPE_HEADER = 0x0014;
const XLS_Type_FOOTER = 0x0015; const XLS_TYPE_FOOTER = 0x0015;
const XLS_Type_EXTERNSHEET = 0x0017; const XLS_TYPE_EXTERNSHEET = 0x0017;
const XLS_Type_DEFINEDNAME = 0x0018; const XLS_TYPE_DEFINEDNAME = 0x0018;
const XLS_Type_VERTICALPAGEBREAKS = 0x001a; const XLS_TYPE_VERTICALPAGEBREAKS = 0x001a;
const XLS_Type_HORIZONTALPAGEBREAKS = 0x001b; const XLS_TYPE_HORIZONTALPAGEBREAKS = 0x001b;
const XLS_Type_NOTE = 0x001c; const XLS_TYPE_NOTE = 0x001c;
const XLS_Type_SELECTION = 0x001d; const XLS_TYPE_SELECTION = 0x001d;
const XLS_Type_DATEMODE = 0x0022; const XLS_TYPE_DATEMODE = 0x0022;
const XLS_Type_EXTERNNAME = 0x0023; const XLS_TYPE_EXTERNNAME = 0x0023;
const XLS_Type_LEFTMARGIN = 0x0026; const XLS_TYPE_LEFTMARGIN = 0x0026;
const XLS_Type_RIGHTMARGIN = 0x0027; const XLS_TYPE_RIGHTMARGIN = 0x0027;
const XLS_Type_TOPMARGIN = 0x0028; const XLS_TYPE_TOPMARGIN = 0x0028;
const XLS_Type_BOTTOMMARGIN = 0x0029; const XLS_TYPE_BOTTOMMARGIN = 0x0029;
const XLS_Type_PRINTGRIDLINES = 0x002b; const XLS_TYPE_PRINTGRIDLINES = 0x002b;
const XLS_Type_FILEPASS = 0x002f; const XLS_TYPE_FILEPASS = 0x002f;
const XLS_Type_FONT = 0x0031; const XLS_TYPE_FONT = 0x0031;
const XLS_Type_CONTINUE = 0x003c; const XLS_TYPE_CONTINUE = 0x003c;
const XLS_Type_PANE = 0x0041; const XLS_TYPE_PANE = 0x0041;
const XLS_Type_CODEPAGE = 0x0042; const XLS_TYPE_CODEPAGE = 0x0042;
const XLS_Type_DEFCOLWIDTH = 0x0055; const XLS_TYPE_DEFCOLWIDTH = 0x0055;
const XLS_Type_OBJ = 0x005d; const XLS_TYPE_OBJ = 0x005d;
const XLS_Type_COLINFO = 0x007d; const XLS_TYPE_COLINFO = 0x007d;
const XLS_Type_IMDATA = 0x007f; const XLS_TYPE_IMDATA = 0x007f;
const XLS_Type_SHEETPR = 0x0081; const XLS_TYPE_SHEETPR = 0x0081;
const XLS_Type_HCENTER = 0x0083; const XLS_TYPE_HCENTER = 0x0083;
const XLS_Type_VCENTER = 0x0084; const XLS_TYPE_VCENTER = 0x0084;
const XLS_Type_SHEET = 0x0085; const XLS_TYPE_SHEET = 0x0085;
const XLS_Type_PALETTE = 0x0092; const XLS_TYPE_PALETTE = 0x0092;
const XLS_Type_SCL = 0x00a0; const XLS_TYPE_SCL = 0x00a0;
const XLS_Type_PAGESETUP = 0x00a1; const XLS_TYPE_PAGESETUP = 0x00a1;
const XLS_Type_MULRK = 0x00bd; const XLS_TYPE_MULRK = 0x00bd;
const XLS_Type_MULBLANK = 0x00be; const XLS_TYPE_MULBLANK = 0x00be;
const XLS_Type_DBCELL = 0x00d7; const XLS_TYPE_DBCELL = 0x00d7;
const XLS_Type_XF = 0x00e0; const XLS_TYPE_XF = 0x00e0;
const XLS_Type_MERGEDCELLS = 0x00e5; const XLS_TYPE_MERGEDCELLS = 0x00e5;
const XLS_Type_MSODRAWINGGROUP = 0x00eb; const XLS_TYPE_MSODRAWINGGROUP = 0x00eb;
const XLS_Type_MSODRAWING = 0x00ec; const XLS_TYPE_MSODRAWING = 0x00ec;
const XLS_Type_SST = 0x00fc; const XLS_TYPE_SST = 0x00fc;
const XLS_Type_LABELSST = 0x00fd; const XLS_TYPE_LABELSST = 0x00fd;
const XLS_Type_EXTSST = 0x00ff; const XLS_TYPE_EXTSST = 0x00ff;
const XLS_Type_EXTERNALBOOK = 0x01ae; const XLS_TYPE_EXTERNALBOOK = 0x01ae;
const XLS_Type_DATAVALIDATIONS = 0x01b2; const XLS_TYPE_DATAVALIDATIONS = 0x01b2;
const XLS_Type_TXO = 0x01b6; const XLS_TYPE_TXO = 0x01b6;
const XLS_Type_HYPERLINK = 0x01b8; const XLS_TYPE_HYPERLINK = 0x01b8;
const XLS_Type_DATAVALIDATION = 0x01be; const XLS_TYPE_DATAVALIDATION = 0x01be;
const XLS_Type_DIMENSION = 0x0200; const XLS_TYPE_DIMENSION = 0x0200;
const XLS_Type_BLANK = 0x0201; const XLS_TYPE_BLANK = 0x0201;
const XLS_Type_NUMBER = 0x0203; const XLS_TYPE_NUMBER = 0x0203;
const XLS_Type_LABEL = 0x0204; const XLS_TYPE_LABEL = 0x0204;
const XLS_Type_BOOLERR = 0x0205; const XLS_TYPE_BOOLERR = 0x0205;
const XLS_Type_STRING = 0x0207; const XLS_TYPE_STRING = 0x0207;
const XLS_Type_ROW = 0x0208; const XLS_TYPE_ROW = 0x0208;
const XLS_Type_INDEX = 0x020b; const XLS_TYPE_INDEX = 0x020b;
const XLS_Type_ARRAY = 0x0221; const XLS_TYPE_ARRAY = 0x0221;
const XLS_Type_DEFAULTROWHEIGHT = 0x0225; const XLS_TYPE_DEFAULTROWHEIGHT = 0x0225;
const XLS_Type_WINDOW2 = 0x023e; const XLS_TYPE_WINDOW2 = 0x023e;
const XLS_Type_RK = 0x027e; const XLS_TYPE_RK = 0x027e;
const XLS_Type_STYLE = 0x0293; const XLS_TYPE_STYLE = 0x0293;
const XLS_Type_FORMAT = 0x041e; const XLS_TYPE_FORMAT = 0x041e;
const XLS_Type_SHAREDFMLA = 0x04bc; const XLS_TYPE_SHAREDFMLA = 0x04bc;
const XLS_Type_BOF = 0x0809; const XLS_TYPE_BOF = 0x0809;
const XLS_Type_SHEETPROTECTION = 0x0867; const XLS_TYPE_SHEETPROTECTION = 0x0867;
const XLS_Type_RANGEPROTECTION = 0x0868; const XLS_TYPE_RANGEPROTECTION = 0x0868;
const XLS_Type_SHEETLAYOUT = 0x0862; const XLS_TYPE_SHEETLAYOUT = 0x0862;
const XLS_Type_XFEXT = 0x087d; const XLS_TYPE_XFEXT = 0x087d;
const XLS_Type_PAGELAYOUTVIEW = 0x088b; const XLS_TYPE_PAGELAYOUTVIEW = 0x088b;
const XLS_Type_UNKNOWN = 0xffff; const XLS_TYPE_UNKNOWN = 0xffff;
// Encryption type // Encryption type
const MS_BIFF_CRYPTO_NONE = 0; const MS_BIFF_CRYPTO_NONE = 0;
@ -474,13 +474,13 @@ class PHPExcel_Reader_Excel5 extends PHPExcel_Reader_Abstract implements PHPExce
$code = self::getInt2d($this->data, $this->pos); $code = self::getInt2d($this->data, $this->pos);
switch ($code) { switch ($code) {
case self::XLS_Type_BOF: case self::XLS_TYPE_BOF:
$this->readBof(); $this->readBof();
break; break;
case self::XLS_Type_SHEET: case self::XLS_TYPE_SHEET:
$this->readSheet(); $this->readSheet();
break; break;
case self::XLS_Type_EOF: case self::XLS_TYPE_EOF:
$this->readDefault(); $this->readDefault();
break 2; break 2;
default: default:
@ -532,13 +532,13 @@ class PHPExcel_Reader_Excel5 extends PHPExcel_Reader_Abstract implements PHPExce
$code = self::getInt2d($this->data, $this->pos); $code = self::getInt2d($this->data, $this->pos);
switch ($code) { switch ($code) {
case self::XLS_Type_BOF: case self::XLS_TYPE_BOF:
$this->readBof(); $this->readBof();
break; break;
case self::XLS_Type_SHEET: case self::XLS_TYPE_SHEET:
$this->readSheet(); $this->readSheet();
break; break;
case self::XLS_Type_EOF: case self::XLS_TYPE_EOF:
$this->readDefault(); $this->readDefault();
break 2; break 2;
default: default:
@ -569,12 +569,12 @@ class PHPExcel_Reader_Excel5 extends PHPExcel_Reader_Abstract implements PHPExce
$code = self::getInt2d($this->data, $this->pos); $code = self::getInt2d($this->data, $this->pos);
switch ($code) { switch ($code) {
case self::XLS_Type_RK: case self::XLS_TYPE_RK:
case self::XLS_Type_LABELSST: case self::XLS_TYPE_LABELSST:
case self::XLS_Type_NUMBER: case self::XLS_TYPE_NUMBER:
case self::XLS_Type_FORMULA: case self::XLS_TYPE_FORMULA:
case self::XLS_Type_BOOLERR: case self::XLS_TYPE_BOOLERR:
case self::XLS_Type_LABEL: case self::XLS_TYPE_LABEL:
$length = self::getInt2d($this->data, $this->pos + 2); $length = self::getInt2d($this->data, $this->pos + 2);
$recordData = $this->readRecordData($this->data, $this->pos + 4, $length); $recordData = $this->readRecordData($this->data, $this->pos + 4, $length);
@ -587,10 +587,10 @@ class PHPExcel_Reader_Excel5 extends PHPExcel_Reader_Abstract implements PHPExce
$tmpInfo['totalRows'] = max($tmpInfo['totalRows'], $rowIndex); $tmpInfo['totalRows'] = max($tmpInfo['totalRows'], $rowIndex);
$tmpInfo['lastColumnIndex'] = max($tmpInfo['lastColumnIndex'], $columnIndex); $tmpInfo['lastColumnIndex'] = max($tmpInfo['lastColumnIndex'], $columnIndex);
break; break;
case self::XLS_Type_BOF: case self::XLS_TYPE_BOF:
$this->readBof(); $this->readBof();
break; break;
case self::XLS_Type_EOF: case self::XLS_TYPE_EOF:
$this->readDefault(); $this->readDefault();
break 2; break 2;
default: default:
@ -659,58 +659,58 @@ class PHPExcel_Reader_Excel5 extends PHPExcel_Reader_Abstract implements PHPExce
$code = self::getInt2d($this->data, $this->pos); $code = self::getInt2d($this->data, $this->pos);
switch ($code) { switch ($code) {
case self::XLS_Type_BOF: case self::XLS_TYPE_BOF:
$this->readBof(); $this->readBof();
break; break;
case self::XLS_Type_FILEPASS: case self::XLS_TYPE_FILEPASS:
$this->readFilepass(); $this->readFilepass();
break; break;
case self::XLS_Type_CODEPAGE: case self::XLS_TYPE_CODEPAGE:
$this->readCodepage(); $this->readCodepage();
break; break;
case self::XLS_Type_DATEMODE: case self::XLS_TYPE_DATEMODE:
$this->readDateMode(); $this->readDateMode();
break; break;
case self::XLS_Type_FONT: case self::XLS_TYPE_FONT:
$this->readFont(); $this->readFont();
break; break;
case self::XLS_Type_FORMAT: case self::XLS_TYPE_FORMAT:
$this->readFormat(); $this->readFormat();
break; break;
case self::XLS_Type_XF: case self::XLS_TYPE_XF:
$this->readXf(); $this->readXf();
break; break;
case self::XLS_Type_XFEXT: case self::XLS_TYPE_XFEXT:
$this->readXfExt(); $this->readXfExt();
break; break;
case self::XLS_Type_STYLE: case self::XLS_TYPE_STYLE:
$this->readStyle(); $this->readStyle();
break; break;
case self::XLS_Type_PALETTE: case self::XLS_TYPE_PALETTE:
$this->readPalette(); $this->readPalette();
break; break;
case self::XLS_Type_SHEET: case self::XLS_TYPE_SHEET:
$this->readSheet(); $this->readSheet();
break; break;
case self::XLS_Type_EXTERNALBOOK: case self::XLS_TYPE_EXTERNALBOOK:
$this->readExternalBook(); $this->readExternalBook();
break; break;
case self::XLS_Type_EXTERNNAME: case self::XLS_TYPE_EXTERNNAME:
$this->readExternName(); $this->readExternName();
break; break;
case self::XLS_Type_EXTERNSHEET: case self::XLS_TYPE_EXTERNSHEET:
$this->readExternSheet(); $this->readExternSheet();
break; break;
case self::XLS_Type_DEFINEDNAME: case self::XLS_TYPE_DEFINEDNAME:
$this->readDefinedName(); $this->readDefinedName();
break; break;
case self::XLS_Type_MSODRAWINGGROUP: case self::XLS_TYPE_MSODRAWINGGROUP:
$this->readMsoDrawingGroup(); $this->readMsoDrawingGroup();
break; break;
case self::XLS_Type_SST: case self::XLS_TYPE_SST:
$this->readSst(); $this->readSst();
break; break;
case self::XLS_Type_EOF: case self::XLS_TYPE_EOF:
$this->readDefault(); $this->readDefault();
break 2; break 2;
default: default:
@ -831,161 +831,161 @@ class PHPExcel_Reader_Excel5 extends PHPExcel_Reader_Abstract implements PHPExce
$code = self::getInt2d($this->data, $this->pos); $code = self::getInt2d($this->data, $this->pos);
switch ($code) { switch ($code) {
case self::XLS_Type_BOF: case self::XLS_TYPE_BOF:
$this->readBof(); $this->readBof();
break; break;
case self::XLS_Type_PRINTGRIDLINES: case self::XLS_TYPE_PRINTGRIDLINES:
$this->readPrintGridlines(); $this->readPrintGridlines();
break; break;
case self::XLS_Type_DEFAULTROWHEIGHT: case self::XLS_TYPE_DEFAULTROWHEIGHT:
$this->readDefaultRowHeight(); $this->readDefaultRowHeight();
break; break;
case self::XLS_Type_SHEETPR: case self::XLS_TYPE_SHEETPR:
$this->readSheetPr(); $this->readSheetPr();
break; break;
case self::XLS_Type_HORIZONTALPAGEBREAKS: case self::XLS_TYPE_HORIZONTALPAGEBREAKS:
$this->readHorizontalPageBreaks(); $this->readHorizontalPageBreaks();
break; break;
case self::XLS_Type_VERTICALPAGEBREAKS: case self::XLS_TYPE_VERTICALPAGEBREAKS:
$this->readVerticalPageBreaks(); $this->readVerticalPageBreaks();
break; break;
case self::XLS_Type_HEADER: case self::XLS_TYPE_HEADER:
$this->readHeader(); $this->readHeader();
break; break;
case self::XLS_Type_FOOTER: case self::XLS_TYPE_FOOTER:
$this->readFooter(); $this->readFooter();
break; break;
case self::XLS_Type_HCENTER: case self::XLS_TYPE_HCENTER:
$this->readHcenter(); $this->readHcenter();
break; break;
case self::XLS_Type_VCENTER: case self::XLS_TYPE_VCENTER:
$this->readVcenter(); $this->readVcenter();
break; break;
case self::XLS_Type_LEFTMARGIN: case self::XLS_TYPE_LEFTMARGIN:
$this->readLeftMargin(); $this->readLeftMargin();
break; break;
case self::XLS_Type_RIGHTMARGIN: case self::XLS_TYPE_RIGHTMARGIN:
$this->readRightMargin(); $this->readRightMargin();
break; break;
case self::XLS_Type_TOPMARGIN: case self::XLS_TYPE_TOPMARGIN:
$this->readTopMargin(); $this->readTopMargin();
break; break;
case self::XLS_Type_BOTTOMMARGIN: case self::XLS_TYPE_BOTTOMMARGIN:
$this->readBottomMargin(); $this->readBottomMargin();
break; break;
case self::XLS_Type_PAGESETUP: case self::XLS_TYPE_PAGESETUP:
$this->readPageSetup(); $this->readPageSetup();
break; break;
case self::XLS_Type_PROTECT: case self::XLS_TYPE_PROTECT:
$this->readProtect(); $this->readProtect();
break; break;
case self::XLS_Type_SCENPROTECT: case self::XLS_TYPE_SCENPROTECT:
$this->readScenProtect(); $this->readScenProtect();
break; break;
case self::XLS_Type_OBJECTPROTECT: case self::XLS_TYPE_OBJECTPROTECT:
$this->readObjectProtect(); $this->readObjectProtect();
break; break;
case self::XLS_Type_PASSWORD: case self::XLS_TYPE_PASSWORD:
$this->readPassword(); $this->readPassword();
break; break;
case self::XLS_Type_DEFCOLWIDTH: case self::XLS_TYPE_DEFCOLWIDTH:
$this->readDefColWidth(); $this->readDefColWidth();
break; break;
case self::XLS_Type_COLINFO: case self::XLS_TYPE_COLINFO:
$this->readColInfo(); $this->readColInfo();
break; break;
case self::XLS_Type_DIMENSION: case self::XLS_TYPE_DIMENSION:
$this->readDefault(); $this->readDefault();
break; break;
case self::XLS_Type_ROW: case self::XLS_TYPE_ROW:
$this->readRow(); $this->readRow();
break; break;
case self::XLS_Type_DBCELL: case self::XLS_TYPE_DBCELL:
$this->readDefault(); $this->readDefault();
break; break;
case self::XLS_Type_RK: case self::XLS_TYPE_RK:
$this->readRk(); $this->readRk();
break; break;
case self::XLS_Type_LABELSST: case self::XLS_TYPE_LABELSST:
$this->readLabelSst(); $this->readLabelSst();
break; break;
case self::XLS_Type_MULRK: case self::XLS_TYPE_MULRK:
$this->readMulRk(); $this->readMulRk();
break; break;
case self::XLS_Type_NUMBER: case self::XLS_TYPE_NUMBER:
$this->readNumber(); $this->readNumber();
break; break;
case self::XLS_Type_FORMULA: case self::XLS_TYPE_FORMULA:
$this->readFormula(); $this->readFormula();
break; break;
case self::XLS_Type_SHAREDFMLA: case self::XLS_TYPE_SHAREDFMLA:
$this->readSharedFmla(); $this->readSharedFmla();
break; break;
case self::XLS_Type_BOOLERR: case self::XLS_TYPE_BOOLERR:
$this->readBoolErr(); $this->readBoolErr();
break; break;
case self::XLS_Type_MULBLANK: case self::XLS_TYPE_MULBLANK:
$this->readMulBlank(); $this->readMulBlank();
break; break;
case self::XLS_Type_LABEL: case self::XLS_TYPE_LABEL:
$this->readLabel(); $this->readLabel();
break; break;
case self::XLS_Type_BLANK: case self::XLS_TYPE_BLANK:
$this->readBlank(); $this->readBlank();
break; break;
case self::XLS_Type_MSODRAWING: case self::XLS_TYPE_MSODRAWING:
$this->readMsoDrawing(); $this->readMsoDrawing();
break; break;
case self::XLS_Type_OBJ: case self::XLS_TYPE_OBJ:
$this->readObj(); $this->readObj();
break; break;
case self::XLS_Type_WINDOW2: case self::XLS_TYPE_WINDOW2:
$this->readWindow2(); $this->readWindow2();
break; break;
case self::XLS_Type_PAGELAYOUTVIEW: case self::XLS_TYPE_PAGELAYOUTVIEW:
$this->readPageLayoutView(); $this->readPageLayoutView();
break; break;
case self::XLS_Type_SCL: case self::XLS_TYPE_SCL:
$this->readScl(); $this->readScl();
break; break;
case self::XLS_Type_PANE: case self::XLS_TYPE_PANE:
$this->readPane(); $this->readPane();
break; break;
case self::XLS_Type_SELECTION: case self::XLS_TYPE_SELECTION:
$this->readSelection(); $this->readSelection();
break; break;
case self::XLS_Type_MERGEDCELLS: case self::XLS_TYPE_MERGEDCELLS:
$this->readMergedCells(); $this->readMergedCells();
break; break;
case self::XLS_Type_HYPERLINK: case self::XLS_TYPE_HYPERLINK:
$this->readHyperLink(); $this->readHyperLink();
break; break;
case self::XLS_Type_DATAVALIDATIONS: case self::XLS_TYPE_DATAVALIDATIONS:
$this->readDataValidations(); $this->readDataValidations();
break; break;
case self::XLS_Type_DATAVALIDATION: case self::XLS_TYPE_DATAVALIDATION:
$this->readDataValidation(); $this->readDataValidation();
break; break;
case self::XLS_Type_SHEETLAYOUT: case self::XLS_TYPE_SHEETLAYOUT:
$this->readSheetLayout(); $this->readSheetLayout();
break; break;
case self::XLS_Type_SHEETPROTECTION: case self::XLS_TYPE_SHEETPROTECTION:
$this->readSheetProtection(); $this->readSheetProtection();
break; break;
case self::XLS_Type_RANGEPROTECTION: case self::XLS_TYPE_RANGEPROTECTION:
$this->readRangeProtection(); $this->readRangeProtection();
break; break;
case self::XLS_Type_NOTE: case self::XLS_TYPE_NOTE:
$this->readNote(); $this->readNote();
break; break;
//case self::XLS_Type_IMDATA: $this->readImData(); break; //case self::XLS_TYPE_IMDATA: $this->readImData(); break;
case self::XLS_Type_TXO: case self::XLS_TYPE_TXO:
$this->readTextObject(); $this->readTextObject();
break; break;
case self::XLS_Type_CONTINUE: case self::XLS_TYPE_CONTINUE:
$this->readContinue(); $this->readContinue();
break; break;
case self::XLS_Type_EOF: case self::XLS_TYPE_EOF:
$this->readDefault(); $this->readDefault();
break 2; break 2;
default: default:
@ -1720,7 +1720,7 @@ class PHPExcel_Reader_Excel5 extends PHPExcel_Reader_Abstract implements PHPExce
do { do {
$code = self::getInt2d($this->data, $this->pos); $code = self::getInt2d($this->data, $this->pos);
$this->readDefault(); $this->readDefault();
} while ($code != self::XLS_Type_EOF && $this->pos < $this->dataSize); } while ($code != self::XLS_TYPE_EOF && $this->pos < $this->dataSize);
break; break;
} }
} }
@ -3905,7 +3905,7 @@ class PHPExcel_Reader_Excel5 extends PHPExcel_Reader_Abstract implements PHPExce
// read possible SHAREDFMLA record // read possible SHAREDFMLA record
$code = self::getInt2d($this->data, $this->pos); $code = self::getInt2d($this->data, $this->pos);
if ($code == self::XLS_Type_SHAREDFMLA) { if ($code == self::XLS_TYPE_SHAREDFMLA) {
$this->readSharedFmla(); $this->readSharedFmla();
} }
@ -5260,7 +5260,7 @@ class PHPExcel_Reader_Excel5 extends PHPExcel_Reader_Abstract implements PHPExce
$this->pos += 4 + $length; $this->pos += 4 + $length;
$nextIdentifier = self::getInt2d($this->data, $this->pos); $nextIdentifier = self::getInt2d($this->data, $this->pos);
} while ($nextIdentifier == self::XLS_Type_CONTINUE); } while ($nextIdentifier == self::XLS_TYPE_CONTINUE);
$splicedData = array( $splicedData = array(
'recordData' => $data, 'recordData' => $data,

View File

@ -85,10 +85,10 @@ class PHPExcel_Reader_Excel5_MD5
$C = $this->c; $C = $this->c;
$D = $this->d; $D = $this->d;
$F = array('PHPExcel_Reader_Excel5_MD5','F'); $F = array('PHPExcel_Reader_Excel5_MD5','f');
$G = array('PHPExcel_Reader_Excel5_MD5','G'); $G = array('PHPExcel_Reader_Excel5_MD5','g');
$H = array('PHPExcel_Reader_Excel5_MD5','H'); $H = array('PHPExcel_Reader_Excel5_MD5','h');
$I = array('PHPExcel_Reader_Excel5_MD5','I'); $I = array('PHPExcel_Reader_Excel5_MD5','i');
/* ROUND 1 */ /* ROUND 1 */
self::step($F, $A, $B, $C, $D, $words[0], 7, 0xd76aa478); self::step($F, $A, $B, $C, $D, $words[0], 7, 0xd76aa478);
@ -168,22 +168,22 @@ class PHPExcel_Reader_Excel5_MD5
$this->d = ($this->d + $D) & 0xffffffff; $this->d = ($this->d + $D) & 0xffffffff;
} }
private static function F($X, $Y, $Z) private static function f($X, $Y, $Z)
{ {
return (($X & $Y) | ((~ $X) & $Z)); // X AND Y OR NOT X AND Z return (($X & $Y) | ((~ $X) & $Z)); // X AND Y OR NOT X AND Z
} }
private static function G($X, $Y, $Z) private static function g($X, $Y, $Z)
{ {
return (($X & $Z) | ($Y & (~ $Z))); // X AND Z OR Y AND NOT Z return (($X & $Z) | ($Y & (~ $Z))); // X AND Z OR Y AND NOT Z
} }
private static function H($X, $Y, $Z) private static function h($X, $Y, $Z)
{ {
return ($X ^ $Y ^ $Z); // X XOR Y XOR Z return ($X ^ $Y ^ $Z); // X XOR Y XOR Z
} }
private static function I($X, $Y, $Z) private static function i($X, $Y, $Z)
{ {
return ($Y ^ ($X | (~ $Z))) ; // Y XOR (X OR NOT Z) return ($Y ^ ($X | (~ $Z))) ; // Y XOR (X OR NOT Z)
} }

View File

@ -73,7 +73,7 @@ class CholeskyDecomposition
} }
} }
} else { } else {
throw new PHPExcel_Calculation_Exception(JAMAError(ArgumentTypeException)); throw new PHPExcel_Calculation_Exception(JAMAError(ARGUMENT_TYPE_EXCEPTION));
} }
} // function __construct() } // function __construct()
@ -139,10 +139,10 @@ class CholeskyDecomposition
throw new PHPExcel_Calculation_Exception(JAMAError(MatrixSPDException)); throw new PHPExcel_Calculation_Exception(JAMAError(MatrixSPDException));
} }
} else { } else {
throw new PHPExcel_Calculation_Exception(JAMAError(MatrixDimensionException)); throw new PHPExcel_Calculation_Exception(JAMAError(MATRIX_DIMENSION_EXCEPTION));
} }
} else { } else {
throw new PHPExcel_Calculation_Exception(JAMAError(ArgumentTypeException)); throw new PHPExcel_Calculation_Exception(JAMAError(ARGUMENT_TYPE_EXCEPTION));
} }
} // function solve() } // function solve()
} }

View File

@ -20,8 +20,8 @@
*/ */
class PHPExcel_Shared_JAMA_LUDecomposition class PHPExcel_Shared_JAMA_LUDecomposition
{ {
const MatrixSingularException = "Can only perform operation on singular matrix."; const MATRIX_SINGULAR_EXCEPTION = "Can only perform operation on singular matrix.";
const MatrixSquareException = "Mismatched Row dimension"; const MATRIX_SQUARE_EXCEPTION = "Mismatched Row dimension";
/** /**
* Decomposition storage * Decomposition storage
@ -115,7 +115,7 @@ class PHPExcel_Shared_JAMA_LUDecomposition
} }
} }
} else { } else {
throw new PHPExcel_Calculation_Exception(PHPExcel_Shared_JAMA_Matrix::ArgumentTypeException); throw new PHPExcel_Calculation_Exception(PHPExcel_Shared_JAMA_Matrix::ARGUMENT_TYPE_EXCEPTION);
} }
} // function __construct() } // function __construct()
@ -208,7 +208,7 @@ class PHPExcel_Shared_JAMA_LUDecomposition
} }
return $d; return $d;
} else { } else {
throw new PHPExcel_Calculation_Exception(PHPExcel_Shared_JAMA_Matrix::MatrixDimensionException); throw new PHPExcel_Calculation_Exception(PHPExcel_Shared_JAMA_Matrix::MATRIX_DIMENSION_EXCEPTION);
} }
} // function det() } // function det()
@ -248,10 +248,10 @@ class PHPExcel_Shared_JAMA_LUDecomposition
} }
return $X; return $X;
} else { } else {
throw new PHPExcel_Calculation_Exception(self::MatrixSingularException); throw new PHPExcel_Calculation_Exception(self::MATRIX_SINGULAR_EXCEPTION);
} }
} else { } else {
throw new PHPExcel_Calculation_Exception(self::MatrixSquareException); throw new PHPExcel_Calculation_Exception(self::MATRIX_SQUARE_EXCEPTION);
} }
} // function solve() }
} }

View File

@ -26,11 +26,11 @@ if (!defined('PHPEXCEL_ROOT')) {
*/ */
class PHPExcel_Shared_JAMA_Matrix class PHPExcel_Shared_JAMA_Matrix
{ {
const PolymorphicArgumentException = "Invalid argument pattern for polymorphic function."; const POLYMORPHIC_ARGUMENT_EXCEPTION = "Invalid argument pattern for polymorphic function.";
const ArgumentTypeException = "Invalid argument type."; const ARGUMENT_TYPE_EXCEPTION = "Invalid argument type.";
const ArgumentBoundsException = "Invalid argument range."; const ARGUMENT_BOUNDS_EXCEPTION = "Invalid argument range.";
const MatrixDimensionException = "Matrix dimensions are not equal."; const MATRIX_DIMENSION_EXCEPTION = "Matrix dimensions are not equal.";
const ArrayLengthException = "Array length must be a multiple of m."; const ARRAY_LENGTH_EXCEPTION = "Array length must be a multiple of m.";
/** /**
* Matrix storage * Matrix storage
@ -101,15 +101,15 @@ class PHPExcel_Shared_JAMA_Matrix
} }
} }
} else { } else {
throw new PHPExcel_Calculation_Exception(self::ArrayLengthException); throw new PHPExcel_Calculation_Exception(self::ARRAY_LENGTH_EXCEPTION);
} }
break; break;
default: default:
throw new PHPExcel_Calculation_Exception(self::PolymorphicArgumentException); throw new PHPExcel_Calculation_Exception(self::POLYMORPHIC_ARGUMENT_EXCEPTION);
break; break;
} }
} else { } else {
throw new PHPExcel_Calculation_Exception(self::PolymorphicArgumentException); throw new PHPExcel_Calculation_Exception(self::POLYMORPHIC_ARGUMENT_EXCEPTION);
} }
} }
@ -179,12 +179,12 @@ class PHPExcel_Shared_JAMA_Matrix
if ($i0 >= 0) { if ($i0 >= 0) {
$m = $this->m - $i0; $m = $this->m - $i0;
} else { } else {
throw new PHPExcel_Calculation_Exception(self::ArgumentBoundsException); throw new PHPExcel_Calculation_Exception(self::ARGUMENT_BOUNDS_EXCEPTION);
} }
if ($j0 >= 0) { if ($j0 >= 0) {
$n = $this->n - $j0; $n = $this->n - $j0;
} else { } else {
throw new PHPExcel_Calculation_Exception(self::ArgumentBoundsException); throw new PHPExcel_Calculation_Exception(self::ARGUMENT_BOUNDS_EXCEPTION);
} }
$R = new PHPExcel_Shared_JAMA_Matrix($m, $n); $R = new PHPExcel_Shared_JAMA_Matrix($m, $n);
for ($i = $i0; $i < $this->m; ++$i) { for ($i = $i0; $i < $this->m; ++$i) {
@ -200,12 +200,12 @@ class PHPExcel_Shared_JAMA_Matrix
if (($iF > $i0) && ($this->m >= $iF) && ($i0 >= 0)) { if (($iF > $i0) && ($this->m >= $iF) && ($i0 >= 0)) {
$m = $iF - $i0; $m = $iF - $i0;
} else { } else {
throw new PHPExcel_Calculation_Exception(self::ArgumentBoundsException); throw new PHPExcel_Calculation_Exception(self::ARGUMENT_BOUNDS_EXCEPTION);
} }
if (($jF > $j0) && ($this->n >= $jF) && ($j0 >= 0)) { if (($jF > $j0) && ($this->n >= $jF) && ($j0 >= 0)) {
$n = $jF - $j0; $n = $jF - $j0;
} else { } else {
throw new PHPExcel_Calculation_Exception(self::ArgumentBoundsException); throw new PHPExcel_Calculation_Exception(self::ARGUMENT_BOUNDS_EXCEPTION);
} }
$R = new PHPExcel_Shared_JAMA_Matrix($m+1, $n+1); $R = new PHPExcel_Shared_JAMA_Matrix($m+1, $n+1);
for ($i = $i0; $i <= $iF; ++$i) { for ($i = $i0; $i <= $iF; ++$i) {
@ -221,12 +221,12 @@ class PHPExcel_Shared_JAMA_Matrix
if (count($RL) > 0) { if (count($RL) > 0) {
$m = count($RL); $m = count($RL);
} else { } else {
throw new PHPExcel_Calculation_Exception(self::ArgumentBoundsException); throw new PHPExcel_Calculation_Exception(self::ARGUMENT_BOUNDS_EXCEPTION);
} }
if (count($CL) > 0) { if (count($CL) > 0) {
$n = count($CL); $n = count($CL);
} else { } else {
throw new PHPExcel_Calculation_Exception(self::ArgumentBoundsException); throw new PHPExcel_Calculation_Exception(self::ARGUMENT_BOUNDS_EXCEPTION);
} }
$R = new PHPExcel_Shared_JAMA_Matrix($m, $n); $R = new PHPExcel_Shared_JAMA_Matrix($m, $n);
for ($i = 0; $i < $m; ++$i) { for ($i = 0; $i < $m; ++$i) {
@ -242,12 +242,12 @@ class PHPExcel_Shared_JAMA_Matrix
if (count($RL) > 0) { if (count($RL) > 0) {
$m = count($RL); $m = count($RL);
} else { } else {
throw new PHPExcel_Calculation_Exception(self::ArgumentBoundsException); throw new PHPExcel_Calculation_Exception(self::ARGUMENT_BOUNDS_EXCEPTION);
} }
if (count($CL) > 0) { if (count($CL) > 0) {
$n = count($CL); $n = count($CL);
} else { } else {
throw new PHPExcel_Calculation_Exception(self::ArgumentBoundsException); throw new PHPExcel_Calculation_Exception(self::ARGUMENT_BOUNDS_EXCEPTION);
} }
$R = new PHPExcel_Shared_JAMA_Matrix($m, $n); $R = new PHPExcel_Shared_JAMA_Matrix($m, $n);
for ($i = 0; $i < $m; ++$i) { for ($i = 0; $i < $m; ++$i) {
@ -263,12 +263,12 @@ class PHPExcel_Shared_JAMA_Matrix
if (($iF > $i0) && ($this->m >= $iF) && ($i0 >= 0)) { if (($iF > $i0) && ($this->m >= $iF) && ($i0 >= 0)) {
$m = $iF - $i0; $m = $iF - $i0;
} else { } else {
throw new PHPExcel_Calculation_Exception(self::ArgumentBoundsException); throw new PHPExcel_Calculation_Exception(self::ARGUMENT_BOUNDS_EXCEPTION);
} }
if (count($CL) > 0) { if (count($CL) > 0) {
$n = count($CL); $n = count($CL);
} else { } else {
throw new PHPExcel_Calculation_Exception(self::ArgumentBoundsException); throw new PHPExcel_Calculation_Exception(self::ARGUMENT_BOUNDS_EXCEPTION);
} }
$R = new PHPExcel_Shared_JAMA_Matrix($m, $n); $R = new PHPExcel_Shared_JAMA_Matrix($m, $n);
for ($i = $i0; $i < $iF; ++$i) { for ($i = $i0; $i < $iF; ++$i) {
@ -284,12 +284,12 @@ class PHPExcel_Shared_JAMA_Matrix
if (count($RL) > 0) { if (count($RL) > 0) {
$m = count($RL); $m = count($RL);
} else { } else {
throw new PHPExcel_Calculation_Exception(self::ArgumentBoundsException); throw new PHPExcel_Calculation_Exception(self::ARGUMENT_BOUNDS_EXCEPTION);
} }
if (($jF >= $j0) && ($this->n >= $jF) && ($j0 >= 0)) { if (($jF >= $j0) && ($this->n >= $jF) && ($j0 >= 0)) {
$n = $jF - $j0; $n = $jF - $j0;
} else { } else {
throw new PHPExcel_Calculation_Exception(self::ArgumentBoundsException); throw new PHPExcel_Calculation_Exception(self::ARGUMENT_BOUNDS_EXCEPTION);
} }
$R = new PHPExcel_Shared_JAMA_Matrix($m, $n+1); $R = new PHPExcel_Shared_JAMA_Matrix($m, $n+1);
for ($i = 0; $i < $m; ++$i) { for ($i = 0; $i < $m; ++$i) {
@ -300,11 +300,11 @@ class PHPExcel_Shared_JAMA_Matrix
return $R; return $R;
break; break;
default: default:
throw new PHPExcel_Calculation_Exception(self::PolymorphicArgumentException); throw new PHPExcel_Calculation_Exception(self::POLYMORPHIC_ARGUMENT_EXCEPTION);
break; break;
} }
} else { } else {
throw new PHPExcel_Calculation_Exception(self::PolymorphicArgumentException); throw new PHPExcel_Calculation_Exception(self::POLYMORPHIC_ARGUMENT_EXCEPTION);
} }
} }
@ -321,10 +321,10 @@ class PHPExcel_Shared_JAMA_Matrix
if (($this->m == $B->getRowDimension()) && ($this->n == $B->getColumnDimension())) { if (($this->m == $B->getRowDimension()) && ($this->n == $B->getColumnDimension())) {
return true; return true;
} else { } else {
throw new PHPExcel_Calculation_Exception(self::MatrixDimensionException); throw new PHPExcel_Calculation_Exception(self::MATRIX_DIMENSION_EXCEPTION);
} }
} else { } else {
throw new PHPExcel_Calculation_Exception(self::ArgumentTypeException); throw new PHPExcel_Calculation_Exception(self::ARGUMENT_TYPE_EXCEPTION);
} }
} // function checkMatrixDimensions() } // function checkMatrixDimensions()
@ -391,7 +391,7 @@ class PHPExcel_Shared_JAMA_Matrix
return $this->getMatrix($i0, 0, $i0 + 1, $this->n); return $this->getMatrix($i0, 0, $i0 + 1, $this->n);
} }
} else { } else {
throw new PHPExcel_Calculation_Exception(self::ArgumentTypeException); throw new PHPExcel_Calculation_Exception(self::ARGUMENT_TYPE_EXCEPTION);
} }
} }
@ -412,7 +412,7 @@ class PHPExcel_Shared_JAMA_Matrix
return $this->getMatrix(0, $j0, $this->m, $j0 + 1); return $this->getMatrix(0, $j0, $this->m, $j0 + 1);
} }
} else { } else {
throw new PHPExcel_Calculation_Exception(self::ArgumentTypeException); throw new PHPExcel_Calculation_Exception(self::ARGUMENT_TYPE_EXCEPTION);
} }
} }
@ -477,14 +477,14 @@ class PHPExcel_Shared_JAMA_Matrix
if ($args[0] instanceof PHPExcel_Shared_JAMA_Matrix) { if ($args[0] instanceof PHPExcel_Shared_JAMA_Matrix) {
$M = $args[0]; $M = $args[0];
} else { } else {
throw new PHPExcel_Calculation_Exception(self::ArgumentTypeException); throw new PHPExcel_Calculation_Exception(self::ARGUMENT_TYPE_EXCEPTION);
} }
break; break;
case 'array': case 'array':
$M = new PHPExcel_Shared_JAMA_Matrix($args[0]); $M = new PHPExcel_Shared_JAMA_Matrix($args[0]);
break; break;
default: default:
throw new PHPExcel_Calculation_Exception(self::PolymorphicArgumentException); throw new PHPExcel_Calculation_Exception(self::POLYMORPHIC_ARGUMENT_EXCEPTION);
break; break;
} }
$this->checkMatrixDimensions($M); $this->checkMatrixDimensions($M);
@ -495,7 +495,7 @@ class PHPExcel_Shared_JAMA_Matrix
} }
return $M; return $M;
} else { } else {
throw new PHPExcel_Calculation_Exception(self::PolymorphicArgumentException); throw new PHPExcel_Calculation_Exception(self::POLYMORPHIC_ARGUMENT_EXCEPTION);
} }
} }
@ -517,14 +517,14 @@ class PHPExcel_Shared_JAMA_Matrix
if ($args[0] instanceof PHPExcel_Shared_JAMA_Matrix) { if ($args[0] instanceof PHPExcel_Shared_JAMA_Matrix) {
$M = $args[0]; $M = $args[0];
} else { } else {
throw new PHPExcel_Calculation_Exception(self::ArgumentTypeException); throw new PHPExcel_Calculation_Exception(self::ARGUMENT_TYPE_EXCEPTION);
} }
break; break;
case 'array': case 'array':
$M = new PHPExcel_Shared_JAMA_Matrix($args[0]); $M = new PHPExcel_Shared_JAMA_Matrix($args[0]);
break; break;
default: default:
throw new PHPExcel_Calculation_Exception(self::PolymorphicArgumentException); throw new PHPExcel_Calculation_Exception(self::POLYMORPHIC_ARGUMENT_EXCEPTION);
break; break;
} }
$this->checkMatrixDimensions($M); $this->checkMatrixDimensions($M);
@ -549,7 +549,7 @@ class PHPExcel_Shared_JAMA_Matrix
} }
return $this; return $this;
} else { } else {
throw new PHPExcel_Calculation_Exception(self::PolymorphicArgumentException); throw new PHPExcel_Calculation_Exception(self::POLYMORPHIC_ARGUMENT_EXCEPTION);
} }
} }
@ -571,14 +571,14 @@ class PHPExcel_Shared_JAMA_Matrix
if ($args[0] instanceof PHPExcel_Shared_JAMA_Matrix) { if ($args[0] instanceof PHPExcel_Shared_JAMA_Matrix) {
$M = $args[0]; $M = $args[0];
} else { } else {
throw new PHPExcel_Calculation_Exception(self::ArgumentTypeException); throw new PHPExcel_Calculation_Exception(self::ARGUMENT_TYPE_EXCEPTION);
} }
break; break;
case 'array': case 'array':
$M = new PHPExcel_Shared_JAMA_Matrix($args[0]); $M = new PHPExcel_Shared_JAMA_Matrix($args[0]);
break; break;
default: default:
throw new PHPExcel_Calculation_Exception(self::PolymorphicArgumentException); throw new PHPExcel_Calculation_Exception(self::POLYMORPHIC_ARGUMENT_EXCEPTION);
break; break;
} }
$this->checkMatrixDimensions($M); $this->checkMatrixDimensions($M);
@ -589,7 +589,7 @@ class PHPExcel_Shared_JAMA_Matrix
} }
return $M; return $M;
} else { } else {
throw new PHPExcel_Calculation_Exception(self::PolymorphicArgumentException); throw new PHPExcel_Calculation_Exception(self::POLYMORPHIC_ARGUMENT_EXCEPTION);
} }
} }
@ -611,14 +611,14 @@ class PHPExcel_Shared_JAMA_Matrix
if ($args[0] instanceof PHPExcel_Shared_JAMA_Matrix) { if ($args[0] instanceof PHPExcel_Shared_JAMA_Matrix) {
$M = $args[0]; $M = $args[0];
} else { } else {
throw new PHPExcel_Calculation_Exception(self::ArgumentTypeException); throw new PHPExcel_Calculation_Exception(self::ARGUMENT_TYPE_EXCEPTION);
} }
break; break;
case 'array': case 'array':
$M = new PHPExcel_Shared_JAMA_Matrix($args[0]); $M = new PHPExcel_Shared_JAMA_Matrix($args[0]);
break; break;
default: default:
throw new PHPExcel_Calculation_Exception(self::PolymorphicArgumentException); throw new PHPExcel_Calculation_Exception(self::POLYMORPHIC_ARGUMENT_EXCEPTION);
break; break;
} }
$this->checkMatrixDimensions($M); $this->checkMatrixDimensions($M);
@ -643,7 +643,7 @@ class PHPExcel_Shared_JAMA_Matrix
} }
return $this; return $this;
} else { } else {
throw new PHPExcel_Calculation_Exception(self::PolymorphicArgumentException); throw new PHPExcel_Calculation_Exception(self::POLYMORPHIC_ARGUMENT_EXCEPTION);
} }
} }
@ -666,14 +666,14 @@ class PHPExcel_Shared_JAMA_Matrix
if ($args[0] instanceof PHPExcel_Shared_JAMA_Matrix) { if ($args[0] instanceof PHPExcel_Shared_JAMA_Matrix) {
$M = $args[0]; $M = $args[0];
} else { } else {
throw new PHPExcel_Calculation_Exception(self::ArgumentTypeException); throw new PHPExcel_Calculation_Exception(self::ARGUMENT_TYPE_EXCEPTION);
} }
break; break;
case 'array': case 'array':
$M = new PHPExcel_Shared_JAMA_Matrix($args[0]); $M = new PHPExcel_Shared_JAMA_Matrix($args[0]);
break; break;
default: default:
throw new PHPExcel_Calculation_Exception(self::PolymorphicArgumentException); throw new PHPExcel_Calculation_Exception(self::POLYMORPHIC_ARGUMENT_EXCEPTION);
break; break;
} }
$this->checkMatrixDimensions($M); $this->checkMatrixDimensions($M);
@ -684,7 +684,7 @@ class PHPExcel_Shared_JAMA_Matrix
} }
return $M; return $M;
} else { } else {
throw new PHPExcel_Calculation_Exception(self::PolymorphicArgumentException); throw new PHPExcel_Calculation_Exception(self::POLYMORPHIC_ARGUMENT_EXCEPTION);
} }
} }
@ -707,14 +707,14 @@ class PHPExcel_Shared_JAMA_Matrix
if ($args[0] instanceof PHPExcel_Shared_JAMA_Matrix) { if ($args[0] instanceof PHPExcel_Shared_JAMA_Matrix) {
$M = $args[0]; $M = $args[0];
} else { } else {
throw new PHPExcel_Calculation_Exception(self::ArgumentTypeException); throw new PHPExcel_Calculation_Exception(self::ARGUMENT_TYPE_EXCEPTION);
} }
break; break;
case 'array': case 'array':
$M = new PHPExcel_Shared_JAMA_Matrix($args[0]); $M = new PHPExcel_Shared_JAMA_Matrix($args[0]);
break; break;
default: default:
throw new PHPExcel_Calculation_Exception(self::PolymorphicArgumentException); throw new PHPExcel_Calculation_Exception(self::POLYMORPHIC_ARGUMENT_EXCEPTION);
break; break;
} }
$this->checkMatrixDimensions($M); $this->checkMatrixDimensions($M);
@ -739,7 +739,7 @@ class PHPExcel_Shared_JAMA_Matrix
} }
return $this; return $this;
} else { } else {
throw new PHPExcel_Calculation_Exception(self::PolymorphicArgumentException); throw new PHPExcel_Calculation_Exception(self::POLYMORPHIC_ARGUMENT_EXCEPTION);
} }
} }
@ -762,14 +762,14 @@ class PHPExcel_Shared_JAMA_Matrix
if ($args[0] instanceof PHPExcel_Shared_JAMA_Matrix) { if ($args[0] instanceof PHPExcel_Shared_JAMA_Matrix) {
$M = $args[0]; $M = $args[0];
} else { } else {
throw new PHPExcel_Calculation_Exception(self::ArgumentTypeException); throw new PHPExcel_Calculation_Exception(self::ARGUMENT_TYPE_EXCEPTION);
} }
break; break;
case 'array': case 'array':
$M = new PHPExcel_Shared_JAMA_Matrix($args[0]); $M = new PHPExcel_Shared_JAMA_Matrix($args[0]);
break; break;
default: default:
throw new PHPExcel_Calculation_Exception(self::PolymorphicArgumentException); throw new PHPExcel_Calculation_Exception(self::POLYMORPHIC_ARGUMENT_EXCEPTION);
break; break;
} }
$this->checkMatrixDimensions($M); $this->checkMatrixDimensions($M);
@ -799,7 +799,7 @@ class PHPExcel_Shared_JAMA_Matrix
} }
return $M; return $M;
} else { } else {
throw new PHPExcel_Calculation_Exception(self::PolymorphicArgumentException); throw new PHPExcel_Calculation_Exception(self::POLYMORPHIC_ARGUMENT_EXCEPTION);
} }
} }
@ -823,14 +823,14 @@ class PHPExcel_Shared_JAMA_Matrix
if ($args[0] instanceof PHPExcel_Shared_JAMA_Matrix) { if ($args[0] instanceof PHPExcel_Shared_JAMA_Matrix) {
$M = $args[0]; $M = $args[0];
} else { } else {
throw new PHPExcel_Calculation_Exception(self::ArgumentTypeException); throw new PHPExcel_Calculation_Exception(self::ARGUMENT_TYPE_EXCEPTION);
} }
break; break;
case 'array': case 'array':
$M = new PHPExcel_Shared_JAMA_Matrix($args[0]); $M = new PHPExcel_Shared_JAMA_Matrix($args[0]);
break; break;
default: default:
throw new PHPExcel_Calculation_Exception(self::PolymorphicArgumentException); throw new PHPExcel_Calculation_Exception(self::POLYMORPHIC_ARGUMENT_EXCEPTION);
break; break;
} }
$this->checkMatrixDimensions($M); $this->checkMatrixDimensions($M);
@ -841,7 +841,7 @@ class PHPExcel_Shared_JAMA_Matrix
} }
return $M; return $M;
} else { } else {
throw new PHPExcel_Calculation_Exception(self::PolymorphicArgumentException); throw new PHPExcel_Calculation_Exception(self::POLYMORPHIC_ARGUMENT_EXCEPTION);
} }
} }
@ -865,14 +865,14 @@ class PHPExcel_Shared_JAMA_Matrix
if ($args[0] instanceof PHPExcel_Shared_JAMA_Matrix) { if ($args[0] instanceof PHPExcel_Shared_JAMA_Matrix) {
$M = $args[0]; $M = $args[0];
} else { } else {
throw new PHPExcel_Calculation_Exception(self::ArgumentTypeException); throw new PHPExcel_Calculation_Exception(self::ARGUMENT_TYPE_EXCEPTION);
} }
break; break;
case 'array': case 'array':
$M = new PHPExcel_Shared_JAMA_Matrix($args[0]); $M = new PHPExcel_Shared_JAMA_Matrix($args[0]);
break; break;
default: default:
throw new PHPExcel_Calculation_Exception(self::PolymorphicArgumentException); throw new PHPExcel_Calculation_Exception(self::POLYMORPHIC_ARGUMENT_EXCEPTION);
break; break;
} }
$this->checkMatrixDimensions($M); $this->checkMatrixDimensions($M);
@ -883,7 +883,7 @@ class PHPExcel_Shared_JAMA_Matrix
} }
return $M; return $M;
} else { } else {
throw new PHPExcel_Calculation_Exception(self::PolymorphicArgumentException); throw new PHPExcel_Calculation_Exception(self::POLYMORPHIC_ARGUMENT_EXCEPTION);
} }
} }
@ -907,14 +907,14 @@ class PHPExcel_Shared_JAMA_Matrix
if ($args[0] instanceof PHPExcel_Shared_JAMA_Matrix) { if ($args[0] instanceof PHPExcel_Shared_JAMA_Matrix) {
$M = $args[0]; $M = $args[0];
} else { } else {
throw new PHPExcel_Calculation_Exception(self::ArgumentTypeException); throw new PHPExcel_Calculation_Exception(self::ARGUMENT_TYPE_EXCEPTION);
} }
break; break;
case 'array': case 'array':
$M = new PHPExcel_Shared_JAMA_Matrix($args[0]); $M = new PHPExcel_Shared_JAMA_Matrix($args[0]);
break; break;
default: default:
throw new PHPExcel_Calculation_Exception(self::PolymorphicArgumentException); throw new PHPExcel_Calculation_Exception(self::POLYMORPHIC_ARGUMENT_EXCEPTION);
break; break;
} }
$this->checkMatrixDimensions($M); $this->checkMatrixDimensions($M);
@ -925,7 +925,7 @@ class PHPExcel_Shared_JAMA_Matrix
} }
return $M; return $M;
} else { } else {
throw new PHPExcel_Calculation_Exception(self::PolymorphicArgumentException); throw new PHPExcel_Calculation_Exception(self::POLYMORPHIC_ARGUMENT_EXCEPTION);
} }
} }
@ -948,7 +948,7 @@ class PHPExcel_Shared_JAMA_Matrix
if ($args[0] instanceof PHPExcel_Shared_JAMA_Matrix) { if ($args[0] instanceof PHPExcel_Shared_JAMA_Matrix) {
$B = $args[0]; $B = $args[0];
} else { } else {
throw new PHPExcel_Calculation_Exception(self::ArgumentTypeException); throw new PHPExcel_Calculation_Exception(self::ARGUMENT_TYPE_EXCEPTION);
} }
if ($this->n == $B->m) { if ($this->n == $B->m) {
$C = new PHPExcel_Shared_JAMA_Matrix($this->m, $B->n); $C = new PHPExcel_Shared_JAMA_Matrix($this->m, $B->n);
@ -1017,11 +1017,11 @@ class PHPExcel_Shared_JAMA_Matrix
return $C; return $C;
break; break;
default: default:
throw new PHPExcel_Calculation_Exception(self::PolymorphicArgumentException); throw new PHPExcel_Calculation_Exception(self::POLYMORPHIC_ARGUMENT_EXCEPTION);
break; break;
} }
} else { } else {
throw new PHPExcel_Calculation_Exception(self::PolymorphicArgumentException); throw new PHPExcel_Calculation_Exception(self::POLYMORPHIC_ARGUMENT_EXCEPTION);
} }
} }
@ -1043,14 +1043,14 @@ class PHPExcel_Shared_JAMA_Matrix
if ($args[0] instanceof PHPExcel_Shared_JAMA_Matrix) { if ($args[0] instanceof PHPExcel_Shared_JAMA_Matrix) {
$M = $args[0]; $M = $args[0];
} else { } else {
throw new PHPExcel_Calculation_Exception(self::ArgumentTypeException); throw new PHPExcel_Calculation_Exception(self::ARGUMENT_TYPE_EXCEPTION);
} }
break; break;
case 'array': case 'array':
$M = new PHPExcel_Shared_JAMA_Matrix($args[0]); $M = new PHPExcel_Shared_JAMA_Matrix($args[0]);
break; break;
default: default:
throw new PHPExcel_Calculation_Exception(self::PolymorphicArgumentException); throw new PHPExcel_Calculation_Exception(self::POLYMORPHIC_ARGUMENT_EXCEPTION);
break; break;
} }
$this->checkMatrixDimensions($M); $this->checkMatrixDimensions($M);
@ -1075,7 +1075,7 @@ class PHPExcel_Shared_JAMA_Matrix
} }
return $this; return $this;
} else { } else {
throw new PHPExcel_Calculation_Exception(self::PolymorphicArgumentException); throw new PHPExcel_Calculation_Exception(self::POLYMORPHIC_ARGUMENT_EXCEPTION);
} }
} }
@ -1097,13 +1097,13 @@ class PHPExcel_Shared_JAMA_Matrix
if ($args[0] instanceof PHPExcel_Shared_JAMA_Matrix) { if ($args[0] instanceof PHPExcel_Shared_JAMA_Matrix) {
$M = $args[0]; $M = $args[0];
} else { } else {
throw new PHPExcel_Calculation_Exception(self::ArgumentTypeException); throw new PHPExcel_Calculation_Exception(self::ARGUMENT_TYPE_EXCEPTION);
} }
case 'array': case 'array':
$M = new PHPExcel_Shared_JAMA_Matrix($args[0]); $M = new PHPExcel_Shared_JAMA_Matrix($args[0]);
break; break;
default: default:
throw new PHPExcel_Calculation_Exception(self::PolymorphicArgumentException); throw new PHPExcel_Calculation_Exception(self::POLYMORPHIC_ARGUMENT_EXCEPTION);
break; break;
} }
$this->checkMatrixDimensions($M); $this->checkMatrixDimensions($M);
@ -1114,7 +1114,7 @@ class PHPExcel_Shared_JAMA_Matrix
} }
return $this; return $this;
} else { } else {
throw new PHPExcel_Calculation_Exception(self::PolymorphicArgumentException); throw new PHPExcel_Calculation_Exception(self::POLYMORPHIC_ARGUMENT_EXCEPTION);
} }
} }

View File

@ -18,7 +18,7 @@
*/ */
class PHPExcel_Shared_JAMA_QRDecomposition class PHPExcel_Shared_JAMA_QRDecomposition
{ {
const MatrixRankException = "Can only perform operation on full-rank matrix."; const MATRIX_RANK_EXCEPTION = "Can only perform operation on full-rank matrix.";
/** /**
* Array for internal storage of decomposition. * Array for internal storage of decomposition.
@ -89,7 +89,7 @@ class PHPExcel_Shared_JAMA_QRDecomposition
$this->Rdiag[$k] = -$nrm; $this->Rdiag[$k] = -$nrm;
} }
} else { } else {
throw new PHPExcel_Calculation_Exception(PHPExcel_Shared_JAMA_Matrix::ArgumentTypeException); throw new PHPExcel_Calculation_Exception(PHPExcel_Shared_JAMA_Matrix::ARGUMENT_TYPE_EXCEPTION);
} }
} // function __construct() } // function __construct()
@ -226,10 +226,10 @@ class PHPExcel_Shared_JAMA_QRDecomposition
$X = new PHPExcel_Shared_JAMA_Matrix($X); $X = new PHPExcel_Shared_JAMA_Matrix($X);
return ($X->getMatrix(0, $this->n-1, 0, $nx)); return ($X->getMatrix(0, $this->n-1, 0, $nx));
} else { } else {
throw new PHPExcel_Calculation_Exception(self::MatrixRankException); throw new PHPExcel_Calculation_Exception(self::MATRIX_RANK_EXCEPTION);
} }
} else { } else {
throw new PHPExcel_Calculation_Exception(PHPExcel_Shared_JAMA_Matrix::MatrixDimensionException); throw new PHPExcel_Calculation_Exception(PHPExcel_Shared_JAMA_Matrix::MATRIX_DIMENSION_EXCEPTION);
} }
} // function solve() }
} }

View File

@ -21,47 +21,47 @@ I've used Babelfish and a little poor knowledge of Romance/Germanic languages fo
Feel free to correct anything that looks amiss to you. Feel free to correct anything that looks amiss to you.
*/ */
define('PolymorphicArgumentException', -1); define('POLYMORPHIC_ARGUMENT_EXCEPTION', -1);
$error['EN'][PolymorphicArgumentException] = "Invalid argument pattern for polymorphic function."; $error['EN'][POLYMORPHIC_ARGUMENT_EXCEPTION] = "Invalid argument pattern for polymorphic function.";
$error['FR'][PolymorphicArgumentException] = "Modèle inadmissible d'argument pour la fonction polymorphe.". $error['FR'][POLYMORPHIC_ARGUMENT_EXCEPTION] = "Modèle inadmissible d'argument pour la fonction polymorphe.".
$error['DE'][PolymorphicArgumentException] = "Unzulässiges Argumentmuster für polymorphe Funktion."; $error['DE'][POLYMORPHIC_ARGUMENT_EXCEPTION] = "Unzulässiges Argumentmuster für polymorphe Funktion.";
define('ArgumentTypeException', -2); define('ARGUMENT_TYPE_EXCEPTION', -2);
$error['EN'][ArgumentTypeException] = "Invalid argument type."; $error['EN'][ARGUMENT_TYPE_EXCEPTION] = "Invalid argument type.";
$error['FR'][ArgumentTypeException] = "Type inadmissible d'argument."; $error['FR'][ARGUMENT_TYPE_EXCEPTION] = "Type inadmissible d'argument.";
$error['DE'][ArgumentTypeException] = "Unzulässige Argumentart."; $error['DE'][ARGUMENT_TYPE_EXCEPTION] = "Unzulässige Argumentart.";
define('ArgumentBoundsException', -3); define('ARGUMENT_BOUNDS_EXCEPTION', -3);
$error['EN'][ArgumentBoundsException] = "Invalid argument range."; $error['EN'][ARGUMENT_BOUNDS_EXCEPTION] = "Invalid argument range.";
$error['FR'][ArgumentBoundsException] = "Gamme inadmissible d'argument."; $error['FR'][ARGUMENT_BOUNDS_EXCEPTION] = "Gamme inadmissible d'argument.";
$error['DE'][ArgumentBoundsException] = "Unzulässige Argumentstrecke."; $error['DE'][ARGUMENT_BOUNDS_EXCEPTION] = "Unzulässige Argumentstrecke.";
define('MatrixDimensionException', -4); define('MATRIX_DIMENSION_EXCEPTION', -4);
$error['EN'][MatrixDimensionException] = "Matrix dimensions are not equal."; $error['EN'][MATRIX_DIMENSION_EXCEPTION] = "Matrix dimensions are not equal.";
$error['FR'][MatrixDimensionException] = "Les dimensions de Matrix ne sont pas égales."; $error['FR'][MATRIX_DIMENSION_EXCEPTION] = "Les dimensions de Matrix ne sont pas égales.";
$error['DE'][MatrixDimensionException] = "Matrixmaße sind nicht gleich."; $error['DE'][MATRIX_DIMENSION_EXCEPTION] = "Matrixmaße sind nicht gleich.";
define('PrecisionLossException', -5); define('PRECISION_LOSS_EXCEPTION', -5);
$error['EN'][PrecisionLossException] = "Significant precision loss detected."; $error['EN'][PRECISION_LOSS_EXCEPTION] = "Significant precision loss detected.";
$error['FR'][PrecisionLossException] = "Perte significative de précision détectée."; $error['FR'][PRECISION_LOSS_EXCEPTION] = "Perte significative de précision détectée.";
$error['DE'][PrecisionLossException] = "Bedeutender Präzision Verlust ermittelte."; $error['DE'][PRECISION_LOSS_EXCEPTION] = "Bedeutender Präzision Verlust ermittelte.";
define('MatrixSPDException', -6); define('MATRIX_SPD_EXCEPTION', -6);
$error['EN'][MatrixSPDException] = "Can only perform operation on symmetric positive definite matrix."; $error['EN'][MATRIX_SPD_EXCEPTION] = "Can only perform operation on symmetric positive definite matrix.";
$error['FR'][MatrixSPDException] = "Perte significative de précision détectée."; $error['FR'][MATRIX_SPD_EXCEPTION] = "Perte significative de précision détectée.";
$error['DE'][MatrixSPDException] = "Bedeutender Präzision Verlust ermittelte."; $error['DE'][MATRIX_SPD_EXCEPTION] = "Bedeutender Präzision Verlust ermittelte.";
define('MatrixSingularException', -7); define('MATRIX_SINGULAR_EXCEPTION', -7);
$error['EN'][MatrixSingularException] = "Can only perform operation on singular matrix."; $error['EN'][MATRIX_SINGULAR_EXCEPTION] = "Can only perform operation on singular matrix.";
define('MatrixRankException', -8); define('MATRIX_RANK_EXCEPTION', -8);
$error['EN'][MatrixRankException] = "Can only perform operation on full-rank matrix."; $error['EN'][MATRIX_RANK_EXCEPTION] = "Can only perform operation on full-rank matrix.";
define('ArrayLengthException', -9); define('ARRAY_LENGTH_EXCEPTION', -9);
$error['EN'][ArrayLengthException] = "Array length must be a multiple of m."; $error['EN'][ARRAY_LENGTH_EXCEPTION] = "Array length must be a multiple of m.";
define('RowLengthException', -10); define('ROW_LENGTH_EXCEPTION', -10);
$error['EN'][RowLengthException] = "All rows must have the same length."; $error['EN'][ROW_LENGTH_EXCEPTION] = "All rows must have the same length.";
/** /**
* Custom error handler * Custom error handler

View File

@ -36,7 +36,7 @@ function hypot() {
if (is_numeric($d)) { if (is_numeric($d)) {
$s += pow($d, 2); $s += pow($d, 2);
} else { } else {
throw new PHPExcel_Calculation_Exception(JAMAError(ArgumentTypeException)); throw new PHPExcel_Calculation_Exception(JAMAError(ARGUMENT_TYPE_EXCEPTION));
} }
} }
return sqrt($s); return sqrt($s);