@@ -537,7 +537,7 @@ |
||
537 | 537 | if ($matchType === 0) { |
538 | 538 | if ($typeMatch && is_string($lookupValue) && (bool) preg_match('/([\?\*])/', $lookupValue)) { |
539 | 539 | $splitString = $lookupValue; |
540 | - $chars = array_map(function ($i) use ($splitString) { |
|
540 | + $chars = array_map(function($i) use ($splitString) { |
|
541 | 541 | return mb_substr($splitString, $i, 1); |
542 | 542 | }, range(0, mb_strlen($splitString) - 1)); |
543 | 543 |
@@ -1279,7 +1279,7 @@ discard block |
||
1279 | 1279 | { |
1280 | 1280 | return array_filter( |
1281 | 1281 | $args, |
1282 | - function ($index) use ($cellReference) { |
|
1282 | + function($index) use ($cellReference) { |
|
1283 | 1283 | [, $row, $column] = explode('.', $index); |
1284 | 1284 | |
1285 | 1285 | return $cellReference->getWorksheet()->getRowDimension($row)->getVisible() && |
@@ -1293,7 +1293,7 @@ discard block |
||
1293 | 1293 | { |
1294 | 1294 | return array_filter( |
1295 | 1295 | $args, |
1296 | - function ($index) use ($cellReference) { |
|
1296 | + function($index) use ($cellReference) { |
|
1297 | 1297 | [, $row, $column] = explode('.', $index); |
1298 | 1298 | if ($cellReference->getWorksheet()->cellExists($column . $row)) { |
1299 | 1299 | //take this cell out if it contains the SUBTOTAL or AGGREGATE functions in a formula |
@@ -94,7 +94,7 @@ discard block |
||
94 | 94 | return Functions::VALUE(); |
95 | 95 | } |
96 | 96 | |
97 | - $args = array_filter($args, function ($value) { |
|
97 | + $args = array_filter($args, function($value) { |
|
98 | 98 | return $value !== null || (is_string($value) && trim($value) == ''); |
99 | 99 | }); |
100 | 100 | $argCount = count($args); |
@@ -137,7 +137,7 @@ discard block |
||
137 | 137 | return Functions::VALUE(); |
138 | 138 | } |
139 | 139 | |
140 | - $args = array_filter($args, function ($value) { |
|
140 | + $args = array_filter($args, function($value) { |
|
141 | 141 | return $value !== null || (is_string($value) && trim($value) == ''); |
142 | 142 | }); |
143 | 143 | |
@@ -180,7 +180,7 @@ discard block |
||
180 | 180 | return Functions::VALUE(); |
181 | 181 | } |
182 | 182 | |
183 | - $args = array_filter($args, function ($value) { |
|
183 | + $args = array_filter($args, function($value) { |
|
184 | 184 | return $value !== null || (is_string($value) && trim($value) == ''); |
185 | 185 | }); |
186 | 186 |
@@ -4379,7 +4379,7 @@ discard block |
||
4379 | 4379 | * |
4380 | 4380 | * @return mixed |
4381 | 4381 | */ |
4382 | - private function executeBinaryComparisonOperation($cellID, $operand1, $operand2, $operation, Stack &$stack, $recursingArrays = false) |
|
4382 | + private function executeBinaryComparisonOperation($cellID, $operand1, $operand2, $operation, Stack & $stack, $recursingArrays = false) |
|
4383 | 4383 | { |
4384 | 4384 | // If we're dealing with matrix operations, we want a matrix result |
4385 | 4385 | if ((is_array($operand1)) || (is_array($operand2))) { |
@@ -4825,7 +4825,7 @@ discard block |
||
4825 | 4825 | |
4826 | 4826 | private function getTokensAsString($tokens) |
4827 | 4827 | { |
4828 | - $tokensStr = array_map(function ($token) { |
|
4828 | + $tokensStr = array_map(function($token) { |
|
4829 | 4829 | $value = $token['value'] ?? 'no value'; |
4830 | 4830 | while (is_array($value)) { |
4831 | 4831 | $value = array_pop($value); |
@@ -206,7 +206,7 @@ |
||
206 | 206 | |
207 | 207 | $meanSquareDeviations[$delimiter] = array_reduce( |
208 | 208 | $series, |
209 | - function ($sum, $value) use ($median) { |
|
209 | + function($sum, $value) use ($median) { |
|
210 | 210 | return $sum + pow($value - $median, 2); |
211 | 211 | } |
212 | 212 | ) / count($series); |
@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -spl_autoload_register(function ($class_name) { |
|
3 | +spl_autoload_register(function($class_name) { |
|
4 | 4 | $preg_match = preg_match('/^PhpOffice\\\PhpSpreadsheet\\\/', $class_name); |
5 | 5 | |
6 | 6 | if (1 === $preg_match) { |
@@ -1705,8 +1705,8 @@ |
||
1705 | 1705 | 'q', 'rt', 'ins', 'font', 'strong', |
1706 | 1706 | 's', 'tt', 'kbd', 'mark', |
1707 | 1707 | 'u', 'xm', 'sub', 'nobr', |
1708 | - 'sup', 'ruby', |
|
1709 | - 'var', 'span', |
|
1710 | - 'wbr', 'time', |
|
1708 | + 'sup', 'ruby', |
|
1709 | + 'var', 'span', |
|
1710 | + 'wbr', 'time', |
|
1711 | 1711 | ); |
1712 | 1712 | } |
@@ -235,7 +235,7 @@ discard block |
||
235 | 235 | { |
236 | 236 | $Block['type'] = $blockType; |
237 | 237 | |
238 | - if (! isset($Block['identified'])) |
|
238 | + if (!isset($Block['identified'])) |
|
239 | 239 | { |
240 | 240 | $Blocks [] = $CurrentBlock; |
241 | 241 | |
@@ -255,7 +255,7 @@ discard block |
||
255 | 255 | |
256 | 256 | // ~ |
257 | 257 | |
258 | - if (isset($CurrentBlock) and ! isset($CurrentBlock['type']) and ! isset($CurrentBlock['interrupted'])) |
|
258 | + if (isset($CurrentBlock) and !isset($CurrentBlock['type']) and !isset($CurrentBlock['interrupted'])) |
|
259 | 259 | { |
260 | 260 | $CurrentBlock['element']['text'] .= "\n" . $text; |
261 | 261 | } |
@@ -319,7 +319,7 @@ discard block |
||
319 | 319 | |
320 | 320 | protected function blockCode($Line, $Block = null) |
321 | 321 | { |
322 | - if (isset($Block) and ! isset($Block['type']) and ! isset($Block['interrupted'])) |
|
322 | + if (isset($Block) and !isset($Block['type']) and !isset($Block['interrupted'])) |
|
323 | 323 | { |
324 | 324 | return; |
325 | 325 | } |
@@ -551,11 +551,11 @@ discard block |
||
551 | 551 | ), |
552 | 552 | ); |
553 | 553 | |
554 | - if($name === 'ol') |
|
554 | + if ($name === 'ol') |
|
555 | 555 | { |
556 | 556 | $listStart = stristr($matches[0], '.', true); |
557 | 557 | |
558 | - if($listStart !== '1') |
|
558 | + if ($listStart !== '1') |
|
559 | 559 | { |
560 | 560 | $Block['element']['attributes'] = array('start' => $listStart); |
561 | 561 | } |
@@ -610,7 +610,7 @@ discard block |
||
610 | 610 | return $Block; |
611 | 611 | } |
612 | 612 | |
613 | - if (! isset($Block['interrupted'])) |
|
613 | + if (!isset($Block['interrupted'])) |
|
614 | 614 | { |
615 | 615 | $text = preg_replace('/^[ ]{0,4}/', '', $Line['body']); |
616 | 616 | |
@@ -684,7 +684,7 @@ discard block |
||
684 | 684 | return $Block; |
685 | 685 | } |
686 | 686 | |
687 | - if (! isset($Block['interrupted'])) |
|
687 | + if (!isset($Block['interrupted'])) |
|
688 | 688 | { |
689 | 689 | $Block['element']['text'] [] = $Line['text']; |
690 | 690 | |
@@ -714,7 +714,7 @@ discard block |
||
714 | 714 | |
715 | 715 | protected function blockSetextHeader($Line, array $Block = null) |
716 | 716 | { |
717 | - if (! isset($Block) or isset($Block['type']) or isset($Block['interrupted'])) |
|
717 | + if (!isset($Block) or isset($Block['type']) or isset($Block['interrupted'])) |
|
718 | 718 | { |
719 | 719 | return; |
720 | 720 | } |
@@ -852,7 +852,7 @@ discard block |
||
852 | 852 | |
853 | 853 | protected function blockTable($Line, array $Block = null) |
854 | 854 | { |
855 | - if (! isset($Block) or isset($Block['type']) or isset($Block['interrupted'])) |
|
855 | + if (!isset($Block) or isset($Block['type']) or isset($Block['interrupted'])) |
|
856 | 856 | { |
857 | 857 | return; |
858 | 858 | } |
@@ -1069,14 +1069,14 @@ discard block |
||
1069 | 1069 | { |
1070 | 1070 | // check to see if the current inline type is nestable in the current context |
1071 | 1071 | |
1072 | - if (! empty($nonNestables) and in_array($inlineType, $nonNestables)) |
|
1072 | + if (!empty($nonNestables) and in_array($inlineType, $nonNestables)) |
|
1073 | 1073 | { |
1074 | 1074 | continue; |
1075 | 1075 | } |
1076 | 1076 | |
1077 | 1077 | $Inline = $this->{'inline' . $inlineType}($Excerpt); |
1078 | 1078 | |
1079 | - if (! isset($Inline)) |
|
1079 | + if (!isset($Inline)) |
|
1080 | 1080 | { |
1081 | 1081 | continue; |
1082 | 1082 | } |
@@ -1090,7 +1090,7 @@ discard block |
||
1090 | 1090 | |
1091 | 1091 | // sets a default inline position |
1092 | 1092 | |
1093 | - if (! isset($Inline['position'])) |
|
1093 | + if (!isset($Inline['position'])) |
|
1094 | 1094 | { |
1095 | 1095 | $Inline['position'] = $markerPosition; |
1096 | 1096 | } |
@@ -1160,7 +1160,7 @@ discard block |
||
1160 | 1160 | { |
1161 | 1161 | $url = $matches[1]; |
1162 | 1162 | |
1163 | - if (! isset($matches[2])) |
|
1163 | + if (!isset($matches[2])) |
|
1164 | 1164 | { |
1165 | 1165 | $url = 'mailto:' . $url; |
1166 | 1166 | } |
@@ -1180,7 +1180,7 @@ discard block |
||
1180 | 1180 | |
1181 | 1181 | protected function inlineEmphasis($Excerpt) |
1182 | 1182 | { |
1183 | - if (! isset($Excerpt['text'][1])) |
|
1183 | + if (!isset($Excerpt['text'][1])) |
|
1184 | 1184 | { |
1185 | 1185 | return; |
1186 | 1186 | } |
@@ -1223,7 +1223,7 @@ discard block |
||
1223 | 1223 | |
1224 | 1224 | protected function inlineImage($Excerpt) |
1225 | 1225 | { |
1226 | - if (! isset($Excerpt['text'][1]) or $Excerpt['text'][1] !== '[') |
|
1226 | + if (!isset($Excerpt['text'][1]) or $Excerpt['text'][1] !== '[') |
|
1227 | 1227 | { |
1228 | 1228 | return; |
1229 | 1229 | } |
@@ -1310,7 +1310,7 @@ discard block |
||
1310 | 1310 | $definition = strtolower($Element['text']); |
1311 | 1311 | } |
1312 | 1312 | |
1313 | - if (! isset($this->DefinitionData['Reference'][$definition])) |
|
1313 | + if (!isset($this->DefinitionData['Reference'][$definition])) |
|
1314 | 1314 | { |
1315 | 1315 | return; |
1316 | 1316 | } |
@@ -1361,7 +1361,7 @@ discard block |
||
1361 | 1361 | |
1362 | 1362 | protected function inlineSpecialCharacter($Excerpt) |
1363 | 1363 | { |
1364 | - if ($Excerpt['text'][0] === '&' and ! preg_match('/^&#?\w+;/', $Excerpt['text'])) |
|
1364 | + if ($Excerpt['text'][0] === '&' and !preg_match('/^&#?\w+;/', $Excerpt['text'])) |
|
1365 | 1365 | { |
1366 | 1366 | return array( |
1367 | 1367 | 'markup' => '&', |
@@ -1382,7 +1382,7 @@ discard block |
||
1382 | 1382 | |
1383 | 1383 | protected function inlineStrikethrough($Excerpt) |
1384 | 1384 | { |
1385 | - if (! isset($Excerpt['text'][1])) |
|
1385 | + if (!isset($Excerpt['text'][1])) |
|
1386 | 1386 | { |
1387 | 1387 | return; |
1388 | 1388 | } |
@@ -1402,7 +1402,7 @@ discard block |
||
1402 | 1402 | |
1403 | 1403 | protected function inlineUrl($Excerpt) |
1404 | 1404 | { |
1405 | - if ($this->urlsLinked !== true or ! isset($Excerpt['text'][2]) or $Excerpt['text'][2] !== '/') |
|
1405 | + if ($this->urlsLinked !== true or !isset($Excerpt['text'][2]) or $Excerpt['text'][2] !== '/') |
|
1406 | 1406 | { |
1407 | 1407 | return; |
1408 | 1408 | } |
@@ -1558,7 +1558,7 @@ discard block |
||
1558 | 1558 | |
1559 | 1559 | $trimmedMarkup = trim($markup); |
1560 | 1560 | |
1561 | - if (! in_array('', $lines) and substr($trimmedMarkup, 0, 3) === '<p>') |
|
1561 | + if (!in_array('', $lines) and substr($trimmedMarkup, 0, 3) === '<p>') |
|
1562 | 1562 | { |
1563 | 1563 | $markup = $trimmedMarkup; |
1564 | 1564 | $markup = substr($markup, 3); |
@@ -1585,7 +1585,7 @@ discard block |
||
1585 | 1585 | protected function sanitiseElement(array $Element) |
1586 | 1586 | { |
1587 | 1587 | static $goodAttribute = '/^[a-zA-Z0-9][a-zA-Z0-9-_]*+$/'; |
1588 | - static $safeUrlNameToAtt = array( |
|
1588 | + static $safeUrlNameToAtt = array( |
|
1589 | 1589 | 'a' => 'href', |
1590 | 1590 | 'img' => 'src', |
1591 | 1591 | ); |
@@ -1595,12 +1595,12 @@ discard block |
||
1595 | 1595 | $Element = $this->filterUnsafeUrlInAttribute($Element, $safeUrlNameToAtt[$Element['name']]); |
1596 | 1596 | } |
1597 | 1597 | |
1598 | - if (! empty($Element['attributes'])) |
|
1598 | + if (!empty($Element['attributes'])) |
|
1599 | 1599 | { |
1600 | 1600 | foreach ($Element['attributes'] as $att => $val) |
1601 | 1601 | { |
1602 | 1602 | // filter out badly parsed attribute |
1603 | - if (! preg_match($goodAttribute, $att)) |
|
1603 | + if (!preg_match($goodAttribute, $att)) |
|
1604 | 1604 | { |
1605 | 1605 | unset($Element['attributes'][$att]); |
1606 | 1606 | } |
@@ -1701,8 +1701,8 @@ discard block |
||
1701 | 1701 | protected $textLevelElements = array( |
1702 | 1702 | 'a', 'br', 'bdo', 'abbr', 'blink', 'nextid', 'acronym', 'basefont', |
1703 | 1703 | 'b', 'em', 'big', 'cite', 'small', 'spacer', 'listing', |
1704 | - 'i', 'rp', 'del', 'code', 'strike', 'marquee', |
|
1705 | - 'q', 'rt', 'ins', 'font', 'strong', |
|
1704 | + 'i', 'rp', 'del', 'code', 'strike', 'marquee', |
|
1705 | + 'q', 'rt', 'ins', 'font', 'strong', |
|
1706 | 1706 | 's', 'tt', 'kbd', 'mark', |
1707 | 1707 | 'u', 'xm', 'sub', 'nobr', |
1708 | 1708 | 'sup', 'ruby', |
@@ -198,8 +198,7 @@ discard block |
||
198 | 198 | $CurrentBlock = $Block; |
199 | 199 | |
200 | 200 | continue; |
201 | - } |
|
202 | - else |
|
201 | + } else |
|
203 | 202 | { |
204 | 203 | if ($this->isBlockCompletable($CurrentBlock['type'])) |
205 | 204 | { |
@@ -258,8 +257,7 @@ discard block |
||
258 | 257 | if (isset($CurrentBlock) and ! isset($CurrentBlock['type']) and ! isset($CurrentBlock['interrupted'])) |
259 | 258 | { |
260 | 259 | $CurrentBlock['element']['text'] .= "\n" . $text; |
261 | - } |
|
262 | - else |
|
260 | + } else |
|
263 | 261 | { |
264 | 262 | $Blocks [] = $CurrentBlock; |
265 | 263 | |
@@ -764,8 +762,7 @@ discard block |
||
764 | 762 | |
765 | 763 | $Block['void'] = true; |
766 | 764 | } |
767 | - } |
|
768 | - else |
|
765 | + } else |
|
769 | 766 | { |
770 | 767 | if (isset($matches[2]) or in_array($matches[1], $this->voidElements)) |
771 | 768 | { |
@@ -789,18 +786,21 @@ discard block |
||
789 | 786 | return; |
790 | 787 | } |
791 | 788 | |
792 | - if (preg_match('/^<' . $Block['name'] . '(?:[ ]*' . $this->regexHtmlAttribute . ')*[ ]*>/i', $Line['text'])) // open |
|
789 | + if (preg_match('/^<' . $Block['name'] . '(?:[ ]*' . $this->regexHtmlAttribute . ')*[ ]*>/i', $Line['text'])) { |
|
790 | + // open |
|
793 | 791 | { |
794 | 792 | $Block['depth']++; |
795 | 793 | } |
794 | + } |
|
796 | 795 | |
797 | - if (preg_match('/(.*?)<\/' . $Block['name'] . '>[ ]*$/i', $Line['text'], $matches)) // close |
|
796 | + if (preg_match('/(.*?)<\/' . $Block['name'] . '>[ ]*$/i', $Line['text'], $matches)) { |
|
797 | + // close |
|
798 | 798 | { |
799 | 799 | if ($Block['depth'] > 0) |
800 | 800 | { |
801 | 801 | $Block['depth']--; |
802 | - } |
|
803 | - else |
|
802 | + } |
|
803 | + } else |
|
804 | 804 | { |
805 | 805 | $Block['closed'] = true; |
806 | 806 | } |
@@ -1190,12 +1190,10 @@ discard block |
||
1190 | 1190 | if ($Excerpt['text'][1] === $marker and preg_match($this->StrongRegex[$marker], $Excerpt['text'], $matches)) |
1191 | 1191 | { |
1192 | 1192 | $emphasis = 'strong'; |
1193 | - } |
|
1194 | - elseif (preg_match($this->EmRegex[$marker], $Excerpt['text'], $matches)) |
|
1193 | + } elseif (preg_match($this->EmRegex[$marker], $Excerpt['text'], $matches)) |
|
1195 | 1194 | { |
1196 | 1195 | $emphasis = 'em'; |
1197 | - } |
|
1198 | - else |
|
1196 | + } else |
|
1199 | 1197 | { |
1200 | 1198 | return; |
1201 | 1199 | } |
@@ -1279,8 +1277,7 @@ discard block |
||
1279 | 1277 | $extent += strlen($matches[0]); |
1280 | 1278 | |
1281 | 1279 | $remainder = substr($remainder, $extent); |
1282 | - } |
|
1283 | - else |
|
1280 | + } else |
|
1284 | 1281 | { |
1285 | 1282 | return; |
1286 | 1283 | } |
@@ -1295,8 +1292,7 @@ discard block |
||
1295 | 1292 | } |
1296 | 1293 | |
1297 | 1294 | $extent += strlen($matches[0]); |
1298 | - } |
|
1299 | - else |
|
1295 | + } else |
|
1300 | 1296 | { |
1301 | 1297 | if (preg_match('/^\s*\[(.*?)\]/', $remainder, $matches)) |
1302 | 1298 | { |
@@ -1304,8 +1300,7 @@ discard block |
||
1304 | 1300 | $definition = strtolower($definition); |
1305 | 1301 | |
1306 | 1302 | $extent += strlen($matches[0]); |
1307 | - } |
|
1308 | - else |
|
1303 | + } else |
|
1309 | 1304 | { |
1310 | 1305 | $definition = strtolower($Element['text']); |
1311 | 1306 | } |
@@ -1453,8 +1448,7 @@ discard block |
||
1453 | 1448 | if ($this->breaksEnabled) |
1454 | 1449 | { |
1455 | 1450 | $text = preg_replace('/[ ]*\n/', "<br />\n", $text); |
1456 | - } |
|
1457 | - else |
|
1451 | + } else |
|
1458 | 1452 | { |
1459 | 1453 | $text = preg_replace('/(?:[ ][ ]+|[ ]*\\\\)\n/', "<br />\n", $text); |
1460 | 1454 | $text = str_replace(" \n", "\n", $text); |
@@ -1516,19 +1510,16 @@ discard block |
||
1516 | 1510 | if (isset($Element['handler'])) |
1517 | 1511 | { |
1518 | 1512 | $markup .= $this->{$Element['handler']}($text, $Element['nonNestables']); |
1519 | - } |
|
1520 | - elseif (!$permitRawHtml) |
|
1513 | + } elseif (!$permitRawHtml) |
|
1521 | 1514 | { |
1522 | 1515 | $markup .= self::escape($text, true); |
1523 | - } |
|
1524 | - else |
|
1516 | + } else |
|
1525 | 1517 | { |
1526 | 1518 | $markup .= $text; |
1527 | 1519 | } |
1528 | 1520 | |
1529 | 1521 | $markup .= '</' . $Element['name'] . '>'; |
1530 | - } |
|
1531 | - else |
|
1522 | + } else |
|
1532 | 1523 | { |
1533 | 1524 | $markup .= ' />'; |
1534 | 1525 | } |
@@ -1646,8 +1637,7 @@ discard block |
||
1646 | 1637 | if ($len > strlen($string)) |
1647 | 1638 | { |
1648 | 1639 | return false; |
1649 | - } |
|
1650 | - else |
|
1640 | + } else |
|
1651 | 1641 | { |
1652 | 1642 | return strtolower(substr($string, 0, $len)) === strtolower($needle); |
1653 | 1643 | } |
@@ -26,69 +26,69 @@ |
||
26 | 26 | |
27 | 27 | |
28 | 28 | spl_autoload_register(function ($class_name) { |
29 | - // Enable this to detect what we need for require_once |
|
30 | - //var_dump($class_name); |
|
31 | - |
|
32 | - |
|
33 | - $preg_match = preg_match('/^Symfony\\\Polyfill\\\Php80\\\/', $class_name); |
|
34 | - if (1 === $preg_match) { |
|
35 | - $class_name = preg_replace('/\\\/', '/', $class_name); |
|
36 | - $class_name = preg_replace('/^Symfony\\/Polyfill\\/Php80\\//', '', $class_name); |
|
37 | - require_once __DIR__ . '/symfony/polyfill-php80/' . $class_name . '.php'; |
|
38 | - } |
|
39 | - |
|
40 | - $preg_match = preg_match('/^Webklex\\\PHPIMAP\\\/', $class_name); |
|
41 | - if (1 === $preg_match) { |
|
42 | - $class_name = preg_replace('/\\\/', '/', $class_name); |
|
43 | - $class_name = preg_replace('/^Webklex\\/PHPIMAP\\//', '', $class_name); |
|
44 | - require_once __DIR__ . '/../src/' . $class_name . '.php'; |
|
45 | - } |
|
46 | - |
|
47 | - $preg_match = preg_match('/^Illuminate\\\Support\\\/', $class_name); |
|
48 | - if (1 === $preg_match) { |
|
49 | - $class_name = preg_replace('/\\\/', '/', $class_name); |
|
50 | - $class_name = preg_replace('/^Illuminate\\/Support\\//', '', $class_name); |
|
51 | - $listofdir = array(0 => __DIR__ . '/illuminate/macroable', |
|
52 | - 1 => __DIR__ . '/illuminate/collections', |
|
53 | - 2 => __DIR__ . '/illuminate/support', |
|
54 | - 3 => __DIR__ . '/illuminate/contracts' |
|
55 | - ); |
|
56 | - foreach($listofdir as $dir) { |
|
57 | - if (file_exists($dir . '/' . $class_name . '.php')) { |
|
58 | - require_once $dir . '/' . $class_name . '.php'; |
|
59 | - break; |
|
60 | - } |
|
61 | - } |
|
62 | - } |
|
63 | - |
|
64 | - $preg_match = preg_match('/^Illuminate\\\Contracts\\\/', $class_name); |
|
65 | - if (1 === $preg_match) { |
|
66 | - $class_name = preg_replace('/\\\/', '/', $class_name); |
|
67 | - $class_name = preg_replace('/^Illuminate\\/Contracts\\//', '', $class_name); |
|
68 | - $listofdir = array( |
|
69 | - 0 => __DIR__ . '/illuminate/contracts' |
|
70 | - ); |
|
71 | - foreach($listofdir as $dir) { |
|
72 | - if (file_exists($dir . '/' . $class_name . '.php')) { |
|
73 | - require_once $dir . '/' . $class_name . '.php'; |
|
74 | - break; |
|
75 | - } |
|
76 | - } |
|
77 | - } |
|
78 | - |
|
79 | - $preg_match = preg_match('/^Carbon\\\/', $class_name); |
|
80 | - if (1 === $preg_match) { |
|
81 | - $class_name = preg_replace('/\\\/', '/', $class_name); |
|
82 | - $class_name = preg_replace('/^Carbon\\//', '', $class_name); |
|
83 | - $listofdir = array( |
|
84 | - 0 => __DIR__ . '/nesbot/carbon/src/Carbon' |
|
85 | - ); |
|
86 | - foreach($listofdir as $dir) { |
|
87 | - if (file_exists($dir . '/' . $class_name . '.php')) { |
|
88 | - require_once $dir . '/' . $class_name . '.php'; |
|
89 | - break; |
|
90 | - } |
|
91 | - } |
|
92 | - } |
|
29 | + // Enable this to detect what we need for require_once |
|
30 | + //var_dump($class_name); |
|
31 | + |
|
32 | + |
|
33 | + $preg_match = preg_match('/^Symfony\\\Polyfill\\\Php80\\\/', $class_name); |
|
34 | + if (1 === $preg_match) { |
|
35 | + $class_name = preg_replace('/\\\/', '/', $class_name); |
|
36 | + $class_name = preg_replace('/^Symfony\\/Polyfill\\/Php80\\//', '', $class_name); |
|
37 | + require_once __DIR__ . '/symfony/polyfill-php80/' . $class_name . '.php'; |
|
38 | + } |
|
39 | + |
|
40 | + $preg_match = preg_match('/^Webklex\\\PHPIMAP\\\/', $class_name); |
|
41 | + if (1 === $preg_match) { |
|
42 | + $class_name = preg_replace('/\\\/', '/', $class_name); |
|
43 | + $class_name = preg_replace('/^Webklex\\/PHPIMAP\\//', '', $class_name); |
|
44 | + require_once __DIR__ . '/../src/' . $class_name . '.php'; |
|
45 | + } |
|
46 | + |
|
47 | + $preg_match = preg_match('/^Illuminate\\\Support\\\/', $class_name); |
|
48 | + if (1 === $preg_match) { |
|
49 | + $class_name = preg_replace('/\\\/', '/', $class_name); |
|
50 | + $class_name = preg_replace('/^Illuminate\\/Support\\//', '', $class_name); |
|
51 | + $listofdir = array(0 => __DIR__ . '/illuminate/macroable', |
|
52 | + 1 => __DIR__ . '/illuminate/collections', |
|
53 | + 2 => __DIR__ . '/illuminate/support', |
|
54 | + 3 => __DIR__ . '/illuminate/contracts' |
|
55 | + ); |
|
56 | + foreach($listofdir as $dir) { |
|
57 | + if (file_exists($dir . '/' . $class_name . '.php')) { |
|
58 | + require_once $dir . '/' . $class_name . '.php'; |
|
59 | + break; |
|
60 | + } |
|
61 | + } |
|
62 | + } |
|
63 | + |
|
64 | + $preg_match = preg_match('/^Illuminate\\\Contracts\\\/', $class_name); |
|
65 | + if (1 === $preg_match) { |
|
66 | + $class_name = preg_replace('/\\\/', '/', $class_name); |
|
67 | + $class_name = preg_replace('/^Illuminate\\/Contracts\\//', '', $class_name); |
|
68 | + $listofdir = array( |
|
69 | + 0 => __DIR__ . '/illuminate/contracts' |
|
70 | + ); |
|
71 | + foreach($listofdir as $dir) { |
|
72 | + if (file_exists($dir . '/' . $class_name . '.php')) { |
|
73 | + require_once $dir . '/' . $class_name . '.php'; |
|
74 | + break; |
|
75 | + } |
|
76 | + } |
|
77 | + } |
|
78 | + |
|
79 | + $preg_match = preg_match('/^Carbon\\\/', $class_name); |
|
80 | + if (1 === $preg_match) { |
|
81 | + $class_name = preg_replace('/\\\/', '/', $class_name); |
|
82 | + $class_name = preg_replace('/^Carbon\\//', '', $class_name); |
|
83 | + $listofdir = array( |
|
84 | + 0 => __DIR__ . '/nesbot/carbon/src/Carbon' |
|
85 | + ); |
|
86 | + foreach($listofdir as $dir) { |
|
87 | + if (file_exists($dir . '/' . $class_name . '.php')) { |
|
88 | + require_once $dir . '/' . $class_name . '.php'; |
|
89 | + break; |
|
90 | + } |
|
91 | + } |
|
92 | + } |
|
93 | 93 | |
94 | 94 | }); |
@@ -15,17 +15,17 @@ discard block |
||
15 | 15 | |
16 | 16 | |
17 | 17 | // Add class/method of PHP8 for compatibility with older versions of PHP |
18 | -require_once(__DIR__.'/symfony/polyfill-php80/bootstrap.php'); |
|
18 | +require_once(__DIR__ . '/symfony/polyfill-php80/bootstrap.php'); |
|
19 | 19 | |
20 | 20 | //'0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => $vendorDir . '/symfony/polyfill-mbstring/bootstrap.php', |
21 | 21 | //'a4a119a56e50fbb293281d9a48007e0e' => $vendorDir . '/symfony/polyfill-php80/bootstrap.php', |
22 | 22 | //'60799491728b879e74601d83e38b2cad' => $vendorDir . '/illuminate/collections/helpers.php', |
23 | 23 | //'320cde22f66dd4f5d3fd621d3e88b98f' => $vendorDir . '/symfony/polyfill-ctype/bootstrap.php', |
24 | 24 | //'6e3fae29631ef280660b3cdad06f25a8' => $vendorDir . '/symfony/deprecation-contracts/function.php', |
25 | -require_once(__DIR__.'/illuminate/collections/helpers.php'); |
|
25 | +require_once(__DIR__ . '/illuminate/collections/helpers.php'); |
|
26 | 26 | |
27 | 27 | |
28 | -spl_autoload_register(function ($class_name) { |
|
28 | +spl_autoload_register(function($class_name) { |
|
29 | 29 | // Enable this to detect what we need for require_once |
30 | 30 | //var_dump($class_name); |
31 | 31 | |
@@ -53,7 +53,7 @@ discard block |
||
53 | 53 | 2 => __DIR__ . '/illuminate/support', |
54 | 54 | 3 => __DIR__ . '/illuminate/contracts' |
55 | 55 | ); |
56 | - foreach($listofdir as $dir) { |
|
56 | + foreach ($listofdir as $dir) { |
|
57 | 57 | if (file_exists($dir . '/' . $class_name . '.php')) { |
58 | 58 | require_once $dir . '/' . $class_name . '.php'; |
59 | 59 | break; |
@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | $listofdir = array( |
69 | 69 | 0 => __DIR__ . '/illuminate/contracts' |
70 | 70 | ); |
71 | - foreach($listofdir as $dir) { |
|
71 | + foreach ($listofdir as $dir) { |
|
72 | 72 | if (file_exists($dir . '/' . $class_name . '.php')) { |
73 | 73 | require_once $dir . '/' . $class_name . '.php'; |
74 | 74 | break; |
@@ -83,7 +83,7 @@ discard block |
||
83 | 83 | $listofdir = array( |
84 | 84 | 0 => __DIR__ . '/nesbot/carbon/src/Carbon' |
85 | 85 | ); |
86 | - foreach($listofdir as $dir) { |
|
86 | + foreach ($listofdir as $dir) { |
|
87 | 87 | if (file_exists($dir . '/' . $class_name . '.php')) { |
88 | 88 | require_once $dir . '/' . $class_name . '.php'; |
89 | 89 | break; |
@@ -25,8 +25,8 @@ discard block |
||
25 | 25 | { |
26 | 26 | $messages = $this->getPrivateProperty($catalogue, 'messages'); |
27 | 27 | |
28 | - if (isset($messages[$domain.MessageCatalogueInterface::INTL_DOMAIN_SUFFIX][$id])) { |
|
29 | - return $messages[$domain.MessageCatalogueInterface::INTL_DOMAIN_SUFFIX][$id]; |
|
28 | + if (isset($messages[$domain . MessageCatalogueInterface::INTL_DOMAIN_SUFFIX][$id])) { |
|
29 | + return $messages[$domain . MessageCatalogueInterface::INTL_DOMAIN_SUFFIX][$id]; |
|
30 | 30 | } |
31 | 31 | |
32 | 32 | if (isset($messages[$domain][$id])) { |
@@ -44,7 +44,7 @@ discard block |
||
44 | 44 | |
45 | 45 | private function getPrivateProperty($instance, string $field) |
46 | 46 | { |
47 | - return (function (string $field) { |
|
47 | + return (function(string $field) { |
|
48 | 48 | return $this->$field; |
49 | 49 | })->call($instance, $field); |
50 | 50 | } |