@@ -35,7 +35,7 @@ discard block |
||
35 | 35 | * |
36 | 36 | * @var string |
37 | 37 | **/ |
38 | - protected $bestFitType = 'logarithmic'; |
|
38 | + protected $bestFitType = 'logarithmic'; |
|
39 | 39 | |
40 | 40 | /** |
41 | 41 | * Return the Y-Value for a specified value of X |
@@ -70,7 +70,7 @@ discard block |
||
70 | 70 | $slope = $this->getSlope($dp); |
71 | 71 | $intersect = $this->getIntersect($dp); |
72 | 72 | |
73 | - return 'Y = '.$intersect.' + '.$slope.' * log(X)'; |
|
73 | + return 'Y = ' . $intersect . ' + ' . $slope . ' * log(X)'; |
|
74 | 74 | } |
75 | 75 | |
76 | 76 | /** |
@@ -35,7 +35,7 @@ |
||
35 | 35 | * |
36 | 36 | * @var string |
37 | 37 | **/ |
38 | - protected $bestFitType = 'linear'; |
|
38 | + protected $bestFitType = 'linear'; |
|
39 | 39 | |
40 | 40 | /** |
41 | 41 | * Return the Y-Value for a specified value of X |
@@ -169,7 +169,7 @@ discard block |
||
169 | 169 | $A[$i][$j] = pow($xValues[$i], $j); |
170 | 170 | } |
171 | 171 | } |
172 | - for ($i=0; $i < $this->valueCount; ++$i) { |
|
172 | + for ($i = 0; $i < $this->valueCount; ++$i) { |
|
173 | 173 | $B[$i] = array($yValues[$i]); |
174 | 174 | } |
175 | 175 | $matrixA = new Matrix($A); |
@@ -207,7 +207,7 @@ discard block |
||
207 | 207 | { |
208 | 208 | if (parent::__construct($yValues, $xValues) !== false) { |
209 | 209 | if ($order < $this->valueCount) { |
210 | - $this->bestFitType .= '_'.$order; |
|
210 | + $this->bestFitType .= '_' . $order; |
|
211 | 211 | $this->order = $order; |
212 | 212 | $this->polynomialRegression($order, $yValues, $xValues, $const); |
213 | 213 | if (($this->getGoodnessOfFit() < 0.0) || ($this->getGoodnessOfFit() > 1.0)) { |
@@ -42,14 +42,14 @@ |
||
42 | 42 | public static function hashPassword($pPassword = '') |
43 | 43 | { |
44 | 44 | $password = 0x0000; |
45 | - $charPos = 1; // char position |
|
45 | + $charPos = 1; // char position |
|
46 | 46 | |
47 | 47 | // split the plain text password in its component characters |
48 | 48 | $chars = preg_split('//', $pPassword, -1, PREG_SPLIT_NO_EMPTY); |
49 | 49 | foreach ($chars as $char) { |
50 | - $value = ord($char) << $charPos++; // shifted ASCII value |
|
51 | - $rotated_bits = $value >> 15; // rotated bits beyond bit 15 |
|
52 | - $value &= 0x7fff; // first 15 bits |
|
50 | + $value = ord($char) << $charPos++; // shifted ASCII value |
|
51 | + $rotated_bits = $value >> 15; // rotated bits beyond bit 15 |
|
52 | + $value &= 0x7fff; // first 15 bits |
|
53 | 53 | $password ^= ($value | $rotated_bits); |
54 | 54 | } |
55 | 55 |
@@ -32,7 +32,7 @@ discard block |
||
32 | 32 | /** Constants */ |
33 | 33 | /** Regular Expressions */ |
34 | 34 | // Fraction |
35 | - const STRING_REGEXP_FRACTION = '(-?)(\d+)\s+(\d+\/\d+)'; |
|
35 | + const STRING_REGEXP_FRACTION = '(-?)(\d+)\s+(\d+\/\d+)'; |
|
36 | 36 | |
37 | 37 | |
38 | 38 | /** |
@@ -535,12 +535,12 @@ discard block |
||
535 | 535 | } |
536 | 536 | $len = strlen($str); |
537 | 537 | $newstr = ''; |
538 | - for ($i=0; $i<$len; $i+=2) { |
|
538 | + for ($i = 0; $i < $len; $i += 2) { |
|
539 | 539 | if ($bom_be) { |
540 | - $val = ord($str{$i}) << 4; |
|
541 | - $val += ord($str{$i+1}); |
|
540 | + $val = ord($str{$i}) << 4; |
|
541 | + $val += ord($str{$i + 1}); |
|
542 | 542 | } else { |
543 | - $val = ord($str{$i+1}) << 4; |
|
543 | + $val = ord($str{$i + 1}) << 4; |
|
544 | 544 | $val += ord($str{$i}); |
545 | 545 | } |
546 | 546 | $newstr .= ($val == 0x228) ? "\n" : chr($val); |
@@ -678,9 +678,9 @@ discard block |
||
678 | 678 | */ |
679 | 679 | public static function convertToNumberIfFraction(&$operand) |
680 | 680 | { |
681 | - if (preg_match('/^'.self::STRING_REGEXP_FRACTION.'$/i', $operand, $match)) { |
|
681 | + if (preg_match('/^' . self::STRING_REGEXP_FRACTION . '$/i', $operand, $match)) { |
|
682 | 682 | $sign = ($match[1] == '-') ? '-' : '+'; |
683 | - $fractionFormula = '='.$sign.$match[2].$sign.$match[3]; |
|
683 | + $fractionFormula = '=' . $sign . $match[2] . $sign . $match[3]; |
|
684 | 684 | $operand = \PHPExcel\Calculation::getInstance()->_calculateFormulaValue($fractionFormula); |
685 | 685 | return true; |
686 | 686 | } |
@@ -458,22 +458,22 @@ |
||
458 | 458 | // Sort array |
459 | 459 | $images = array(); |
460 | 460 | if (isset($this->headerFooterImages[self::IMAGE_HEADER_LEFT])) { |
461 | - $images[self::IMAGE_HEADER_LEFT] = $this->headerFooterImages[self::IMAGE_HEADER_LEFT]; |
|
461 | + $images[self::IMAGE_HEADER_LEFT] = $this->headerFooterImages[self::IMAGE_HEADER_LEFT]; |
|
462 | 462 | } |
463 | 463 | if (isset($this->headerFooterImages[self::IMAGE_HEADER_CENTER])) { |
464 | - $images[self::IMAGE_HEADER_CENTER] = $this->headerFooterImages[self::IMAGE_HEADER_CENTER]; |
|
464 | + $images[self::IMAGE_HEADER_CENTER] = $this->headerFooterImages[self::IMAGE_HEADER_CENTER]; |
|
465 | 465 | } |
466 | 466 | if (isset($this->headerFooterImages[self::IMAGE_HEADER_RIGHT])) { |
467 | - $images[self::IMAGE_HEADER_RIGHT] = $this->headerFooterImages[self::IMAGE_HEADER_RIGHT]; |
|
467 | + $images[self::IMAGE_HEADER_RIGHT] = $this->headerFooterImages[self::IMAGE_HEADER_RIGHT]; |
|
468 | 468 | } |
469 | 469 | if (isset($this->headerFooterImages[self::IMAGE_FOOTER_LEFT])) { |
470 | - $images[self::IMAGE_FOOTER_LEFT] = $this->headerFooterImages[self::IMAGE_FOOTER_LEFT]; |
|
470 | + $images[self::IMAGE_FOOTER_LEFT] = $this->headerFooterImages[self::IMAGE_FOOTER_LEFT]; |
|
471 | 471 | } |
472 | 472 | if (isset($this->headerFooterImages[self::IMAGE_FOOTER_CENTER])) { |
473 | - $images[self::IMAGE_FOOTER_CENTER] = $this->headerFooterImages[self::IMAGE_FOOTER_CENTER]; |
|
473 | + $images[self::IMAGE_FOOTER_CENTER] = $this->headerFooterImages[self::IMAGE_FOOTER_CENTER]; |
|
474 | 474 | } |
475 | 475 | if (isset($this->headerFooterImages[self::IMAGE_FOOTER_RIGHT])) { |
476 | - $images[self::IMAGE_FOOTER_RIGHT] = $this->headerFooterImages[self::IMAGE_FOOTER_RIGHT]; |
|
476 | + $images[self::IMAGE_FOOTER_RIGHT] = $this->headerFooterImages[self::IMAGE_FOOTER_RIGHT]; |
|
477 | 477 | } |
478 | 478 | $this->headerFooterImages = $images; |
479 | 479 |
@@ -241,8 +241,8 @@ |
||
241 | 241 | $this->height = ceil($xratio * $this->height); |
242 | 242 | $this->width = $width; |
243 | 243 | } else { |
244 | - $this->width = ceil($yratio * $this->width); |
|
245 | - $this->height = $height; |
|
244 | + $this->width = ceil($yratio * $this->width); |
|
245 | + $this->height = $height; |
|
246 | 246 | } |
247 | 247 | } |
248 | 248 | return $this; |
@@ -78,7 +78,7 @@ |
||
78 | 78 | $this->imageResource = null; |
79 | 79 | $this->renderingFunction = self::RENDERING_DEFAULT; |
80 | 80 | $this->mimeType = self::MIMETYPE_DEFAULT; |
81 | - $this->uniqueName = md5(rand(0, 9999). time() . rand(0, 9999)); |
|
81 | + $this->uniqueName = md5(rand(0, 9999) . time() . rand(0, 9999)); |
|
82 | 82 | |
83 | 83 | // Initialize parent |
84 | 84 | parent::__construct(); |
@@ -52,7 +52,7 @@ |
||
52 | 52 | public function __construct(\PHPExcel\Worksheet $parent = null, $columnIndex = 'A') |
53 | 53 | { |
54 | 54 | // Set parent and column index |
55 | - $this->parent = $parent; |
|
55 | + $this->parent = $parent; |
|
56 | 56 | $this->columnIndex = $columnIndex; |
57 | 57 | } |
58 | 58 |