@@ -67,7 +67,7 @@ discard block |
||
| 67 | 67 | { |
| 68 | 68 | for ($i = 0; $i <= 31; ++$i) { |
| 69 | 69 | if ($i != 9 && $i != 10 && $i != 13) { |
| 70 | - $find = '_x' . sprintf('%04s', strtoupper(dechex($i))) . '_'; |
|
| 70 | + $find = '_x'.sprintf('%04s', strtoupper(dechex($i))).'_'; |
|
| 71 | 71 | $replace = chr($i); |
| 72 | 72 | self::$controlCharacters[$find] = $replace; |
| 73 | 73 | } |
@@ -265,7 +265,7 @@ discard block |
||
| 265 | 265 | } |
| 266 | 266 | |
| 267 | 267 | // Deactivate iconv default options if they fail (as seen on IMB i) |
| 268 | - if (self::$isIconvEnabled && !@iconv('UTF-8', 'UTF-16LE' . self::$iconvOptions, 'x')) { |
|
| 268 | + if (self::$isIconvEnabled && !@iconv('UTF-8', 'UTF-16LE'.self::$iconvOptions, 'x')) { |
|
| 269 | 269 | self::$iconvOptions = ''; |
| 270 | 270 | } |
| 271 | 271 | |
@@ -430,7 +430,7 @@ discard block |
||
| 430 | 430 | // characters |
| 431 | 431 | $chars = self::convertEncoding($value, 'UTF-16LE', 'UTF-8'); |
| 432 | 432 | |
| 433 | - return pack('vC', $ln, 0x0001) . $chars; |
|
| 433 | + return pack('vC', $ln, 0x0001).$chars; |
|
| 434 | 434 | } |
| 435 | 435 | |
| 436 | 436 | /** |
@@ -445,7 +445,7 @@ discard block |
||
| 445 | 445 | public static function convertEncoding($value, $to, $from) |
| 446 | 446 | { |
| 447 | 447 | if (self::getIsIconvEnabled()) { |
| 448 | - $result = iconv($from, $to . self::$iconvOptions, $value); |
|
| 448 | + $result = iconv($from, $to.self::$iconvOptions, $value); |
|
| 449 | 449 | if (false !== $result) { |
| 450 | 450 | return $result; |
| 451 | 451 | } |
@@ -562,9 +562,9 @@ discard block |
||
| 562 | 562 | */ |
| 563 | 563 | public static function convertToNumberIfFraction(&$operand) |
| 564 | 564 | { |
| 565 | - if (preg_match('/^' . self::STRING_REGEXP_FRACTION . '$/i', $operand, $match)) { |
|
| 565 | + if (preg_match('/^'.self::STRING_REGEXP_FRACTION.'$/i', $operand, $match)) { |
|
| 566 | 566 | $sign = ($match[1] == '-') ? '-' : '+'; |
| 567 | - $fractionFormula = '=' . $sign . $match[2] . $sign . $match[3]; |
|
| 567 | + $fractionFormula = '='.$sign.$match[2].$sign.$match[3]; |
|
| 568 | 568 | $operand = Calculation::getInstance()->_calculateFormulaValue($fractionFormula); |
| 569 | 569 | |
| 570 | 570 | return true; |
@@ -69,7 +69,7 @@ |
||
| 69 | 69 | { |
| 70 | 70 | if ($timezone !== null) { |
| 71 | 71 | if (!self::validateTimezone($timezone)) { |
| 72 | - throw new PhpSpreadsheetException('Invalid timezone ' . $timezone); |
|
| 72 | + throw new PhpSpreadsheetException('Invalid timezone '.$timezone); |
|
| 73 | 73 | } |
| 74 | 74 | } else { |
| 75 | 75 | $timezone = self::$timezone; |
@@ -133,6 +133,6 @@ |
||
| 133 | 133 | return 'UTF-8'; // Unicode (UTF-8) |
| 134 | 134 | } |
| 135 | 135 | |
| 136 | - throw new PhpSpreadsheetException('Unknown codepage: ' . $codePage); |
|
| 136 | + throw new PhpSpreadsheetException('Unknown codepage: '.$codePage); |
|
| 137 | 137 | } |
| 138 | 138 | } |
@@ -174,10 +174,10 @@ discard block |
||
| 174 | 174 | $header_parts = str_split($header, 2); |
| 175 | 175 | |
| 176 | 176 | // Get the width 4 bytes |
| 177 | - $width = hexdec($header_parts[19] . $header_parts[18]); |
|
| 177 | + $width = hexdec($header_parts[19].$header_parts[18]); |
|
| 178 | 178 | |
| 179 | 179 | // Get the height 4 bytes |
| 180 | - $height = hexdec($header_parts[23] . $header_parts[22]); |
|
| 180 | + $height = hexdec($header_parts[23].$header_parts[22]); |
|
| 181 | 181 | |
| 182 | 182 | // Unset the header params |
| 183 | 183 | unset($header_parts); |
@@ -228,9 +228,9 @@ discard block |
||
| 228 | 228 | // Calculation of the RGB-pixel (defined as BGR in image-data) |
| 229 | 229 | // Define $i_pos as absolute position in the body |
| 230 | 230 | $i_pos = $i * 2; |
| 231 | - $r = hexdec($body[$i_pos + 4] . $body[$i_pos + 5]); |
|
| 232 | - $g = hexdec($body[$i_pos + 2] . $body[$i_pos + 3]); |
|
| 233 | - $b = hexdec($body[$i_pos] . $body[$i_pos + 1]); |
|
| 231 | + $r = hexdec($body[$i_pos + 4].$body[$i_pos + 5]); |
|
| 232 | + $g = hexdec($body[$i_pos + 2].$body[$i_pos + 3]); |
|
| 233 | + $b = hexdec($body[$i_pos].$body[$i_pos + 1]); |
|
| 234 | 234 | |
| 235 | 235 | // Calculate and draw the pixel |
| 236 | 236 | $color = imagecolorallocate($image, $r, $g, $b); |
@@ -187,9 +187,9 @@ discard block |
||
| 187 | 187 | $seconds = round($partDay * 60); |
| 188 | 188 | |
| 189 | 189 | if ($days >= 0) { |
| 190 | - $days = '+' . $days; |
|
| 190 | + $days = '+'.$days; |
|
| 191 | 191 | } |
| 192 | - $interval = $days . ' days'; |
|
| 192 | + $interval = $days.' days'; |
|
| 193 | 193 | |
| 194 | 194 | return $baseDate->modify($interval) |
| 195 | 195 | ->setTime((int) $hours, (int) $minutes, (int) $seconds); |
@@ -266,7 +266,7 @@ discard block |
||
| 266 | 266 | return false; |
| 267 | 267 | } |
| 268 | 268 | |
| 269 | - return self::dateTimeToExcel(new \DateTime('@' . $dateValue)); |
|
| 269 | + return self::dateTimeToExcel(new \DateTime('@'.$dateValue)); |
|
| 270 | 270 | } |
| 271 | 271 | |
| 272 | 272 | /** |
@@ -398,7 +398,7 @@ discard block |
||
| 398 | 398 | return false; |
| 399 | 399 | } |
| 400 | 400 | // Try checking for any of the date formatting characters that don't appear within square braces |
| 401 | - if (preg_match('/(^|\])[^\[]*[' . self::$possibleDateFormatCharacters . ']/i', $pFormatCode)) { |
|
| 401 | + if (preg_match('/(^|\])[^\[]*['.self::$possibleDateFormatCharacters.']/i', $pFormatCode)) { |
|
| 402 | 402 | // We might also have a format mask containing quoted strings... |
| 403 | 403 | // we don't want to test for any of our characters within the quoted blocks |
| 404 | 404 | if (strpos($pFormatCode, '"') !== false) { |
@@ -406,7 +406,7 @@ discard block |
||
| 406 | 406 | foreach (explode('"', $pFormatCode) as $subVal) { |
| 407 | 407 | // Only test in alternate array entries (the non-quoted blocks) |
| 408 | 408 | if (($segMatcher = !$segMatcher) && |
| 409 | - (preg_match('/(^|\])[^\[]*[' . self::$possibleDateFormatCharacters . ']/i', $subVal))) { |
|
| 409 | + (preg_match('/(^|\])[^\[]*['.self::$possibleDateFormatCharacters.']/i', $subVal))) { |
|
| 410 | 410 | return true; |
| 411 | 411 | } |
| 412 | 412 | } |
@@ -134,11 +134,11 @@ |
||
| 134 | 134 | public static function assertFile($filename) |
| 135 | 135 | { |
| 136 | 136 | if (!is_file($filename)) { |
| 137 | - throw new InvalidArgumentException('File "' . $filename . '" does not exist.'); |
|
| 137 | + throw new InvalidArgumentException('File "'.$filename.'" does not exist.'); |
|
| 138 | 138 | } |
| 139 | 139 | |
| 140 | 140 | if (!is_readable($filename)) { |
| 141 | - throw new InvalidArgumentException('Could not open "' . $filename . '" for reading.'); |
|
| 141 | + throw new InvalidArgumentException('Could not open "'.$filename.'" for reading.'); |
|
| 142 | 142 | } |
| 143 | 143 | } |
| 144 | 144 | } |
@@ -233,12 +233,12 @@ |
||
| 233 | 233 | $GLOBALS['_OLE_INSTANCES'][] = $this; |
| 234 | 234 | $instanceId = end(array_keys($GLOBALS['_OLE_INSTANCES'])); |
| 235 | 235 | |
| 236 | - $path = 'ole-chainedblockstream://oleInstanceId=' . $instanceId; |
|
| 236 | + $path = 'ole-chainedblockstream://oleInstanceId='.$instanceId; |
|
| 237 | 237 | if ($blockIdOrPps instanceof OLE\PPS) { |
| 238 | - $path .= '&blockId=' . $blockIdOrPps->startBlock; |
|
| 239 | - $path .= '&size=' . $blockIdOrPps->Size; |
|
| 238 | + $path .= '&blockId='.$blockIdOrPps->startBlock; |
|
| 239 | + $path .= '&size='.$blockIdOrPps->Size; |
|
| 240 | 240 | } else { |
| 241 | - $path .= '&blockId=' . $blockIdOrPps; |
|
| 241 | + $path .= '&blockId='.$blockIdOrPps; |
|
| 242 | 242 | } |
| 243 | 243 | |
| 244 | 244 | return fopen($path, 'r'); |
@@ -1178,7 +1178,7 @@ |
||
| 1178 | 1178 | $this->checkMatrixDimensions($M); |
| 1179 | 1179 | for ($i = 0; $i < $this->m; ++$i) { |
| 1180 | 1180 | for ($j = 0; $j < $this->n; ++$j) { |
| 1181 | - $this->A[$i][$j] = trim($this->A[$i][$j], '"') . trim($M->get($i, $j), '"'); |
|
| 1181 | + $this->A[$i][$j] = trim($this->A[$i][$j], '"').trim($M->get($i, $j), '"'); |
|
| 1182 | 1182 | } |
| 1183 | 1183 | } |
| 1184 | 1184 | |
@@ -48,7 +48,7 @@ |
||
| 48 | 48 | $slope = $this->getSlope($dp); |
| 49 | 49 | $intersect = $this->getIntersect($dp); |
| 50 | 50 | |
| 51 | - return 'Y = ' . $intersect . ' + ' . $slope . ' * log(X)'; |
|
| 51 | + return 'Y = '.$intersect.' + '.$slope.' * log(X)'; |
|
| 52 | 52 | } |
| 53 | 53 | |
| 54 | 54 | /** |