diff --git a/Account/Account.php b/Account/Account.php index cf357e102..75e5a037e 100644 --- a/Account/Account.php +++ b/Account/Account.php @@ -255,7 +255,7 @@ class Account implements \JsonSerializable, ArrayableInterface throw new \InvalidArgumentException(); } - $this->email = \mb_strtolower($email); + $this->email = mb_strtolower($email); } /** @@ -347,7 +347,7 @@ class Account implements \JsonSerializable, ArrayableInterface */ public function generatePassword(string $password) : void { - $temp = \password_hash($password, \PASSWORD_BCRYPT); + $temp = password_hash($password, \PASSWORD_BCRYPT); if ($temp === false) { throw new \Exception('Internal password_hash error.'); // @codeCoverageIgnore @@ -377,7 +377,7 @@ class Account implements \JsonSerializable, ArrayableInterface */ public function __toString() : string { - return (string) \json_encode($this->toArray()); + return (string) json_encode($this->toArray()); } /** diff --git a/Account/Group.php b/Account/Group.php index f0ed34402..3983aa2ce 100644 --- a/Account/Group.php +++ b/Account/Group.php @@ -130,7 +130,7 @@ class Group implements \JsonSerializable, ArrayableInterface */ public function __toString() : string { - return (string) \json_encode($this->toArray()); + return (string) json_encode($this->toArray()); } /** diff --git a/Account/PermissionHandlingTrait.php b/Account/PermissionHandlingTrait.php index 0f32d93e7..aa40dcdf8 100644 --- a/Account/PermissionHandlingTrait.php +++ b/Account/PermissionHandlingTrait.php @@ -72,7 +72,7 @@ trait PermissionHandlingTrait { foreach ($permissions as $permission) { if (\is_array($permission)) { - $this->permissions = \array_merge($this->permissions, $permission); + $this->permissions = array_merge($this->permissions, $permission); } else { $this->permissions[] = $permission; } @@ -155,7 +155,7 @@ trait PermissionHandlingTrait int $component = null ) : bool { - $app = $app !== null ? \strtolower($app) : $app; + $app = $app !== null ? strtolower($app) : $app; foreach ($this->permissions as $p) { if ($p->hasPermission($permission, $unit, $app, $module, $type, $element, $component)) { diff --git a/Ai/Ocr/BasicOcr.php b/Ai/Ocr/BasicOcr.php index 37bfd8df8..3105cedde 100644 --- a/Ai/Ocr/BasicOcr.php +++ b/Ai/Ocr/BasicOcr.php @@ -65,8 +65,8 @@ final class BasicOcr $Xtrain = $this->readImages($dataPath, $limit); $ytrain = $this->readLabels($labelPath, $limit); - $this->Xtrain = \array_merge($this->Xtrain, $Xtrain); - $this->ytrain = \array_merge($this->ytrain, $ytrain); + $this->Xtrain = array_merge($this->Xtrain, $Xtrain); + $this->ytrain = array_merge($this->ytrain, $ytrain); } /** @@ -81,50 +81,50 @@ final class BasicOcr */ private function readImages(string $path, int $limit = 0) : array { - if (!\is_file($path)) { + if (!is_file($path)) { throw new PathException($path); } - $fp = \fopen($path, 'r'); + $fp = fopen($path, 'r'); if ($fp === false) { throw new PathException($path); // @codeCoverageIgnore } - if (($read = \fread($fp, 4)) === false || ($unpack = \unpack('N', $read)) === false) { + if (($read = fread($fp, 4)) === false || ($unpack = unpack('N', $read)) === false) { return []; // @codeCoverageIgnore } $magicNumber = $unpack[1]; - if (($read = \fread($fp, 4)) === false || ($unpack = \unpack('N', $read)) === false) { + if (($read = fread($fp, 4)) === false || ($unpack = unpack('N', $read)) === false) { return []; // @codeCoverageIgnore } $numberOfImages = $unpack[1]; if ($limit > 0) { - $numberOfImages = \min($numberOfImages, $limit); + $numberOfImages = min($numberOfImages, $limit); } - if (($read = \fread($fp, 4)) === false || ($unpack = \unpack('N', $read)) === false) { + if (($read = fread($fp, 4)) === false || ($unpack = unpack('N', $read)) === false) { return []; // @codeCoverageIgnore } $numberOfRows = $unpack[1]; - if (($read = \fread($fp, 4)) === false || ($unpack = \unpack('N', $read)) === false) { + if (($read = fread($fp, 4)) === false || ($unpack = unpack('N', $read)) === false) { return []; // @codeCoverageIgnore } $numberOfColumns = $unpack[1]; $images = []; for ($i = 0; $i < $numberOfImages; ++$i) { - if (($read = \fread($fp, $numberOfRows * $numberOfColumns)) === false - || ($unpack = \unpack('C*', $read)) === false + if (($read = fread($fp, $numberOfRows * $numberOfColumns)) === false + || ($unpack = unpack('C*', $read)) === false ) { return []; // @codeCoverageIgnore } - $images[] = \array_values($unpack); + $images[] = array_values($unpack); } - \fclose($fp); + fclose($fp); return $images; } @@ -141,38 +141,38 @@ final class BasicOcr */ private function readLabels(string $path, int $limit = 0) : array { - if (!\is_file($path)) { + if (!is_file($path)) { throw new PathException($path); } - $fp = \fopen($path, 'r'); + $fp = fopen($path, 'r'); if ($fp === false) { throw new PathException($path); // @codeCoverageIgnore } - if (($read = \fread($fp, 4)) === false || ($unpack = \unpack('N', $read)) === false) { + if (($read = fread($fp, 4)) === false || ($unpack = unpack('N', $read)) === false) { return []; // @codeCoverageIgnore } $magicNumber = $unpack[1]; - if (($read = \fread($fp, 4)) === false || ($unpack = \unpack('N', $read)) === false) { + if (($read = fread($fp, 4)) === false || ($unpack = unpack('N', $read)) === false) { return []; // @codeCoverageIgnore } $numberOfLabels = $unpack[1]; if ($limit > 0) { - $numberOfLabels = \min($numberOfLabels, $limit); + $numberOfLabels = min($numberOfLabels, $limit); } $labels = []; for ($i = 0; $i < $numberOfLabels; ++$i) { - if (($read = \fread($fp, 1)) === false || ($unpack = \unpack('C', $read)) === false) { + if (($read = fread($fp, 1)) === false || ($unpack = unpack('C', $read)) === false) { return []; // @codeCoverageIgnore } $labels[] = $unpack[1]; } - \fclose($fp); + fclose($fp); return $labels; } @@ -190,9 +190,9 @@ final class BasicOcr $predictedLabels = []; foreach ($Xtest as $sample) { $distances = $this->getDistances($Xtrain, $sample); - \asort($distances); + asort($distances); - $keys = \array_keys($distances); + $keys = array_keys($distances); $candidateLabels = []; for ($i = 0; $i < $k; ++$i) { @@ -200,7 +200,7 @@ final class BasicOcr } // find best match - $countedCandidates = \array_count_values($candidateLabels); + $countedCandidates = array_count_values($candidateLabels); foreach ($candidateLabels as $i => $label) { $predictedLabels[] = [ diff --git a/Algorithm/Clustering/Kmeans.php b/Algorithm/Clustering/Kmeans.php index b5322afcb..ed684d6c2 100644 --- a/Algorithm/Clustering/Kmeans.php +++ b/Algorithm/Clustering/Kmeans.php @@ -215,8 +215,8 @@ final class Kmeans */ private function kpp(array $points, int $n) : array { - $clusters = [clone $points[\mt_rand(0, \count($points) - 1)]]; - $d = \array_fill(0, $n, 0.0); + $clusters = [clone $points[mt_rand(0, \count($points) - 1)]]; + $d = array_fill(0, $n, 0.0); for ($i = 1; $i < $n; ++$i) { $sum = 0; @@ -226,7 +226,7 @@ final class Kmeans $sum += $d[$key]; } - $sum *= \mt_rand(0, \mt_getrandmax()) / \mt_getrandmax(); + $sum *= mt_rand(0, mt_getrandmax()) / mt_getrandmax(); foreach ($d as $key => $di) { $sum -= $di; diff --git a/Algorithm/Clustering/PointInterface.php b/Algorithm/Clustering/PointInterface.php index 03c4a6a78..037b83b68 100644 --- a/Algorithm/Clustering/PointInterface.php +++ b/Algorithm/Clustering/PointInterface.php @@ -18,8 +18,8 @@ namespace phpOMS\Algorithm\Clustering; /** * Point interface. * - * @property int $group Group - * @property string $name Name + * @property int $group Group + * @property string $name Name * * @package phpOMS\Algorithm\Clustering; * @license OMS License 1.0 diff --git a/Algorithm/CoinMatching/MinimumCoinProblem.php b/Algorithm/CoinMatching/MinimumCoinProblem.php index 24b674153..f17886309 100644 --- a/Algorithm/CoinMatching/MinimumCoinProblem.php +++ b/Algorithm/CoinMatching/MinimumCoinProblem.php @@ -65,7 +65,7 @@ final class MinimumCoinProblem && $subRes + 1 < $table[$i] ) { $table[$i] = $subRes + 1; - $usedCoins[$i] = $coins[$j] === null ? ($usedCoins[$i] ?? []) : \array_merge($usedCoins[$i - $coins[$j]] ?? [], [$coins[$j]]); + $usedCoins[$i] = $coins[$j] === null ? ($usedCoins[$i] ?? []) : array_merge($usedCoins[$i - $coins[$j]] ?? [], [$coins[$j]]); } } } diff --git a/Algorithm/JobScheduling/Weighted.php b/Algorithm/JobScheduling/Weighted.php index 03cb5d5b0..e12dfcae2 100644 --- a/Algorithm/JobScheduling/Weighted.php +++ b/Algorithm/JobScheduling/Weighted.php @@ -114,7 +114,7 @@ final class Weighted return $jobs; } - \usort($jobs, [self::class, 'sortByEnd']); + usort($jobs, [self::class, 'sortByEnd']); $valueTable = [$jobs[0]->getValue()]; @@ -128,7 +128,7 @@ final class Weighted if ($l != -1) { $value += $valueTable[$l]; - $jList = \array_merge($resultTable[$l], $jList); + $jList = array_merge($resultTable[$l], $jList); } if ($value > $valueTable[$i - 1]) { diff --git a/Algorithm/Knapsack/Bounded.php b/Algorithm/Knapsack/Bounded.php index 4351d6f0a..5349ef3ed 100644 --- a/Algorithm/Knapsack/Bounded.php +++ b/Algorithm/Knapsack/Bounded.php @@ -55,7 +55,7 @@ final class Bounded // @var int<0, max> $maxCost $maxCost = (int) $backpack->getMaxCost(); - $mm = \array_fill(0, ($maxCost + 1), 0); + $mm = array_fill(0, ($maxCost + 1), 0); $m = []; $m[0] = $mm; diff --git a/Algorithm/Knapsack/Continuous.php b/Algorithm/Knapsack/Continuous.php index a57917dd0..046039768 100644 --- a/Algorithm/Knapsack/Continuous.php +++ b/Algorithm/Knapsack/Continuous.php @@ -62,7 +62,7 @@ final class Continuous */ public static function solve(array $items, BackpackInterface $backpack) : BackpackInterface { - \usort($items, ['self', 'continuousComparator']); + usort($items, ['self', 'continuousComparator']); $availableSpace = $backpack->getMaxCost(); @@ -73,7 +73,7 @@ final class Continuous $backpack->addItem( $item['item'], - $quantity = \min($item['quantity'], $availableSpace / $item['item']->getCost()) + $quantity = min($item['quantity'], $availableSpace / $item['item']->getCost()) ); $availableSpace -= $quantity * $item['item']->getCost(); diff --git a/Algorithm/Maze/MazeGenerator.php b/Algorithm/Maze/MazeGenerator.php index 8011e9c03..716b24464 100644 --- a/Algorithm/Maze/MazeGenerator.php +++ b/Algorithm/Maze/MazeGenerator.php @@ -48,10 +48,10 @@ class MazeGenerator public static function random(int $width, int $height) : array { $n = $height * $width - 1; - $horizontal = \array_fill(0, $height, []); - $vertical = \array_fill(0, $height, []); + $horizontal = array_fill(0, $height, []); + $vertical = array_fill(0, $height, []); - $pos = [\mt_rand(0, $height) - 1, \mt_rand(0, $width) - 1]; + $pos = [mt_rand(0, $height) - 1, mt_rand(0, $width) - 1]; $path = [$pos]; $unvisited = []; @@ -82,7 +82,7 @@ class MazeGenerator if (!empty($neighbors)) { --$n; - $next = $neighbors[\mt_rand(0, \count($neighbors) - 1)]; + $next = $neighbors[mt_rand(0, \count($neighbors) - 1)]; $unvisited[$next[0] + 1][$next[1] + 1] = false; if ($next[0] === $pos[0]) { @@ -94,7 +94,7 @@ class MazeGenerator $path[] = $next; $pos = $next; } else { - $pos = \array_pop($path); + $pos = array_pop($path); if ($pos === null) { break; // @codeCoverageIgnore @@ -111,7 +111,7 @@ class MazeGenerator if ($j % 4 === 0) { $line[$j] = '+'; // 9 } else { - $line[$j] = $i > 0 && ($vertical[$i / 2 - 1][(int) \floor($j / 4)] ?? false) ? ' ' : '-'; // 9 + $line[$j] = $i > 0 && ($vertical[$i / 2 - 1][(int) floor($j / 4)] ?? false) ? ' ' : '-'; // 9 } } } else { diff --git a/Algorithm/PathFinding/AStar.php b/Algorithm/PathFinding/AStar.php index 41e60b53a..b482ee1f1 100644 --- a/Algorithm/PathFinding/AStar.php +++ b/Algorithm/PathFinding/AStar.php @@ -79,7 +79,7 @@ final class AStar implements PathFinderInterface continue; } - $ng = $node->getG() + (($neighbor->getX() - $node->getX() === 0 || $neighbor->getY() - $node->getY() === 0) ? 1 : \sqrt(2)); + $ng = $node->getG() + (($neighbor->getX() - $node->getX() === 0 || $neighbor->getY() - $node->getY() === 0) ? 1 : sqrt(2)); if (!$neighbor->isOpened() || $ng < $neighbor->getG()) { $neighbor->setG($ng); diff --git a/Algorithm/PathFinding/JumpPointSearch.php b/Algorithm/PathFinding/JumpPointSearch.php index 1429d7a33..2ecfe2fcc 100644 --- a/Algorithm/PathFinding/JumpPointSearch.php +++ b/Algorithm/PathFinding/JumpPointSearch.php @@ -183,9 +183,9 @@ final class JumpPointSearch implements PathFinderInterface $py = $node->parent->getY(); /** @var int $dx */ - $dx = ($x - $px) / \max(\abs($x - $px), 1); + $dx = ($x - $px) / max(abs($x - $px), 1); /** @var int $dy */ - $dy = ($y - $py) / \max(\abs($y - $py), 1); + $dy = ($y - $py) / max(abs($y - $py), 1); $neighbors = []; if ($dx !== 0) { @@ -241,9 +241,9 @@ final class JumpPointSearch implements PathFinderInterface $py = $node->parent->getY(); /** @var int $dx */ - $dx = ($x - $px) / \max(\abs($x - $px), 1); + $dx = ($x - $px) / max(abs($x - $px), 1); /** @var int $dy */ - $dy = ($y - $py) / \max(\abs($y - $py), 1); + $dy = ($y - $py) / max(abs($y - $py), 1); $neighbors = []; if ($dx !== 0 && $dy !== 0) { @@ -319,9 +319,9 @@ final class JumpPointSearch implements PathFinderInterface $py = $node->parent->getY(); /** @var int $dx */ - $dx = ($x - $px) / \max(\abs($x - $px), 1); + $dx = ($x - $px) / max(abs($x - $px), 1); /** @var int $dy */ - $dy = ($y - $py) / \max(\abs($y - $py), 1); + $dy = ($y - $py) / max(abs($y - $py), 1); $neighbors = []; if ($dx !== 0 && $dy !== 0) { @@ -393,9 +393,9 @@ final class JumpPointSearch implements PathFinderInterface $py = $node->parent->getY(); /** @var int $dx */ - $dx = ($x - $px) / \max(\abs($x - $px), 1); + $dx = ($x - $px) / max(abs($x - $px), 1); /** @var int $dy */ - $dy = ($y - $py) / \max(\abs($y - $py), 1); + $dy = ($y - $py) / max(abs($y - $py), 1); $neighbors = []; if ($dx !== 0 && $dy !== 0) { diff --git a/Algorithm/PathFinding/Path.php b/Algorithm/PathFinding/Path.php index c686a643e..b0e687c71 100644 --- a/Algorithm/PathFinding/Path.php +++ b/Algorithm/PathFinding/Path.php @@ -104,7 +104,7 @@ class Path $dx = $this->nodes[$i - 1]->getX() - $this->nodes[$i]->getX(); $dy = $this->nodes[$i - 1]->getY() - $this->nodes[$i]->getY(); - $dist += \sqrt($dx * $dx + $dy * $dy); + $dist += sqrt($dx * $dx + $dy * $dy); } return $dist; @@ -149,7 +149,7 @@ class Path $coord1 = $reverse[$i + 1]; $interpolated = $this->interpolate($coord0, $coord1); - $expanded = \array_merge($expanded, $interpolated); + $expanded = array_merge($expanded, $interpolated); } $expanded[] = $reverse[$length - 1]; @@ -174,8 +174,8 @@ class Path */ private function interpolate(Node $node1, Node $node2) : array { - $dx = \abs($node2->getX() - $node1->getX()); - $dy = \abs($node2->getY() - $node1->getY()); + $dx = abs($node2->getX() - $node1->getX()); + $dy = abs($node2->getY() - $node1->getY()); $sx = ($node1->getX() < $node2->getX()) ? 1 : -1; $sy = ($node1->getY() < $node2->getY()) ? 1 : -1; diff --git a/Algorithm/Sort/BitonicSort.php b/Algorithm/Sort/BitonicSort.php index 9b83daa66..2f9846949 100644 --- a/Algorithm/Sort/BitonicSort.php +++ b/Algorithm/Sort/BitonicSort.php @@ -48,7 +48,7 @@ final class BitonicSort implements SortInterface $first = self::sort(\array_slice($list, 0, (int) ($n / 2)), SortOrder::ASC); $second = self::sort(\array_slice($list, (int) ($n / 2)), SortOrder::DESC); - return self::merge(\array_merge($first, $second), $order); + return self::merge(array_merge($first, $second), $order); } /** @@ -81,6 +81,6 @@ final class BitonicSort implements SortInterface $first = self::merge(\array_slice($list, 0, (int) ($n / 2)), $order); $second = self::merge(\array_slice($list, (int) ($n / 2)), $order); - return \array_merge($first, $second); + return array_merge($first, $second); } } diff --git a/Algorithm/Sort/BucketSort.php b/Algorithm/Sort/BucketSort.php index 42e886708..15908db41 100644 --- a/Algorithm/Sort/BucketSort.php +++ b/Algorithm/Sort/BucketSort.php @@ -50,7 +50,7 @@ final class BucketSort } foreach ($list as $element) { - $buckets[(int) \floor(($bucketCount - 1) * $element->getValue() / $M)][] = $element; + $buckets[(int) floor(($bucketCount - 1) * $element->getValue() / $M)][] = $element; } $sorted = []; @@ -58,6 +58,6 @@ final class BucketSort $sorted[] = $algo::sort($bucket, SortOrder::ASC); } - return $order === SortOrder::ASC ? \array_merge(...$sorted) : \array_reverse(\array_merge(...$sorted), false); + return $order === SortOrder::ASC ? array_merge(...$sorted) : array_reverse(array_merge(...$sorted), false); } } diff --git a/Algorithm/Sort/CombSort.php b/Algorithm/Sort/CombSort.php index 2eac7c4ab..d33030c68 100644 --- a/Algorithm/Sort/CombSort.php +++ b/Algorithm/Sort/CombSort.php @@ -49,7 +49,7 @@ final class CombSort implements SortInterface } while (!$sorted) { - $gap = (int) \floor($gap / $shrink); + $gap = (int) floor($gap / $shrink); if ($gap < 2) { $gap = 1; diff --git a/Algorithm/Sort/IntroSort.php b/Algorithm/Sort/IntroSort.php index 043b44674..3e1a42bed 100644 --- a/Algorithm/Sort/IntroSort.php +++ b/Algorithm/Sort/IntroSort.php @@ -46,7 +46,7 @@ final class IntroSort implements SortInterface return InsertionSort::sort($clone, $order); } - if ($size > \log(\count($list)) * 2) { + if ($size > log(\count($list)) * 2) { return HeapSort::sort($clone, $order); } diff --git a/Algorithm/Sort/TimSort.php b/Algorithm/Sort/TimSort.php index acc0b12f3..0021f43d5 100644 --- a/Algorithm/Sort/TimSort.php +++ b/Algorithm/Sort/TimSort.php @@ -45,7 +45,7 @@ final class TimSort implements SortInterface for ($lo = 0; $lo < $n; $lo += self::BLOCKS) { // insertion sort - $hi = \min($lo + 31, $n - 1); + $hi = min($lo + 31, $n - 1); for ($j = $lo + 1; $j <= $hi; ++$j) { $temp = $list[$j]; $c = $j - 1; @@ -63,7 +63,7 @@ final class TimSort implements SortInterface for ($lo = 0; $lo < $n; $lo += 2 * $size) { // merge sort $mi = $lo + $size - 1; - $hi = \min($lo + 2 * $size - 1, $n - 1); + $hi = min($lo + 2 * $size - 1, $n - 1); $n1 = $mi - $lo + 1; $n2 = $hi - $mi; diff --git a/Application/ApplicationAbstract.php b/Application/ApplicationAbstract.php index 13e3016ef..6803388e8 100644 --- a/Application/ApplicationAbstract.php +++ b/Application/ApplicationAbstract.php @@ -35,21 +35,21 @@ use phpOMS\Router\RouterInterface; * is restricted to write once in order to prevent manipulation * and afterwards read only. * - * @property string $appName - * @property int $orgId - * @property \phpOMS\DataStorage\Database\DatabasePool $dbPool - * @property \phpOMS\Localization\L11nManager $l11nManager - * @property \phpOMS\Localization\Localization $l11nServer - * @property \phpOMS\Router\RouterInterface $router + * @property string $appName + * @property int $orgId + * @property \phpOMS\DataStorage\Database\DatabasePool $dbPool + * @property \phpOMS\Localization\L11nManager $l11nManager + * @property \phpOMS\Localization\Localization $l11nServer + * @property \phpOMS\Router\RouterInterface $router * @property \phpOMS\DataStorage\Session\SessionInterface $sessionManager - * @property \phpOMS\DataStorage\Cookie\CookieJar $cookieJar - * @property \phpOMS\Module\ModuleManager $moduleManager - * @property \phpOMS\Dispatcher\Dispatcher $dispatcher - * @property \phpOMS\DataStorage\Cache\CachePool $cachePool - * @property \phpOMS\Config\SettingsInterface $appSettings - * @property \phpOMS\Event\EventManager $eventManager - * @property \phpOMS\Account\AccountManager $accountManager - * @property \phpOMS\Log\FileLogger $logger + * @property \phpOMS\DataStorage\Cookie\CookieJar $cookieJar + * @property \phpOMS\Module\ModuleManager $moduleManager + * @property \phpOMS\Dispatcher\Dispatcher $dispatcher + * @property \phpOMS\DataStorage\Cache\CachePool $cachePool + * @property \phpOMS\Config\SettingsInterface $appSettings + * @property \phpOMS\Event\EventManager $eventManager + * @property \phpOMS\Account\AccountManager $accountManager + * @property \phpOMS\Log\FileLogger $logger * * @package phpOMS\Application * @license OMS License 1.0 diff --git a/Application/ApplicationInfo.php b/Application/ApplicationInfo.php index e89913f6c..802fa2da2 100644 --- a/Application/ApplicationInfo.php +++ b/Application/ApplicationInfo.php @@ -80,14 +80,14 @@ final class ApplicationInfo */ public function load() : void { - if (!\is_file($this->path)) { + if (!is_file($this->path)) { throw new PathException($this->path); } - $contents = \file_get_contents($this->path); + $contents = file_get_contents($this->path); /** @var array{name:array{id:int, internal:string, external:string}, category:string, vision:string, requirements:array, creator:array{name:string, website:string}, description:string, directory:string, dependencies:array} $info */ - $info = \json_decode($contents === false ? '[]' : $contents, true); + $info = json_decode($contents === false ? '[]' : $contents, true); $this->info = $info === false ? [] : $info; } @@ -100,11 +100,11 @@ final class ApplicationInfo */ public function update() : void { - if (!\is_file($this->path)) { + if (!is_file($this->path)) { throw new PathException($this->path); } - \file_put_contents($this->path, \json_encode($this->info, \JSON_PRETTY_PRINT)); + file_put_contents($this->path, json_encode($this->info, \JSON_PRETTY_PRINT)); } /** @@ -120,7 +120,7 @@ final class ApplicationInfo */ public function set(string $path, mixed $data, string $delim = '/') : void { - if (!\is_scalar($data) && !\is_array($data) && !($data instanceof \JsonSerializable)) { + if (!is_scalar($data) && !\is_array($data) && !($data instanceof \JsonSerializable)) { throw new \InvalidArgumentException('Type of $data "' . \gettype($data) . '" is not supported.'); } diff --git a/Application/ApplicationManager.php b/Application/ApplicationManager.php index 0784d051c..1184fc583 100644 --- a/Application/ApplicationManager.php +++ b/Application/ApplicationManager.php @@ -70,7 +70,7 @@ final class ApplicationManager */ private function loadInfo(string $appPath) : ApplicationInfo { - $path = \realpath($appPath); + $path = realpath($appPath); if ($path === false) { throw new PathException($appPath); } @@ -94,15 +94,15 @@ final class ApplicationManager */ public function install(string $source, string $destination, string $theme = 'Default') : bool { - $destination = \rtrim($destination, '\\/'); - $source = \rtrim($source, '/\\'); + $destination = rtrim($destination, '\\/'); + $source = rtrim($source, '/\\'); - if (!\is_dir(\dirname($destination))) { + if (!is_dir(\dirname($destination))) { Directory::create(\dirname($destination), 0755, true); } - if (!\is_dir($source) || ($path = \realpath($destination)) === false - || !\is_file($source . '/Admin/Installer.php') + if (!is_dir($source) || ($path = realpath($destination)) === false + || !is_file($source . '/Admin/Installer.php') ) { return false; } @@ -114,10 +114,10 @@ final class ApplicationManager $this->installFiles($source, $destination); $this->replacePlaceholder($destination); - $classPath = \substr($path . '/Admin/Installer', (int) \strlen((string) \realpath(__DIR__ . '/../../'))); + $classPath = substr($path . '/Admin/Installer', (int) \strlen((string) realpath(__DIR__ . '/../../'))); // @var class-string $class - $class = \str_replace('/', '\\', $classPath); + $class = str_replace('/', '\\', $classPath); $class::install($this->app->dbPool, $info, $this->app->appSettings); return true; @@ -137,8 +137,8 @@ final class ApplicationManager */ public function uninstall(string $source) : bool { - $source = \rtrim($source, '/\\'); - if (($path = \realpath($source)) === false || !\is_file($source . '/Admin/Uninstaller.php')) { + $source = rtrim($source, '/\\'); + if (($path = realpath($source)) === false || !is_file($source . '/Admin/Uninstaller.php')) { return false; } @@ -146,10 +146,10 @@ final class ApplicationManager $info = $this->loadInfo($source . '/info.json'); $this->installed[$info->getInternalName()] = $info; - $classPath = \substr($path . '/Admin/Uninstaller', (int) \strlen((string) \realpath(__DIR__ . '/../../'))); + $classPath = substr($path . '/Admin/Uninstaller', (int) \strlen((string) realpath(__DIR__ . '/../../'))); // @var class-string $class - $class = \str_replace('/', '\\', $classPath); + $class = str_replace('/', '\\', $classPath); $class::uninstall($this->app->dbPool, $info, $this->app->appSettings); $this->uninstallFiles($source); @@ -176,13 +176,13 @@ final class ApplicationManager return; } - if (($path = \realpath($appPath)) === false) { + if (($path = realpath($appPath)) === false) { return; // @codeCoverageIgnore } // @var class-string $class - $classPath = \substr($path . '/Admin/Installer', (int) \strlen((string) \realpath(__DIR__ . '/../../'))); - $class = \str_replace('/', '\\', $classPath); + $classPath = substr($path . '/Admin/Installer', (int) \strlen((string) realpath(__DIR__ . '/../../'))); + $class = str_replace('/', '\\', $classPath); /** @var $class InstallerAbstract */ $class::reInit($info); @@ -233,14 +233,14 @@ final class ApplicationManager public function getInstalledApplications(bool $useCache = true, string $basePath = __DIR__ . '/../../Web') : array { if (empty($this->installed) || !$useCache) { - $apps = \scandir($basePath); + $apps = scandir($basePath); if ($apps === false) { return $this->installed; // @codeCoverageIgnore } foreach ($apps as $app) { - if ($app === '.' || $app === '..' || !\is_file($basePath . '/' . $app . '/info.json')) { + if ($app === '.' || $app === '..' || !is_file($basePath . '/' . $app . '/info.json')) { continue; } @@ -293,16 +293,16 @@ final class ApplicationManager { $files = Directory::list($destination, '*', true); foreach ($files as $file) { - if (!\is_file($destination . '/' . $file)) { + if (!is_file($destination . '/' . $file)) { continue; } - $content = \file_get_contents($destination . '/' . $file); + $content = file_get_contents($destination . '/' . $file); if ($content === false) { continue; // @codeCoverageIgnore } - \file_put_contents($destination . '/' . $file, \str_replace('{APPNAME}', \basename($destination), $content)); + file_put_contents($destination . '/' . $file, str_replace('{APPNAME}', basename($destination), $content)); } } } diff --git a/Application/InstallerAbstract.php b/Application/InstallerAbstract.php index dfbdb42f2..10ac6cf13 100644 --- a/Application/InstallerAbstract.php +++ b/Application/InstallerAbstract.php @@ -68,21 +68,21 @@ abstract class InstallerAbstract */ public static function installTheme(string $destination, string $theme) : void { - if (!\is_dir($path = $destination . '/Themes/' . $theme)) { + if (!is_dir($path = $destination . '/Themes/' . $theme)) { return; } - $dirs = \scandir($path); + $dirs = scandir($path); if ($dirs === false) { return; // @codeCoverageIgnore } foreach ($dirs as $dir) { - if (!\is_dir($path. '/' . $dir) || $dir === '.' || $dir === '..') { + if (!is_dir($path. '/' . $dir) || $dir === '.' || $dir === '..') { continue; } - if (\is_dir($destination . '/' . $dir)) { + if (is_dir($destination . '/' . $dir)) { Directory::delete($destination . '/' . $dir); } @@ -107,16 +107,16 @@ abstract class InstallerAbstract protected static function createTables(DatabasePool $dbPool, ApplicationInfo $info) : void { $path = static::PATH . '/Install/db.json'; - if (!\is_file($path)) { + if (!is_file($path)) { return; } - $content = \file_get_contents($path); + $content = file_get_contents($path); if ($content === false) { return; // @codeCoverageIgnore } - $definitions = \json_decode($content, true); + $definitions = json_decode($content, true); foreach ($definitions as $definition) { SchemaBuilder::createFromSchema($definition, $dbPool->get('schema'))->execute(); } @@ -134,14 +134,14 @@ abstract class InstallerAbstract */ protected static function activate(DatabasePool $dbPool, ApplicationInfo $info) : void { - if (($path = \realpath(static::PATH)) === false) { + if (($path = realpath(static::PATH)) === false) { return; // @codeCoverageIgnore } - $classPath = \substr($path . '/Status', (int) \strlen((string) \realpath(__DIR__ . '/../../'))); + $classPath = substr($path . '/Status', (int) \strlen((string) realpath(__DIR__ . '/../../'))); // @var class-string $class - $class = \str_replace('/', '\\', $classPath); + $class = str_replace('/', '\\', $classPath); if (!Autoloader::exists($class)) { throw new \UnexpectedValueException($class); // @codeCoverageIgnore @@ -161,14 +161,14 @@ abstract class InstallerAbstract */ public static function reInit(ApplicationInfo $info) : void { - if (($path = \realpath(static::PATH)) === false) { + if (($path = realpath(static::PATH)) === false) { return; // @codeCoverageIgnore } - $classPath = \substr($path . '/Status', (int) \strlen((string) \realpath(__DIR__ . '/../../'))); + $classPath = substr($path . '/Status', (int) \strlen((string) realpath(__DIR__ . '/../../'))); // @var class-string $class - $class = \str_replace('/', '\\', $classPath); + $class = str_replace('/', '\\', $classPath); if (!Autoloader::exists($class)) { throw new \UnexpectedValueException($class); // @codeCoverageIgnore diff --git a/Application/StatusAbstract.php b/Application/StatusAbstract.php index 91a26a031..944bf2a03 100644 --- a/Application/StatusAbstract.php +++ b/Application/StatusAbstract.php @@ -101,19 +101,19 @@ abstract class StatusAbstract */ protected static function installRoutesHooks(string $destRoutePath, string $srcRoutePath) : void { - if (!\is_file($srcRoutePath)) { + if (!is_file($srcRoutePath)) { return; } - if (!\is_file($destRoutePath)) { - \file_put_contents($destRoutePath, 'get('schema')); foreach ($definitions as $name => $definition) { diff --git a/Autoloader.php b/Autoloader.php index d740f5399..601e72ae7 100644 --- a/Autoloader.php +++ b/Autoloader.php @@ -14,7 +14,7 @@ declare(strict_types=1); namespace phpOMS; -\spl_autoload_register('\phpOMS\Autoloader::defaultAutoloader'); +spl_autoload_register('\phpOMS\Autoloader::defaultAutoloader'); /** * Autoloader class. @@ -72,11 +72,11 @@ final class Autoloader public static function findPaths(string $class) : array { $found = []; - $class = \ltrim($class, '\\'); - $class = \str_replace(['_', '\\'], '/', $class); + $class = ltrim($class, '\\'); + $class = str_replace(['_', '\\'], '/', $class); foreach (self::$paths as $path) { - if (\is_file($file = $path . $class . '.php')) { + if (is_file($file = $path . $class . '.php')) { $found[] = $file; } } @@ -99,11 +99,11 @@ final class Autoloader */ public static function defaultAutoloader(string $class) : void { - $class = \ltrim($class, '\\'); - $class = \str_replace(['_', '\\'], '/', $class); + $class = ltrim($class, '\\'); + $class = str_replace(['_', '\\'], '/', $class); foreach (self::$paths as $path) { - if (\is_file($file = $path . $class . '.php')) { + if (is_file($file = $path . $class . '.php')) { include $file; return; @@ -124,11 +124,11 @@ final class Autoloader */ public static function exists(string $class) : bool { - $class = \ltrim($class, '\\'); - $class = \str_replace(['_', '\\'], '/', $class); + $class = ltrim($class, '\\'); + $class = str_replace(['_', '\\'], '/', $class); foreach (self::$paths as $path) { - if (\is_file($path . $class . '.php')) { + if (is_file($path . $class . '.php')) { return true; } } @@ -150,14 +150,14 @@ final class Autoloader public static function invalidate(string $class) : bool { if (!\extension_loaded('zend opcache') - || !\opcache_is_script_cached($class) - || \opcache_get_status() === false + || !opcache_is_script_cached($class) + || opcache_get_status() === false ) { return false; } - \opcache_invalidate($class); - \opcache_compile_file($class); + opcache_invalidate($class); + opcache_compile_file($class); return true; } diff --git a/Business/Finance/Depreciation.php b/Business/Finance/Depreciation.php index cc55cc211..750370e50 100644 --- a/Business/Finance/Depreciation.php +++ b/Business/Finance/Depreciation.php @@ -186,7 +186,7 @@ final class Depreciation */ public static function getGeometicProgressiveDepreciationRate(float $start, float $residual, int $duration) : float { - return (1 - \pow($residual / $start, 1 / $duration)); + return (1 - pow($residual / $start, 1 / $duration)); } /** @@ -244,7 +244,7 @@ final class Depreciation */ public static function getGeometicDegressiveDepreciationRate(float $start, float $residual, int $duration) : float { - return (1 - \pow($residual / $start, 1 / $duration)); + return (1 - pow($residual / $start, 1 / $duration)); } /** diff --git a/Business/Finance/FinanceFormulas.php b/Business/Finance/FinanceFormulas.php index 569bff0a6..d2d7b59f1 100644 --- a/Business/Finance/FinanceFormulas.php +++ b/Business/Finance/FinanceFormulas.php @@ -56,7 +56,7 @@ final class FinanceFormulas */ public static function getAnnualPercentageYield(float $r, int $n) : float { - return \pow(1 + $r / $n, $n) - 1; + return pow(1 + $r / $n, $n) - 1; } /** @@ -73,7 +73,7 @@ final class FinanceFormulas */ public static function getStateAnnualInterestRateOfAPY(float $apy, int $n) : float { - return (\pow($apy + 1, 1 / $n) - 1) * $n; + return (pow($apy + 1, 1 / $n) - 1) * $n; } /** @@ -89,7 +89,7 @@ final class FinanceFormulas */ public static function getFutureValueOfAnnuity(float $P, float $r, int $n) : float { - return $P * (\pow(1 + $r, $n) - 1) / $r; + return $P * (pow(1 + $r, $n) - 1) / $r; } /** @@ -105,7 +105,7 @@ final class FinanceFormulas */ public static function getNumberOfPeriodsOfFVA(float $fva, float $P, float $r) : int { - return (int) \round(\log($fva / $P * $r + 1) / \log(1 + $r)); + return (int) round(log($fva / $P * $r + 1) / log(1 + $r)); } /** @@ -121,7 +121,7 @@ final class FinanceFormulas */ public static function getPeriodicPaymentOfFVA(float $fva, float $r, int $n) : float { - return $fva / ((\pow(1 + $r, $n) - 1) / $r); + return $fva / ((pow(1 + $r, $n) - 1) / $r); } /** @@ -137,7 +137,7 @@ final class FinanceFormulas */ public static function getFutureValueOfAnnuityConinuousCompounding(float $cf, float $r, int $t) : float { - return $cf * (\exp($r * $t) - 1) / (\exp($r) - 1); + return $cf * (exp($r * $t) - 1) / (exp($r) - 1); } /** @@ -153,7 +153,7 @@ final class FinanceFormulas */ public static function getCashFlowOfFVACC(float $fvacc, float $r, int $t) : float { - return $fvacc / ((\exp($r * $t) - 1) / (\exp($r) - 1)); + return $fvacc / ((exp($r * $t) - 1) / (exp($r) - 1)); } /** @@ -169,7 +169,7 @@ final class FinanceFormulas */ public static function getTimeOfFVACC(float $fvacc, float $cf, float $r) : int { - return (int) \round(\log($fvacc / $cf * (\exp($r) - 1) + 1) / $r); + return (int) round(log($fvacc / $cf * (exp($r) - 1) + 1) / $r); } /** @@ -185,7 +185,7 @@ final class FinanceFormulas */ public static function getAnnuityPaymentPV(float $pv, float $r, int $n) : float { - return $r * $pv / (1 - \pow(1 + $r, -$n)); + return $r * $pv / (1 - pow(1 + $r, -$n)); } /** @@ -201,7 +201,7 @@ final class FinanceFormulas */ public static function getNumberOfAPPV(float $p, float $pv, float $r) : int { - return (int) \round(-\log(-($r * $pv / $p - 1)) / \log(1 + $r)); + return (int) round(-log(-($r * $pv / $p - 1)) / log(1 + $r)); } /** @@ -217,7 +217,7 @@ final class FinanceFormulas */ public static function getPresentValueOfAPPV(float $p, float $r, int $n) : float { - return $p / $r * (1 - \pow(1 + $r, -$n)); + return $p / $r * (1 - pow(1 + $r, -$n)); } /** @@ -233,7 +233,7 @@ final class FinanceFormulas */ public static function getAnnuityPaymentFV(float $fv, float $r, int $n) : float { - return $r * $fv / (\pow(1 + $r, $n) - 1); + return $r * $fv / (pow(1 + $r, $n) - 1); } /** @@ -249,7 +249,7 @@ final class FinanceFormulas */ public static function getNumberOfAPFV(float $p, float $fv, float $r) : int { - return (int) \round(\log($fv * $r / $p + 1) / \log(1 + $r)); + return (int) round(log($fv * $r / $p + 1) / log(1 + $r)); } /** @@ -265,7 +265,7 @@ final class FinanceFormulas */ public static function getFutureValueOfAPFV(float $p, float $r, int $n) : float { - return $p / $r * (\pow(1 + $r, $n) - 1); + return $p / $r * (pow(1 + $r, $n) - 1); } /** @@ -280,7 +280,7 @@ final class FinanceFormulas */ public static function getAnnutiyPaymentFactorPV(float $r, int $n) : float { - return $r / (1 - \pow(1 + $r, -$n)); + return $r / (1 - pow(1 + $r, -$n)); } /** @@ -295,7 +295,7 @@ final class FinanceFormulas */ public static function getNumberOfAPFPV(float $p, float $r) : int { - return (int) \round(-\log(-($r / $p - 1)) / \log(1 + $r)); + return (int) round(-log(-($r / $p - 1)) / log(1 + $r)); } /** @@ -311,7 +311,7 @@ final class FinanceFormulas */ public static function getPresentValueOfAnnuity(float $P, float $r, int $n) : float { - return $P * (1 - \pow(1 + $r, -$n)) / $r; + return $P * (1 - pow(1 + $r, -$n)) / $r; } /** @@ -327,7 +327,7 @@ final class FinanceFormulas */ public static function getNumberOfPeriodsOfPVA(float $pva, float $P, float $r) : int { - return (int) \round(-\log(-($pva / $P * $r - 1)) / \log(1 + $r)); + return (int) round(-log(-($pva / $P * $r - 1)) / log(1 + $r)); } /** @@ -343,7 +343,7 @@ final class FinanceFormulas */ public static function getPeriodicPaymentOfPVA(float $pva, float $r, int $n) : float { - return $pva / ((1 - \pow(1 + $r, -$n)) / $r); + return $pva / ((1 - pow(1 + $r, -$n)) / $r); } /** @@ -358,7 +358,7 @@ final class FinanceFormulas */ public static function getPresentValueAnnuityFactor(float $r, int $n) : float { - return (1 - \pow(1 + $r, -$n)) / $r; + return (1 - pow(1 + $r, -$n)) / $r; } /** @@ -373,7 +373,7 @@ final class FinanceFormulas */ public static function getPeriodsOfPVAF(float $p, float $r) : int { - return (int) \round(-\log(-($p * $r - 1)) / \log(1 + $r)); + return (int) round(-log(-($p * $r - 1)) / log(1 + $r)); } /** @@ -389,7 +389,7 @@ final class FinanceFormulas */ public static function getPresentValueOfAnnuityDue(float $P, float $r, int $n) : float { - return $P + $P * ((1 - \pow(1 + $r, -($n - 1))) / $r); + return $P + $P * ((1 - pow(1 + $r, -($n - 1))) / $r); } /** @@ -407,7 +407,7 @@ final class FinanceFormulas */ public static function getPeriodicPaymentOfPVAD(float $PV, float $r, int $n) : float { - return $PV * $r / (1 - \pow(1 + $r, -$n)) * 1 / (1 + $r); + return $PV * $r / (1 - pow(1 + $r, -$n)) * 1 / (1 + $r); } /** @@ -423,7 +423,7 @@ final class FinanceFormulas */ public static function getPeriodsOfPVAD(float $PV, float $P, float $r) : int { - return (int) \round(-(\log(-($PV - $P) / $P * $r + 1) / \log(1 + $r) - 1)); + return (int) round(-(log(-($PV - $P) / $P * $r + 1) / log(1 + $r) - 1)); } /** @@ -439,7 +439,7 @@ final class FinanceFormulas */ public static function getFutureValueOfAnnuityDue(float $P, float $r, int $n) : float { - return (1 + $r) * $P * (\pow(1 + $r, $n) - 1) / $r; + return (1 + $r) * $P * (pow(1 + $r, $n) - 1) / $r; } /** @@ -455,7 +455,7 @@ final class FinanceFormulas */ public static function getPeriodicPaymentOfFVAD(float $FV, float $r, int $n) : float { - return $FV / ((1 + $r) * ((\pow(1 + $r, $n) - 1) / $r)); + return $FV / ((1 + $r) * ((pow(1 + $r, $n) - 1) / $r)); } /** @@ -471,7 +471,7 @@ final class FinanceFormulas */ public static function getPeriodsOfFVAD(float $FV, float $P, float $r) : int { - return (int) \round(\log($FV / (1 + $r) / $P * $r + 1) / \log(1 + $r)); + return (int) round(log($FV / (1 + $r) / $P * $r + 1) / log(1 + $r)); } /** @@ -547,7 +547,7 @@ final class FinanceFormulas */ public static function getCompoundInterest(float $P, float $r, int $n) : float { - return $P * (\pow(1 + $r, $n) - 1); + return $P * (pow(1 + $r, $n) - 1); } /** @@ -563,7 +563,7 @@ final class FinanceFormulas */ public static function getPrincipalOfCompundInterest(float $C, float $r, int $n) : float { - return $C / (\pow(1 + $r, $n) - 1); + return $C / (pow(1 + $r, $n) - 1); } /** @@ -579,7 +579,7 @@ final class FinanceFormulas */ public static function getPeriodsOfCompundInterest(float $P, float $C, float $r) : float { - return \log($C / $P + 1) / \log(1 + $r); + return log($C / $P + 1) / log(1 + $r); } /** @@ -595,7 +595,7 @@ final class FinanceFormulas */ public static function getContinuousCompounding(float $P, float $r, int $t) : float { - return $P * \exp($r * $t); + return $P * exp($r * $t); } /** @@ -611,7 +611,7 @@ final class FinanceFormulas */ public static function getPrincipalOfContinuousCompounding(float $C, float $r, int $t) : float { - return $C / \exp($r * $t); + return $C / exp($r * $t); } /** @@ -627,7 +627,7 @@ final class FinanceFormulas */ public static function getPeriodsOfContinuousCompounding(float $P, float $C, float $r) : float { - return \log($C / $P) / $r; + return log($C / $P) / $r; } /** @@ -643,7 +643,7 @@ final class FinanceFormulas */ public static function getRateOfContinuousCompounding(float $P, float $C, float $t) : float { - return \log($C / $P) / $t; + return log($C / $P) / $t; } /** @@ -748,7 +748,7 @@ final class FinanceFormulas */ public static function getDiscountedPaybackPeriod(float $CF, float $O1, float $r) : float { - return \log(1 / (1 - $O1 * $r / $CF)) / \log(1 + $r); + return log(1 / (1 - $O1 * $r / $CF)) / log(1 + $r); } /** @@ -762,7 +762,7 @@ final class FinanceFormulas */ public static function getDoublingTime(float $r) : float { - return \log(2) / \log(1 + $r); + return log(2) / log(1 + $r); } /** @@ -776,7 +776,7 @@ final class FinanceFormulas */ public static function getDoublingRate(float $t) : float { - return \exp(\log(2) / $t) - 1; + return exp(log(2) / $t) - 1; } /** @@ -790,7 +790,7 @@ final class FinanceFormulas */ public static function getDoublingTimeContinuousCompounding(float $r) : float { - return \log(2) / $r; + return log(2) / $r; } /** @@ -804,7 +804,7 @@ final class FinanceFormulas */ public static function getDoublingContinuousCompoundingRate(float $t) : float { - return \log(2) / $t; + return log(2) / $t; } /** @@ -820,7 +820,7 @@ final class FinanceFormulas */ public static function getEquivalentAnnualAnnuity(float $NPV, float $r, int $n) : float { - return $r * $NPV / (1 - \pow(1 + $r, -$n)); + return $r * $NPV / (1 - pow(1 + $r, -$n)); } /** @@ -836,7 +836,7 @@ final class FinanceFormulas */ public static function getPeriodsOfEAA(float $C, float $NPV, float $r) : int { - return (int) \round(-\log(1 - $r * $NPV / $C) / \log(1 + $r)); + return (int) round(-log(1 - $r * $NPV / $C) / log(1 + $r)); } /** @@ -852,7 +852,7 @@ final class FinanceFormulas */ public static function getNetPresentValueOfEAA(float $C, float $r, int $n) : float { - return $C * (1 - \pow(1 + $r, -$n)) / $r; + return $C * (1 - pow(1 + $r, -$n)) / $r; } /** @@ -908,7 +908,7 @@ final class FinanceFormulas */ public static function getFutureValue(float $C, float $r, int $n) : float { - return $C * \pow(1 + $r, $n); + return $C * pow(1 + $r, $n); } /** @@ -924,7 +924,7 @@ final class FinanceFormulas */ public static function getFutureValueContinuousCompounding(float $PV, float $r, int $t) : float { - return $PV * \exp($r * $t); + return $PV * exp($r * $t); } /** @@ -944,7 +944,7 @@ final class FinanceFormulas */ public static function getFutureValueFactor(float $r, int $n) : float { - return \pow(1 + $r, $n); + return pow(1 + $r, $n); } /** @@ -977,7 +977,7 @@ final class FinanceFormulas */ public static function getGrowingAnnuityFV(float $P, float $r, float $g, int $n) : float { - return $P * (\pow(1 + $r, $n) - \pow(1 + $g, $n)) / ($r - $g); + return $P * (pow(1 + $r, $n) - pow(1 + $g, $n)) / ($r - $g); } /** @@ -994,7 +994,7 @@ final class FinanceFormulas */ public static function getGrowingAnnuityPaymentPV(float $PV, float $r, float $g, int $n) : float { - return $PV * ($r - $g) / (1 - \pow((1 + $g) / (1 + $r), $n)); + return $PV * ($r - $g) / (1 - pow((1 + $g) / (1 + $r), $n)); } /** @@ -1011,7 +1011,7 @@ final class FinanceFormulas */ public static function getGrowingAnnuityPaymentFV(float $FV, float $r, float $g, int $n) : float { - return $FV * ($r - $g) / (\pow(1 + $r, $n) - \pow(1 + $g, $n)); + return $FV * ($r - $g) / (pow(1 + $r, $n) - pow(1 + $g, $n)); } /** @@ -1028,7 +1028,7 @@ final class FinanceFormulas */ public static function getGrowingAnnuityPV(float $P, float $r, float $g, int $n) : float { - return $P / ($r - $g) * (1 - \pow((1 + $g) / (1 + $r), $n)); + return $P / ($r - $g) * (1 - pow((1 + $g) / (1 + $r), $n)); } /** @@ -1100,7 +1100,7 @@ final class FinanceFormulas $npv = -$C[0]; for ($i = 1; $i < $count; ++$i) { - $npv += $C[$i] / \pow(1 + $r, $i); + $npv += $C[$i] / pow(1 + $r, $i); } return $npv; @@ -1149,7 +1149,7 @@ final class FinanceFormulas */ public static function getNumberOfPeriodsPVFV(float $FV, float $PV, float $r) : float { - return \log($FV / $PV) / \log(1 + $r); + return log($FV / $PV) / log(1 + $r); } /** @@ -1195,7 +1195,7 @@ final class FinanceFormulas */ public static function getPresentValue(float $C, float $r, int $n) : float { - return $C / \pow(1 + $r, $n); + return $C / pow(1 + $r, $n); } /** @@ -1211,7 +1211,7 @@ final class FinanceFormulas */ public static function getPresentValueContinuousCompounding(float $C, float $r, int $t) : float { - return $C / \exp($r * $t); + return $C / exp($r * $t); } /** @@ -1226,7 +1226,7 @@ final class FinanceFormulas */ public static function getPresentValueFactor(float $r, int $n) : float { - return 1 / \pow(1 + $r, $n); + return 1 / pow(1 + $r, $n); } /** @@ -1410,7 +1410,7 @@ final class FinanceFormulas */ public static function getSimpleInterestTime(float $I, float $P, float $r) : int { - return (int) \round($I / ($P * $r)); + return (int) round($I / ($P * $r)); } /** diff --git a/Business/Finance/Loan.php b/Business/Finance/Loan.php index 41cb379f7..f33dbd7df 100644 --- a/Business/Finance/Loan.php +++ b/Business/Finance/Loan.php @@ -51,7 +51,7 @@ final class Loan */ public static function getPaymentsOnBalloonLoan(float $PV, float $r, int $n, float $balloon = 0.0) : float { - return ($PV - $balloon / \pow(1 + $r, $n)) * $r / (1 - \pow(1 + $r, -$n)); + return ($PV - $balloon / pow(1 + $r, $n)) * $r / (1 - pow(1 + $r, -$n)); } /** @@ -68,7 +68,7 @@ final class Loan */ public static function getBalloonBalanceOfLoan(float $PV, float $P, float $r, int $n) : float { - return $PV * \pow(1 + $r, $n) - $P * (\pow(1 + $r, $n) - 1) / $r; + return $PV * pow(1 + $r, $n) - $P * (pow(1 + $r, $n) - 1) / $r; } /** @@ -84,7 +84,7 @@ final class Loan */ public static function getLoanPayment(float $PV, float $r, int $n) : float { - return $r * $PV / (1 - \pow(1 + $r, -$n)); + return $r * $PV / (1 - pow(1 + $r, -$n)); } /** @@ -101,7 +101,7 @@ final class Loan */ public static function getRemainingBalanceLoan(float $PV, float $P, float $r, int $n) : float { - return $PV * \pow(1 + $r, $n) - $P * (\pow(1 + $r, $n) - 1) / $r; + return $PV * pow(1 + $r, $n) - $P * (pow(1 + $r, $n) - 1) / $r; } /** diff --git a/Business/Finance/Lorenzkurve.php b/Business/Finance/Lorenzkurve.php index 19f36eb7d..094f23481 100644 --- a/Business/Finance/Lorenzkurve.php +++ b/Business/Finance/Lorenzkurve.php @@ -50,7 +50,7 @@ final class Lorenzkurve $i = 1; $n = \count($data); - \sort($data); + sort($data); foreach ($data as $key => $value) { $sum1 += $i * $value; diff --git a/Business/Finance/StockBonds.php b/Business/Finance/StockBonds.php index c766b0a29..f3ea9eb43 100644 --- a/Business/Finance/StockBonds.php +++ b/Business/Finance/StockBonds.php @@ -363,7 +363,7 @@ final class StockBonds */ public static function getZeroCouponBondValue(float $F, float $r, int $t) : float { - return $F / \pow(1 + $r, $t); + return $F / pow(1 + $r, $t); } /** @@ -379,6 +379,6 @@ final class StockBonds */ public static function getZeroCouponBondEffectiveYield(float $F, float $PV, int $n) : float { - return \pow($F / $PV, 1 / $n) - 1; + return pow($F / $PV, 1 / $n) - 1; } } diff --git a/Business/Marketing/ArticleCorrelationAffinity.php b/Business/Marketing/ArticleCorrelationAffinity.php index 6a0ab95aa..b678b608e 100644 --- a/Business/Marketing/ArticleCorrelationAffinity.php +++ b/Business/Marketing/ArticleCorrelationAffinity.php @@ -85,7 +85,7 @@ final class ArticleCorrelationAffinity // sort correlations foreach ($possibleItems as $item) { - \arsort($this->affinity[$item]); + arsort($this->affinity[$item]); } } diff --git a/Business/Marketing/CustomerValue.php b/Business/Marketing/CustomerValue.php index be6d45f20..8af3bf231 100644 --- a/Business/Marketing/CustomerValue.php +++ b/Business/Marketing/CustomerValue.php @@ -57,10 +57,10 @@ final class CustomerValue public static function getMRR(array $revenues, int $periods = 12, float $lowerCutoff = 0.1, float $upperCutoff = 0.0) : float { if ($lowerCutoff === 0.0 && $upperCutoff === 0.0) { - return \array_sum($revenues) / $periods; + return array_sum($revenues) / $periods; } - \sort($revenues); + sort($revenues); $sum = 0.0; foreach ($revenues as $revenue) { diff --git a/Business/Marketing/Metrics.php b/Business/Marketing/Metrics.php index 2407469d7..a0f398f82 100644 --- a/Business/Marketing/Metrics.php +++ b/Business/Marketing/Metrics.php @@ -71,7 +71,7 @@ final class Metrics */ public static function getCoefficientOfRetention(float $retentionRate, float $rc, int $t) : float { - return 1 / $t * \log($rc - $retentionRate); + return 1 / $t * log($rc - $retentionRate); } /** @@ -87,7 +87,7 @@ final class Metrics */ public static function predictCustomerRetention(float $rc, float $r, int $t) : float { - return $rc * (1 - \exp(-$r * $t)); + return $rc * (1 - exp(-$r * $t)); } /** @@ -103,7 +103,7 @@ final class Metrics */ public static function customerActiveProbability(int $purchases, int $periods, int $lastPurchase) : float { - return \pow($lastPurchase / $periods, $purchases); + return pow($lastPurchase / $periods, $purchases); } /** @@ -163,7 +163,7 @@ final class Metrics for ($i = 1; $i < $count + 1; ++$i) { $newP = $newP->mult($P); - $profit = $profit->add($newP->mult($G)->mult(1 / \pow(1 + $discountRate, $i))); + $profit = $profit->add($newP->mult($G)->mult(1 / pow(1 + $discountRate, $i))); } return $profit; @@ -246,7 +246,7 @@ final class Metrics $count = \count($purchaseProbability); for ($i = 0; $i < $count; ++$i) { - $matrix[$i] = \array_fill(0, $count, 0); + $matrix[$i] = array_fill(0, $count, 0); $matrix[$i][0] = $purchaseProbability[$i]; $matrix[$i][ diff --git a/Business/Programming/Metrics.php b/Business/Programming/Metrics.php index c10838144..257ccc812 100644 --- a/Business/Programming/Metrics.php +++ b/Business/Programming/Metrics.php @@ -51,7 +51,7 @@ final class Metrics */ public static function abcScore(int $a, int $b, int $c) : int { - return (int) \sqrt($a * $a + $b * $b + $c * $c); + return (int) sqrt($a * $a + $b * $b + $c * $c); } /** diff --git a/Business/Sales/MarketShareEstimation.php b/Business/Sales/MarketShareEstimation.php index 7a5bbfd2a..b2b858e81 100644 --- a/Business/Sales/MarketShareEstimation.php +++ b/Business/Sales/MarketShareEstimation.php @@ -54,10 +54,10 @@ final class MarketShareEstimation { $sum = 0.0; for ($i = 0; $i < $participants; ++$i) { - $sum += 1 / \pow($i + 1, $modifier); + $sum += 1 / pow($i + 1, $modifier); } - return (int) \round(\pow(1 / ($marketShare * $sum), 1 / $modifier)); + return (int) round(pow(1 / ($marketShare * $sum), 1 / $modifier)); } /** @@ -77,9 +77,9 @@ final class MarketShareEstimation { $sum = 0.0; for ($i = 0; $i < $participants; ++$i) { - $sum += 1 / \pow($i + 1, $modifier); + $sum += 1 / pow($i + 1, $modifier); } - return (1 / \pow($rank, $modifier)) / $sum; + return (1 / pow($rank, $modifier)) / $sum; } } diff --git a/DataStorage/Cache/CachePool.php b/DataStorage/Cache/CachePool.php index bacbb89c3..344567d76 100644 --- a/DataStorage/Cache/CachePool.php +++ b/DataStorage/Cache/CachePool.php @@ -96,7 +96,7 @@ final class CachePool implements DataStoragePoolInterface } if (empty($key)) { - return \reset($this->pool); + return reset($this->pool); } return $this->pool[$key]; diff --git a/DataStorage/Cache/Connection/FileCache.php b/DataStorage/Cache/Connection/FileCache.php index 8731efca8..c2ccffaa5 100644 --- a/DataStorage/Cache/Connection/FileCache.php +++ b/DataStorage/Cache/Connection/FileCache.php @@ -96,13 +96,13 @@ final class FileCache extends ConnectionAbstract Directory::create($data[0], 0766, true); } - if (\realpath($data[0]) === false) { + if (realpath($data[0]) === false) { $this->status = CacheStatus::FAILURE; - throw new InvalidConnectionConfigException((string) \json_encode($this->dbdata)); + throw new InvalidConnectionConfigException((string) json_encode($this->dbdata)); } $this->status = CacheStatus::OK; - $this->con = \realpath($data[0]); + $this->con = realpath($data[0]); } /** @@ -114,7 +114,7 @@ final class FileCache extends ConnectionAbstract return false; } - \array_map('unlink', \glob($this->con . '/*')); + array_map('unlink', glob($this->con . '/*')); return true; } @@ -155,14 +155,14 @@ final class FileCache extends ConnectionAbstract $path = Directory::sanitize((string) $key, self::SANITIZE); - $fp = \fopen($this->con . '/' . \trim($path, '/') . '.cache', 'w+'); - if (\flock($fp, \LOCK_EX)) { - \ftruncate($fp, 0); - \fwrite($fp, $this->build($value, $expire)); - \fflush($fp); - \flock($fp, \LOCK_UN); + $fp = fopen($this->con . '/' . trim($path, '/') . '.cache', 'w+'); + if (flock($fp, \LOCK_EX)) { + ftruncate($fp, 0); + fwrite($fp, $this->build($value, $expire)); + fflush($fp); + flock($fp, \LOCK_UN); } - \fclose($fp); + fclose($fp); } /** @@ -177,14 +177,14 @@ final class FileCache extends ConnectionAbstract $path = $this->getPath($key); if (!File::exists($path)) { - $fp = \fopen($path, 'w+'); - if (\flock($fp, \LOCK_EX)) { - \ftruncate($fp, 0); - \fwrite($fp, $this->build($value, $expire)); - \fflush($fp); - \flock($fp, \LOCK_UN); + $fp = fopen($path, 'w+'); + if (flock($fp, \LOCK_EX)) { + ftruncate($fp, 0); + fwrite($fp, $this->build($value, $expire)); + fflush($fp); + flock($fp, \LOCK_UN); } - \fclose($fp); + fclose($fp); return true; } @@ -227,13 +227,13 @@ final class FileCache extends ConnectionAbstract if ($type === CacheValueType::_INT || $type === CacheValueType::_STRING || $type === CacheValueType::_BOOL) { return (string) $value; } elseif ($type === CacheValueType::_FLOAT) { - return \rtrim(\rtrim(\number_format($value, 5, '.', ''), '0'), '.'); + return rtrim(rtrim(number_format($value, 5, '.', ''), '0'), '.'); } elseif ($type === CacheValueType::_ARRAY) { - return (string) \json_encode($value); + return (string) json_encode($value); } elseif ($type === CacheValueType::_SERIALIZABLE) { return \get_class($value) . self::DELIM . $value->serialize(); } elseif ($type === CacheValueType::_JSONSERIALIZABLE) { - return \get_class($value) . self::DELIM . ((string) \json_encode($value->jsonSerialize())); + return \get_class($value) . self::DELIM . ((string) json_encode($value->jsonSerialize())); } elseif ($type === CacheValueType::_NULL) { return ''; } @@ -252,10 +252,10 @@ final class FileCache extends ConnectionAbstract */ private function getExpire(string $raw) : int { - $expireStart = (int) \strpos($raw, self::DELIM); - $expireEnd = (int) \strpos($raw, self::DELIM, $expireStart + 1); + $expireStart = (int) strpos($raw, self::DELIM); + $expireEnd = (int) strpos($raw, self::DELIM, $expireStart + 1); - return (int) \substr($raw, $expireStart + 1, $expireEnd - ($expireStart + 1)); + return (int) substr($raw, $expireStart + 1, $expireEnd - ($expireStart + 1)); } /** @@ -273,26 +273,26 @@ final class FileCache extends ConnectionAbstract } $created = File::created($path)->getTimestamp(); - $now = \time(); + $now = time(); if ($expire >= 0 && $created + $expire < $now) { return null; } - $raw = \file_get_contents($path); + $raw = file_get_contents($path); if ($raw === false) { return null; // @codeCoverageIgnore } $type = (int) $raw[0]; - $expireStart = (int) \strpos($raw, self::DELIM); - $expireEnd = (int) \strpos($raw, self::DELIM, $expireStart + 1); + $expireStart = (int) strpos($raw, self::DELIM); + $expireEnd = (int) strpos($raw, self::DELIM, $expireStart + 1); if ($expireStart < 0 || $expireEnd < 0) { return null; // @codeCoverageIgnore } - $cacheExpire = \substr($raw, $expireStart + 1, $expireEnd - ($expireStart + 1)); + $cacheExpire = substr($raw, $expireStart + 1, $expireEnd - ($expireStart + 1)); $cacheExpire = ($cacheExpire === -1) ? $created : (int) $cacheExpire; if ($cacheExpire >= 0 && $created + $cacheExpire + ($expire > 0 ? $expire : 0) < $now) { @@ -319,22 +319,22 @@ final class FileCache extends ConnectionAbstract { switch ($type) { case CacheValueType::_INT: - return (int) \substr($raw, $expireEnd + 1); + return (int) substr($raw, $expireEnd + 1); case CacheValueType::_FLOAT: - return (float) \substr($raw, $expireEnd + 1); + return (float) substr($raw, $expireEnd + 1); case CacheValueType::_BOOL: - return (bool) \substr($raw, $expireEnd + 1); + return (bool) substr($raw, $expireEnd + 1); case CacheValueType::_STRING: - return \substr($raw, $expireEnd + 1); + return substr($raw, $expireEnd + 1); case CacheValueType::_ARRAY: - $array = \substr($raw, $expireEnd + 1); - return \json_decode($array === false ? '[]' : $array, true); + $array = substr($raw, $expireEnd + 1); + return json_decode($array === false ? '[]' : $array, true); case CacheValueType::_NULL: return null; case CacheValueType::_JSONSERIALIZABLE: - $namespaceStart = (int) \strpos($raw, self::DELIM, $expireEnd); - $namespaceEnd = (int) \strpos($raw, self::DELIM, $namespaceStart + 1); - $namespace = \substr($raw, $namespaceStart + 1, $namespaceEnd - $namespaceStart - 1); + $namespaceStart = (int) strpos($raw, self::DELIM, $expireEnd); + $namespaceEnd = (int) strpos($raw, self::DELIM, $namespaceStart + 1); + $namespace = substr($raw, $namespaceStart + 1, $namespaceEnd - $namespaceStart - 1); if ($namespace === false) { return null; // @codeCoverageIgnore @@ -342,16 +342,16 @@ final class FileCache extends ConnectionAbstract return new $namespace(); case CacheValueType::_SERIALIZABLE: - $namespaceStart = (int) \strpos($raw, self::DELIM, $expireEnd); - $namespaceEnd = (int) \strpos($raw, self::DELIM, $namespaceStart + 1); - $namespace = \substr($raw, $namespaceStart + 1, $namespaceEnd - $namespaceStart - 1); + $namespaceStart = (int) strpos($raw, self::DELIM, $expireEnd); + $namespaceEnd = (int) strpos($raw, self::DELIM, $namespaceStart + 1); + $namespace = substr($raw, $namespaceStart + 1, $namespaceEnd - $namespaceStart - 1); if ($namespace === false) { return null; // @codeCoverageIgnore } $obj = new $namespace(); - $obj->unserialize(\substr($raw, $namespaceEnd + 1)); + $obj->unserialize(substr($raw, $namespaceEnd + 1)); return $obj; default: @@ -381,8 +381,8 @@ final class FileCache extends ConnectionAbstract if ($expire >= 0) { $created = File::created($path)->getTimestamp(); - $now = \time(); - $raw = \file_get_contents($path); + $now = time(); + $raw = file_get_contents($path); if ($raw === false) { return false; // @codeCoverageIgnore @@ -392,7 +392,7 @@ final class FileCache extends ConnectionAbstract $cacheExpire = ($cacheExpire === -1) ? $created : (int) $cacheExpire; if (($cacheExpire >= 0 && $created + $cacheExpire < $now) - || ($cacheExpire >= 0 && \abs($now - $created) > $expire) + || ($cacheExpire >= 0 && abs($now - $created) > $expire) ) { File::delete($path); @@ -418,26 +418,26 @@ final class FileCache extends ConnectionAbstract } $created = File::created($path)->getTimestamp(); - $now = \time(); + $now = time(); if ($expire >= 0 && $created + $expire < $now) { return false; } - $raw = \file_get_contents($path); + $raw = file_get_contents($path); if ($raw === false) { return false; // @codeCoverageIgnore } $type = (int) $raw[0]; - $expireStart = (int) \strpos($raw, self::DELIM); - $expireEnd = (int) \strpos($raw, self::DELIM, $expireStart + 1); + $expireStart = (int) strpos($raw, self::DELIM); + $expireEnd = (int) strpos($raw, self::DELIM, $expireStart + 1); if ($expireStart < 0 || $expireEnd < 0) { return false; // @codeCoverageIgnore } - $cacheExpire = \substr($raw, $expireStart + 1, $expireEnd - ($expireStart + 1)); + $cacheExpire = substr($raw, $expireStart + 1, $expireEnd - ($expireStart + 1)); $cacheExpire = ($cacheExpire === -1) ? $created : (int) $cacheExpire; if ($cacheExpire >= 0 && $created + $cacheExpire + ($expire > 0 ? $expire : 0) < $now) { @@ -460,22 +460,22 @@ final class FileCache extends ConnectionAbstract } $created = File::created($path)->getTimestamp(); - $now = \time(); + $now = time(); - $raw = \file_get_contents($path); + $raw = file_get_contents($path); if ($raw === false) { return false; // @codeCoverageIgnore } $type = (int) $raw[0]; - $expireStart = (int) \strpos($raw, self::DELIM); - $expireEnd = (int) \strpos($raw, self::DELIM, $expireStart + 1); + $expireStart = (int) strpos($raw, self::DELIM); + $expireEnd = (int) strpos($raw, self::DELIM, $expireStart + 1); if ($expireStart < 0 || $expireEnd < 0) { return false; // @codeCoverageIgnore } - $cacheExpire = \substr($raw, $expireStart + 1, $expireEnd - ($expireStart + 1)); + $cacheExpire = substr($raw, $expireStart + 1, $expireEnd - ($expireStart + 1)); $cacheExpire = ($cacheExpire === -1) ? $created : (int) $cacheExpire; $val = $this->reverseValue($type, $raw, $expireEnd); @@ -495,22 +495,22 @@ final class FileCache extends ConnectionAbstract } $created = File::created($path)->getTimestamp(); - $now = \time(); + $now = time(); - $raw = \file_get_contents($path); + $raw = file_get_contents($path); if ($raw === false) { return false; // @codeCoverageIgnore } $type = (int) $raw[0]; - $expireStart = (int) \strpos($raw, self::DELIM); - $expireEnd = (int) \strpos($raw, self::DELIM, $expireStart + 1); + $expireStart = (int) strpos($raw, self::DELIM); + $expireEnd = (int) strpos($raw, self::DELIM, $expireStart + 1); if ($expireStart < 0 || $expireEnd < 0) { return false; // @codeCoverageIgnore } - $cacheExpire = \substr($raw, $expireStart + 1, $expireEnd - ($expireStart + 1)); + $cacheExpire = substr($raw, $expireStart + 1, $expireEnd - ($expireStart + 1)); $cacheExpire = ($cacheExpire === -1) ? $created : (int) $cacheExpire; $val = $this->reverseValue($type, $raw, $expireEnd); @@ -544,26 +544,26 @@ final class FileCache extends ConnectionAbstract foreach ($files as $path) { $path = $this->con . '/' . $path; $created = File::created($path)->getTimestamp(); - $now = \time(); + $now = time(); if ($expire >= 0 && $created + $expire < $now) { continue; } - $raw = \file_get_contents($path); + $raw = file_get_contents($path); if ($raw === false) { continue; // @codeCoverageIgnore } $type = (int) $raw[0]; - $expireStart = (int) \strpos($raw, self::DELIM); - $expireEnd = (int) \strpos($raw, self::DELIM, $expireStart + 1); + $expireStart = (int) strpos($raw, self::DELIM); + $expireEnd = (int) strpos($raw, self::DELIM, $expireStart + 1); if ($expireStart < 0 || $expireEnd < 0) { continue; // @codeCoverageIgnore } - $cacheExpire = \substr($raw, $expireStart + 1, $expireEnd - ($expireStart + 1)); + $cacheExpire = substr($raw, $expireStart + 1, $expireEnd - ($expireStart + 1)); $cacheExpire = ($cacheExpire === -1) ? $created : (int) $cacheExpire; if ($cacheExpire >= 0 && $created + $cacheExpire + ($expire > 0 ? $expire : 0) < $now) { @@ -600,8 +600,8 @@ final class FileCache extends ConnectionAbstract if ($expire >= 0) { $created = File::created($path)->getTimestamp(); - $now = \time(); - $raw = \file_get_contents($path); + $now = time(); + $raw = file_get_contents($path); if ($raw === false) { continue; // @codeCoverageIgnore @@ -611,7 +611,7 @@ final class FileCache extends ConnectionAbstract $cacheExpire = ($cacheExpire === -1) ? $created : (int) $cacheExpire; if (($cacheExpire >= 0 && $created + $cacheExpire < $now) - || ($cacheExpire >= 0 && \abs($now - $created) > $expire) + || ($cacheExpire >= 0 && abs($now - $created) > $expire) ) { File::delete($path); @@ -645,7 +645,7 @@ final class FileCache extends ConnectionAbstract } $dir = new Directory($this->con); - $now = \time(); + $now = time(); foreach ($dir as $file) { if ($file instanceof File) { @@ -673,14 +673,14 @@ final class FileCache extends ConnectionAbstract $path = $this->getPath($key); if (File::exists($path)) { - $fp = \fopen($path, 'w+'); - if (\flock($fp, \LOCK_EX)) { - \ftruncate($fp, 0); - \fwrite($fp, $this->build($value, $expire)); - \fflush($fp); - \flock($fp, \LOCK_UN); + $fp = fopen($path, 'w+'); + if (flock($fp, \LOCK_EX)) { + ftruncate($fp, 0); + fwrite($fp, $this->build($value, $expire)); + fflush($fp); + flock($fp, \LOCK_UN); } - \fclose($fp); + fclose($fp); return true; } @@ -700,6 +700,6 @@ final class FileCache extends ConnectionAbstract private function getPath(int | string $key) : string { $path = Directory::sanitize((string) $key, self::SANITIZE); - return $this->con . '/' . \trim($path, '/') . '.cache'; + return $this->con . '/' . trim($path, '/') . '.cache'; } } diff --git a/DataStorage/Cache/Connection/MemCached.php b/DataStorage/Cache/Connection/MemCached.php index b481d49e2..56f6f3d92 100644 --- a/DataStorage/Cache/Connection/MemCached.php +++ b/DataStorage/Cache/Connection/MemCached.php @@ -77,7 +77,7 @@ final class MemCached extends ConnectionAbstract if (!isset($this->dbdata['host'], $this->dbdata['port'])) { $this->status = CacheStatus::FAILURE; - throw new InvalidConnectionConfigException((string) \json_encode($this->dbdata)); + throw new InvalidConnectionConfigException((string) json_encode($this->dbdata)); } $this->con->addServer($this->dbdata['host'], $this->dbdata['port']); @@ -94,11 +94,11 @@ final class MemCached extends ConnectionAbstract return; } - if (!(\is_scalar($value) || $value === null || \is_array($value) || $value instanceof \JsonSerializable || $value instanceof \Serializable)) { + if (!(is_scalar($value) || $value === null || \is_array($value) || $value instanceof \JsonSerializable || $value instanceof \Serializable)) { throw new \InvalidArgumentException(); } - $this->con->set((string) $key, $value, \max($expire, 0)); + $this->con->set((string) $key, $value, max($expire, 0)); } /** @@ -110,11 +110,11 @@ final class MemCached extends ConnectionAbstract return false; } - if (!(\is_scalar($value) || $value === null || \is_array($value) || $value instanceof \JsonSerializable || $value instanceof \Serializable)) { + if (!(is_scalar($value) || $value === null || \is_array($value) || $value instanceof \JsonSerializable || $value instanceof \Serializable)) { throw new \InvalidArgumentException(); } - return $this->con->add((string) $key, $value, \max($expire, 0)); + return $this->con->add((string) $key, $value, max($expire, 0)); } /** @@ -202,11 +202,11 @@ final class MemCached extends ConnectionAbstract $values = []; foreach ($keys as $key) { - if (\preg_match('/' . $pattern . '/', $key) === 1) { + if (preg_match('/' . $pattern . '/', $key) === 1) { $result = $this->con->get($key); if (\is_string($result)) { $type = (int) $result[0]; - $start = (int) \strpos($result, self::DELIM); + $start = (int) strpos($result, self::DELIM); $result = $this->reverseValue($type, $result, $start); } @@ -232,22 +232,22 @@ final class MemCached extends ConnectionAbstract { switch ($type) { case CacheValueType::_INT: - return (int) \substr($raw, $expireEnd + 1); + return (int) substr($raw, $expireEnd + 1); case CacheValueType::_FLOAT: - return (float) \substr($raw, $expireEnd + 1); + return (float) substr($raw, $expireEnd + 1); case CacheValueType::_BOOL: - return (bool) \substr($raw, $expireEnd + 1); + return (bool) substr($raw, $expireEnd + 1); case CacheValueType::_STRING: - return \substr($raw, $expireEnd + 1); + return substr($raw, $expireEnd + 1); case CacheValueType::_ARRAY: - $array = \substr($raw, $expireEnd + 1); - return \json_decode($array === false ? '[]' : $array, true); + $array = substr($raw, $expireEnd + 1); + return json_decode($array === false ? '[]' : $array, true); case CacheValueType::_NULL: return null; case CacheValueType::_JSONSERIALIZABLE: - $namespaceStart = (int) \strpos($raw, self::DELIM, $expireEnd); - $namespaceEnd = (int) \strpos($raw, self::DELIM, $namespaceStart + 1); - $namespace = \substr($raw, $namespaceStart + 1, $namespaceEnd - $namespaceStart - 1); + $namespaceStart = (int) strpos($raw, self::DELIM, $expireEnd); + $namespaceEnd = (int) strpos($raw, self::DELIM, $namespaceStart + 1); + $namespace = substr($raw, $namespaceStart + 1, $namespaceEnd - $namespaceStart - 1); if ($namespace === false) { return null; // @codeCoverageIgnore @@ -255,16 +255,16 @@ final class MemCached extends ConnectionAbstract return new $namespace(); case CacheValueType::_SERIALIZABLE: - $namespaceStart = (int) \strpos($raw, self::DELIM, $expireEnd); - $namespaceEnd = (int) \strpos($raw, self::DELIM, $namespaceStart + 1); - $namespace = \substr($raw, $namespaceStart + 1, $namespaceEnd - $namespaceStart - 1); + $namespaceStart = (int) strpos($raw, self::DELIM, $expireEnd); + $namespaceEnd = (int) strpos($raw, self::DELIM, $namespaceStart + 1); + $namespace = substr($raw, $namespaceStart + 1, $namespaceEnd - $namespaceStart - 1); if ($namespace === false) { return null; // @codeCoverageIgnore } $obj = new $namespace(); - $obj->unserialize(\substr($raw, $namespaceEnd + 1)); + $obj->unserialize(substr($raw, $namespaceEnd + 1)); return $obj; default: @@ -283,7 +283,7 @@ final class MemCached extends ConnectionAbstract $keys = $this->con->getAllKeys(); foreach ($keys as $key) { - if (\preg_match('/' . $pattern . '/', $key) === 1) { + if (preg_match('/' . $pattern . '/', $key) === 1) { $this->con->delete($key); } } @@ -334,7 +334,7 @@ final class MemCached extends ConnectionAbstract return false; } - return $this->con->replace((string) $key, $value, \max($expire, 0)); + return $this->con->replace((string) $key, $value, max($expire, 0)); } /** @@ -347,7 +347,7 @@ final class MemCached extends ConnectionAbstract } $stat = $this->con->getStats(); - $temp = \reset($stat); + $temp = reset($stat); $stats = []; $stats['status'] = $this->status; diff --git a/DataStorage/Cache/Connection/RedisCache.php b/DataStorage/Cache/Connection/RedisCache.php index 93d44738b..da80ba52e 100644 --- a/DataStorage/Cache/Connection/RedisCache.php +++ b/DataStorage/Cache/Connection/RedisCache.php @@ -70,7 +70,7 @@ final class RedisCache extends ConnectionAbstract if (!isset($this->dbdata['host'], $this->dbdata['port'], $this->dbdata['db'])) { $this->status = CacheStatus::FAILURE; - throw new InvalidConnectionConfigException((string) \json_encode($this->dbdata)); + throw new InvalidConnectionConfigException((string) json_encode($this->dbdata)); } $this->con->connect($this->dbdata['host'], $this->dbdata['port']); @@ -148,7 +148,7 @@ final class RedisCache extends ConnectionAbstract if (\is_string($result)) { $type = (int) $result[0]; - $start = (int) \strpos($result, self::DELIM); + $start = (int) strpos($result, self::DELIM); $result = $this->reverseValue($type, $result, $start); } @@ -224,11 +224,11 @@ final class RedisCache extends ConnectionAbstract $values = []; foreach ($keys as $key) { - if (\preg_match('/' . $pattern . '/', $key) === 1) { + if (preg_match('/' . $pattern . '/', $key) === 1) { $result = $this->con->get((string) $key); if (\is_string($result)) { $type = (int) $result[0]; - $start = (int) \strpos($result, self::DELIM); + $start = (int) strpos($result, self::DELIM); $result = $this->reverseValue($type, $result, $start); } @@ -250,7 +250,7 @@ final class RedisCache extends ConnectionAbstract $keys = $this->con->keys('*'); foreach ($keys as $key) { - if (\preg_match('/' . $pattern . '/', $key) === 1) { + if (preg_match('/' . $pattern . '/', $key) === 1) { $this->con->del($key); } } @@ -381,13 +381,13 @@ final class RedisCache extends ConnectionAbstract if ($type === CacheValueType::_INT || $type === CacheValueType::_STRING || $type === CacheValueType::_BOOL) { return (string) $value; } elseif ($type === CacheValueType::_FLOAT) { - return \rtrim(\rtrim(\number_format($value, 5, '.', ''), '0'), '.'); + return rtrim(rtrim(number_format($value, 5, '.', ''), '0'), '.'); } elseif ($type === CacheValueType::_ARRAY) { - return (string) \json_encode($value); + return (string) json_encode($value); } elseif ($type === CacheValueType::_SERIALIZABLE) { return \get_class($value) . self::DELIM . $value->serialize(); } elseif ($type === CacheValueType::_JSONSERIALIZABLE) { - return \get_class($value) . self::DELIM . ((string) \json_encode($value->jsonSerialize())); + return \get_class($value) . self::DELIM . ((string) json_encode($value->jsonSerialize())); } elseif ($type === CacheValueType::_NULL) { return ''; } @@ -410,22 +410,22 @@ final class RedisCache extends ConnectionAbstract { switch ($type) { case CacheValueType::_INT: - return (int) \substr($raw, $start + 1); + return (int) substr($raw, $start + 1); case CacheValueType::_FLOAT: - return (float) \substr($raw, $start + 1); + return (float) substr($raw, $start + 1); case CacheValueType::_BOOL: - return (bool) \substr($raw, $start + 1); + return (bool) substr($raw, $start + 1); case CacheValueType::_STRING: - return \substr($raw, $start + 1); + return substr($raw, $start + 1); case CacheValueType::_ARRAY: - $array = \substr($raw, $start + 1); - return \json_decode($array === false ? '[]' : $array, true); + $array = substr($raw, $start + 1); + return json_decode($array === false ? '[]' : $array, true); case CacheValueType::_NULL: return null; case CacheValueType::_JSONSERIALIZABLE: - $namespaceStart = (int) \strpos($raw, self::DELIM, $start); - $namespaceEnd = (int) \strpos($raw, self::DELIM, $namespaceStart + 1); - $namespace = \substr($raw, $namespaceStart + 1, $namespaceEnd - $namespaceStart - 1); + $namespaceStart = (int) strpos($raw, self::DELIM, $start); + $namespaceEnd = (int) strpos($raw, self::DELIM, $namespaceStart + 1); + $namespace = substr($raw, $namespaceStart + 1, $namespaceEnd - $namespaceStart - 1); if ($namespace === false) { return null; @@ -433,16 +433,16 @@ final class RedisCache extends ConnectionAbstract return new $namespace(); case CacheValueType::_SERIALIZABLE: - $namespaceStart = (int) \strpos($raw, self::DELIM, $start); - $namespaceEnd = (int) \strpos($raw, self::DELIM, $namespaceStart + 1); - $namespace = \substr($raw, $namespaceStart + 1, $namespaceEnd - $namespaceStart - 1); + $namespaceStart = (int) strpos($raw, self::DELIM, $start); + $namespaceEnd = (int) strpos($raw, self::DELIM, $namespaceStart + 1); + $namespace = substr($raw, $namespaceStart + 1, $namespaceEnd - $namespaceStart - 1); if ($namespace === false) { return null; } $obj = new $namespace(); - $obj->unserialize(\substr($raw, $namespaceEnd + 1)); + $obj->unserialize(substr($raw, $namespaceEnd + 1)); return $obj; default: diff --git a/DataStorage/Cookie/CookieJar.php b/DataStorage/Cookie/CookieJar.php index 7d904234f..2c3cb9ea7 100644 --- a/DataStorage/Cookie/CookieJar.php +++ b/DataStorage/Cookie/CookieJar.php @@ -145,8 +145,8 @@ final class CookieJar } // @codeCoverageIgnoreStart - if (!\headers_sent()) { - \setcookie($id, '', \time() - 3600); + if (!headers_sent()) { + setcookie($id, '', time() - 3600); return true; } @@ -195,7 +195,7 @@ final class CookieJar // @codeCoverageIgnoreStart foreach ($this->cookies as $key => $cookie) { - \setcookie($key, $cookie['value'], [ + setcookie($key, $cookie['value'], [ 'expires' => $cookie['expires'], 'path' => $cookie['path'], 'domain' => $cookie['domain'], diff --git a/DataStorage/Database/DataMapperAbstract.php b/DataStorage/Database/DataMapperAbstract.php index 483992be1..f45ce57e3 100644 --- a/DataStorage/Database/DataMapperAbstract.php +++ b/DataStorage/Database/DataMapperAbstract.php @@ -516,7 +516,7 @@ class DataMapperAbstract implements DataMapperInterface $objId = $id; } else { $objId = self::createModelArray($obj); - \settype($objId, static::$columns[static::$primaryField]['type']); + settype($objId, static::$columns[static::$primaryField]['type']); $obj[static::$columns[static::$primaryField]['internal']] = $objId; } @@ -545,7 +545,7 @@ class DataMapperAbstract implements DataMapperInterface $query->into(static::$table); foreach (static::$columns as $column) { - $propertyName = \stripos($column['internal'], '/') !== false ? \explode('/', $column['internal'])[0] : $column['internal']; + $propertyName = stripos($column['internal'], '/') !== false ? explode('/', $column['internal'])[0] : $column['internal']; if (isset(static::$hasMany[$propertyName])) { continue; } @@ -570,8 +570,8 @@ class DataMapperAbstract implements DataMapperInterface $query->insert($column['name'])->value($value); } elseif ($column['name'] !== static::$primaryField || !empty($tValue)) { - if (\stripos($column['internal'], '/') !== false) { - $path = \substr($column['internal'], \stripos($column['internal'], '/') + 1); + if (stripos($column['internal'], '/') !== false) { + $path = substr($column['internal'], stripos($column['internal'], '/') + 1); $tValue = ArrayUtils::getArray($path, $tValue, '/'); } @@ -598,13 +598,13 @@ class DataMapperAbstract implements DataMapperInterface $sth = self::$db->con->prepare($query->toSql()); $sth->execute(); } catch (\Throwable $t) { - \var_dump($t->getMessage()); - \var_dump($a = $query->toSql()); + var_dump($t->getMessage()); + var_dump($a = $query->toSql()); return -1; } $objId = empty($id = self::getObjectId($obj, $refClass)) ? self::$db->con->lastInsertId() : $id; - \settype($objId, static::$columns[static::$primaryField]['type']); + settype($objId, static::$columns[static::$primaryField]['type']); return $objId; } @@ -629,8 +629,8 @@ class DataMapperAbstract implements DataMapperInterface } $path = $column['internal']; - if (\stripos($column['internal'], '/') === 0) { - $path = \ltrim($column['internal'], '/'); + if (stripos($column['internal'], '/') === 0) { + $path = ltrim($column['internal'], '/'); } $property = ArrayUtils::getArray($column['internal'], $obj, '/'); @@ -709,7 +709,7 @@ class DataMapperAbstract implements DataMapperInterface $propertyName = static::$columns[static::$primaryField]['internal']; $refProp = $refClass->getProperty($propertyName); - \settype($objId, static::$columns[static::$primaryField]['type']); + settype($objId, static::$columns[static::$primaryField]['type']); if (!$refProp->isPublic()) { $refProp->setAccessible(true); $refProp->setValue($obj, $objId); @@ -837,7 +837,7 @@ class DataMapperAbstract implements DataMapperInterface } $objsIds = []; - $relReflectionClass = !empty($values) ? new \ReflectionClass(\reset($values)) : null; + $relReflectionClass = !empty($values) ? new \ReflectionClass(reset($values)) : null; foreach ($values as $key => $value) { if (!\is_object($value)) { @@ -1100,8 +1100,8 @@ class DataMapperAbstract implements DataMapperInterface foreach ($objsIds as $src) { if (\is_object($src)) { - $mapper = (\stripos($mapper = \get_class($src), '\Null') !== false - ? \str_replace('\Null', '\\', $mapper) + $mapper = (stripos($mapper = \get_class($src), '\Null') !== false + ? str_replace('\Null', '\\', $mapper) : $mapper) . 'Mapper'; @@ -1117,8 +1117,8 @@ class DataMapperAbstract implements DataMapperInterface $sth->execute(); } } catch (\Throwable $e) { - \var_dump($e->getMessage()); - \var_dump($relQuery->toSql()); + var_dump($e->getMessage()); + var_dump($relQuery->toSql()); } } @@ -1147,10 +1147,10 @@ class DataMapperAbstract implements DataMapperInterface } elseif ($type === 'DateTime' || $type === 'DateTimeImmutable') { return $value === null ? null : $value->format(self::$datetimeFormat); } elseif ($type === 'Json' || $value instanceof \JsonSerializable) { - return (string) \json_encode($value); + return (string) json_encode($value); } elseif ($type === 'Serializable') { return $value->serialize(); - } elseif (\is_object($value) && \method_exists($value, 'getId')) { + } elseif (\is_object($value) && method_exists($value, 'getId')) { return $value->getId(); } @@ -1200,7 +1200,7 @@ class DataMapperAbstract implements DataMapperInterface /** @var self $mapper */ $mapper = static::$hasMany[$propertyName]['mapper']; - $relReflectionClass = new \ReflectionClass(\reset($values)); + $relReflectionClass = new \ReflectionClass(reset($values)); $objsIds[$propertyName] = []; foreach ($values as $key => &$value) { @@ -1331,8 +1331,8 @@ class DataMapperAbstract implements DataMapperInterface $many = self::getHasManyRaw($objId); foreach (static::$hasMany as $propertyName => $rel) { - $removes = \array_diff($many[$propertyName], \array_keys($objsIds[$propertyName] ?? [])); - $adds = \array_diff(\array_keys($objsIds[$propertyName] ?? []), $many[$propertyName]); + $removes = array_diff($many[$propertyName], array_keys($objsIds[$propertyName] ?? [])); + $adds = array_diff(array_keys($objsIds[$propertyName] ?? []), $many[$propertyName]); if (!empty($removes)) { self::deleteRelationTable($propertyName, $removes, $objId); @@ -1498,7 +1498,7 @@ class DataMapperAbstract implements DataMapperInterface ->where(static::$table . '.' . static::$primaryField, '=', $objId); foreach (static::$columns as $column) { - $propertyName = \stripos($column['internal'], '/') !== false ? \explode('/', $column['internal'])[0] : $column['internal']; + $propertyName = stripos($column['internal'], '/') !== false ? explode('/', $column['internal'])[0] : $column['internal']; if (isset(static::$hasMany[$propertyName]) || $column['internal'] === static::$primaryField || ($column['readonly'] ?? false === true) @@ -1540,8 +1540,8 @@ class DataMapperAbstract implements DataMapperInterface */ $query->set([static::$table . '.' . $column['name'] => $value]); } elseif ($column['name'] !== static::$primaryField) { - if (\stripos($column['internal'], '/') !== false) { - $path = \substr($column['internal'], \stripos($column['internal'], '/') + 1); + if (stripos($column['internal'], '/') !== false) { + $path = substr($column['internal'], stripos($column['internal'], '/') + 1); $tValue = ArrayUtils::getArray($path, $tValue, '/'); } @@ -1587,8 +1587,8 @@ class DataMapperAbstract implements DataMapperInterface } $path = $column['internal']; - if (\stripos($column['internal'], '/') !== false) { - $path = \substr($column['internal'], \stripos($column['internal'], '/') + 1); + if (stripos($column['internal'], '/') !== false) { + $path = substr($column['internal'], stripos($column['internal'], '/') + 1); //$path = \ltrim($column['internal'], '/'); } @@ -1757,7 +1757,7 @@ class DataMapperAbstract implements DataMapperInterface /** @var self $mapper */ $mapper = static::$hasMany[$propertyName]['mapper']; $objsIds = []; - $relReflectionClass = !empty($values) ? new \ReflectionClass(\reset($values)) : null; + $relReflectionClass = !empty($values) ? new \ReflectionClass(reset($values)) : null; foreach ($values as $key => &$value) { if (!\is_object($value)) { @@ -1921,7 +1921,7 @@ class DataMapperAbstract implements DataMapperInterface public static function delete(mixed $obj, int $relations = RelationType::REFERENCE) : mixed { // @todo: only do this if RelationType !== NONE - if (\is_scalar($obj)) { + if (is_scalar($obj)) { $obj = static::get($obj); } @@ -2296,17 +2296,17 @@ class DataMapperAbstract implements DataMapperInterface $aValue = []; $arrayPath = ''; - if (\stripos($def['internal'], '/') !== false) { + if (stripos($def['internal'], '/') !== false) { $hasPath = true; - $path = \explode('/', $def['internal']); + $path = explode('/', $def['internal']); $refProp = $refClass->getProperty($path[0]); if (!($isPublic = $refProp->isPublic())) { $refProp->setAccessible(true); } - \array_shift($path); - $arrayPath = \implode('/', $path); + array_shift($path); + $arrayPath = implode('/', $path); $aValue = $isPublic ? $obj->{$path[0]} : $refProp->getValue($obj); } else { $refProp = $refClass->getProperty($def['internal']); @@ -2347,7 +2347,7 @@ class DataMapperAbstract implements DataMapperInterface $refProp->setValue($obj, $value); } elseif (\in_array($def['type'], ['string', 'int', 'float', 'bool'])) { if ($value !== null || $refProp->getValue($obj) !== null) { - \settype($value, $def['type']); + settype($value, $def['type']); } if ($hasPath) { @@ -2374,7 +2374,7 @@ class DataMapperAbstract implements DataMapperInterface $value = ArrayUtils::setArray($arrayPath, $aValue, $value, '/', true); } - $refProp->setValue($obj, \json_decode($value, true)); + $refProp->setValue($obj, json_decode($value, true)); } elseif ($def['type'] === 'Serializable') { $member = $isPublic ? $obj->{$def['internal']} : $refProp->getValue($obj); @@ -2403,17 +2403,17 @@ class DataMapperAbstract implements DataMapperInterface $aValue = null; $arrayPath = '/'; - if (\stripos($member, '/') !== false) { + if (stripos($member, '/') !== false) { $hasPath = true; - $path = \explode('/', $member); + $path = explode('/', $member); $refProp = $refClass->getProperty($path[0]); if (!($isPublic = $refProp->isPublic())) { $refProp->setAccessible(true); } - \array_shift($path); - $arrayPath = \implode('/', $path); + array_shift($path); + $arrayPath = implode('/', $path); $aValue = $isPublic ? $obj->{$path[0]} : $refProp->getValue($obj); } else { $refProp = $refClass->getProperty($member); @@ -2425,7 +2425,7 @@ class DataMapperAbstract implements DataMapperInterface if (\in_array($def['mapper']::$columns[$column]['type'], ['string', 'int', 'float', 'bool'])) { if ($value !== null || $refProp->getValue($obj) !== null) { - \settype($value, $def['mapper']::$columns[$column]['type']); + settype($value, $def['mapper']::$columns[$column]['type']); } if ($hasPath) { @@ -2452,7 +2452,7 @@ class DataMapperAbstract implements DataMapperInterface $value = ArrayUtils::setArray($arrayPath, $aValue, $value, '/', true); } - $refProp->setValue($obj, \json_decode($value, true)); + $refProp->setValue($obj, json_decode($value, true)); } elseif ($def['mapper']::$columns[$column]['type'] === 'Serializable') { $member = $isPublic ? $obj->{$member} : $refProp->getValue($obj); $member->unserialize($value); @@ -2489,11 +2489,11 @@ class DataMapperAbstract implements DataMapperInterface $value = $result[$alias]; $path = static::$columns[$column]['internal']; - if (\stripos($path, '/') !== false) { - $path = \explode('/', $path); + if (stripos($path, '/') !== false) { + $path = explode('/', $path); - \array_shift($path); - $path = \implode('/', $path); + array_shift($path); + $path = implode('/', $path); } if (isset(static::$ownsOne[$def['internal']])) { @@ -2505,13 +2505,13 @@ class DataMapperAbstract implements DataMapperInterface static::$belongsTo[$def['internal']]['mapper']::fillRelationsArray($value, self::$relations, $depth - 1); } elseif (\in_array(static::$columns[$column]['type'], ['string', 'int', 'float', 'bool'])) { - \settype($value, static::$columns[$column]['type']); + settype($value, static::$columns[$column]['type']); } elseif (static::$columns[$column]['type'] === 'DateTime') { $value = $value === null ? null : new \DateTime($value); } elseif (static::$columns[$column]['type'] === 'DateTimeImmutable') { $value = $value === null ? null : new \DateTimeImmutable($value); } elseif (static::$columns[$column]['type'] === 'Json') { - $value = \json_decode($value, true); + $value = json_decode($value, true); } $obj = ArrayUtils::setArray($path, $obj, $value, '/', true); @@ -2529,13 +2529,13 @@ class DataMapperAbstract implements DataMapperInterface $path = $member; if (\in_array($def['mapper']::$columns[$column]['type'], ['string', 'int', 'float', 'bool'])) { - \settype($value, $def['mapper']::$columns[$column]['type']); + settype($value, $def['mapper']::$columns[$column]['type']); } elseif ($def['mapper']::$columns[$column]['type'] === 'DateTime') { $value = $value === null ? null : new \DateTime($value); } elseif ($def['mapper']::$columns[$column]['type'] === 'DateTimeImmutable') { $value = $value === null ? null : new \DateTimeImmutable($value); } elseif ($def['mapper']::$columns[$column]['type'] === 'Json') { - $value = \json_decode($value, true); + $value = json_decode($value, true); } $obj = ArrayUtils::setArray($path, $obj, $value, '/', true); @@ -2728,7 +2728,7 @@ class DataMapperAbstract implements DataMapperInterface if ($countResulsts === 0) { return self::createNullModel(); } elseif ($countResulsts === 1) { - return \reset($obj); + return reset($obj); } return $obj; @@ -2789,7 +2789,7 @@ class DataMapperAbstract implements DataMapperInterface if ($countResulsts === 0) { return []; } elseif ($countResulsts === 1) { - return \reset($obj); + return reset($obj); } return $obj; @@ -2805,7 +2805,7 @@ class DataMapperAbstract implements DataMapperInterface self::clear(); - return \count($obj) === 1 ? \reset($obj) : $obj; + return \count($obj) === 1 ? reset($obj) : $obj; } /** @@ -2892,7 +2892,7 @@ class DataMapperAbstract implements DataMapperInterface { $result = self::get(null, $relations, $depth); - if (\is_object($result) && \stripos(\get_class($result), '\Null') !== false) { + if (\is_object($result) && stripos(\get_class($result), '\Null') !== false) { return []; } @@ -2913,7 +2913,7 @@ class DataMapperAbstract implements DataMapperInterface { $result = self::getArray(null, $relations, $depth); - return !\is_array(\reset($result)) ? [$result] : $result; + return !\is_array(reset($result)) ? [$result] : $result; } /** @@ -2977,7 +2977,7 @@ class DataMapperAbstract implements DataMapperInterface { $result = self::get(null, $relations, $depth, null, $query); - if (\is_object($result) && \stripos(\get_class($result), '\Null') !== false) { + if (\is_object($result) && stripos(\get_class($result), '\Null') !== false) { return []; } @@ -3097,7 +3097,7 @@ class DataMapperAbstract implements DataMapperInterface public static function getRaw(mixed $keys, int $relations = RelationType::ALL, int $depth = 3, string $ref = null, Builder $query = null) : array { $comparison = \is_array($keys) && \count($keys) > 1 ? 'in' : '='; - $keys = $comparison === 'in' ? $keys : \reset($keys); + $keys = $comparison === 'in' ? $keys : reset($keys); $query ??= self::getQuery(null, [], $relations, $depth); $hasBy = $ref === null ? false : isset(static::$columns[self::getColumnByMember($ref)]); @@ -3163,8 +3163,8 @@ class DataMapperAbstract implements DataMapperInterface } } catch (\Throwable $t) { $results = false; - \var_dump($query->toSql()); - \var_dump($t->getMessage()); + var_dump($query->toSql()); + var_dump($t->getMessage()); } return $results === false ? [] : $results; @@ -3195,7 +3195,7 @@ class DataMapperAbstract implements DataMapperInterface $result = $sth->fetchAll(\PDO::FETCH_NUM); } - return $result === false ? [] : \array_column($result, 0); + return $result === false ? [] : array_column($result, 0); } /** @@ -3237,7 +3237,7 @@ class DataMapperAbstract implements DataMapperInterface ->from($value['table']) ->where($value['table'] . '.' . $value['self'], '=', $primaryKey); - if ($value['mapper']::getTable() !== $value['table']) { + if ($value['table'] !== $value['mapper']::getTable()) { $query->leftJoin($value['mapper']::getTable()) ->on($value['table'] . '.' . $src, '=', $value['mapper']::getTable() . '.' . $value['mapper']::getPrimaryField()); } @@ -3656,7 +3656,7 @@ class DataMapperAbstract implements DataMapperInterface */ private static function isNullModel(mixed $obj) : bool { - return \is_object($obj) && \strpos(\get_class($obj), '\Null') !== false; + return \is_object($obj) && strpos(\get_class($obj), '\Null') !== false; } /** @@ -3670,11 +3670,11 @@ class DataMapperAbstract implements DataMapperInterface */ private static function createNullModel(mixed $id = null) : mixed { - $class = empty(static::$model) ? \substr(static::class, 0, -6) : static::$model; - $parts = \explode('\\', $class); + $class = empty(static::$model) ? substr(static::class, 0, -6) : static::$model; + $parts = explode('\\', $class); $name = $parts[$c = (\count($parts) - 1)]; $parts[$c] = 'Null' . $name; - $class = \implode('\\', $parts); + $class = implode('\\', $parts); return $id !== null ? new $class($id) : new $class(); } @@ -3688,7 +3688,7 @@ class DataMapperAbstract implements DataMapperInterface */ private static function createBaseModel() : mixed { - $class = empty(static::$model) ? \substr(static::class, 0, -6) : static::$model; + $class = empty(static::$model) ? substr(static::class, 0, -6) : static::$model; /** * @todo Orange-Management/phpOMS#67 @@ -3707,7 +3707,7 @@ class DataMapperAbstract implements DataMapperInterface */ private static function getModelName() : string { - return empty(static::$model) ? \substr(static::class, 0, -6) : static::$model; + return empty(static::$model) ? substr(static::class, 0, -6) : static::$model; } } diff --git a/DataStorage/Database/DatabasePool.php b/DataStorage/Database/DatabasePool.php index 85ec4deff..32d8cf3aa 100644 --- a/DataStorage/Database/DatabasePool.php +++ b/DataStorage/Database/DatabasePool.php @@ -75,7 +75,7 @@ final class DatabasePool implements DataStoragePoolInterface } if (empty($key)) { - return \reset($this->pool); + return reset($this->pool); } return $this->pool[$key]; diff --git a/DataStorage/Database/GrammarAbstract.php b/DataStorage/Database/GrammarAbstract.php index b948364e4..c12d8e693 100644 --- a/DataStorage/Database/GrammarAbstract.php +++ b/DataStorage/Database/GrammarAbstract.php @@ -123,9 +123,9 @@ abstract class GrammarAbstract */ public function compileQuery(BuilderAbstract $query) : string { - return \trim( - \implode(' ', - \array_filter( + return trim( + implode(' ', + array_filter( $this->compileComponents($query), function ($value) { return (string) $value !== ''; @@ -159,7 +159,7 @@ abstract class GrammarAbstract /* Loop all possible query components and if they exist compile them. */ foreach ($components as $component) { if (isset($query->{$component}) && !empty($query->{$component})) { - $sql[$component] = $this->{'compile' . \ucfirst($component)}($query, $query->{$component}); + $sql[$component] = $this->{'compile' . ucfirst($component)}($query, $query->{$component}); } } @@ -219,7 +219,7 @@ abstract class GrammarAbstract } } - return \rtrim($expression, ', '); + return rtrim($expression, ', '); } /** @@ -239,7 +239,7 @@ abstract class GrammarAbstract $identifierEnd = $this->systemIdentifierEnd; foreach ($this->specialKeywords as $keyword) { - if (\strrpos($system, $keyword, -\strlen($system)) !== false) { + if (strrpos($system, $keyword, -\strlen($system)) !== false) { $identifierStart = ''; $identifierEnd = ''; @@ -247,7 +247,7 @@ abstract class GrammarAbstract } } - $split = \explode('.', $system); + $split = explode('.', $system); $fullSystem = ''; foreach ($split as $key => $system) { @@ -257,6 +257,6 @@ abstract class GrammarAbstract . ($system !== '*' ? $identifierEnd : ''); } - return \ltrim($fullSystem, '.'); + return ltrim($fullSystem, '.'); } } diff --git a/DataStorage/Database/Query/Builder.php b/DataStorage/Database/Query/Builder.php index 647a002ba..acdf03194 100644 --- a/DataStorage/Database/Query/Builder.php +++ b/DataStorage/Database/Query/Builder.php @@ -389,12 +389,12 @@ class Builder extends BuilderAbstract $dependencies[$table] = []; foreach ($this->ons[$table] as $on) { - if (\stripos($on['column'], '.')) { - $dependencies[$table][] = \explode('.', $on['column'])[0]; + if (stripos($on['column'], '.')) { + $dependencies[$table][] = explode('.', $on['column'])[0]; } - if (\stripos($on['value'], '.')) { - $dependencies[$table][] = \explode('.', $on['value'])[0]; + if (stripos($on['value'], '.')) { + $dependencies[$table][] = explode('.', $on['value'])[0]; } } } @@ -438,7 +438,7 @@ class Builder extends BuilderAbstract } $this->type = QueryType::RAW; - $this->raw = \rtrim($raw, ';'); + $this->raw = rtrim($raw, ';'); return $this; } @@ -459,14 +459,14 @@ class Builder extends BuilderAbstract return true; } - $raw = \strtolower($raw); + $raw = strtolower($raw); - if (\stripos($raw, 'insert') !== false - || \stripos($raw, 'update') !== false - || \stripos($raw, 'drop') !== false - || \stripos($raw, 'delete') !== false - || \stripos($raw, 'create') !== false - || \stripos($raw, 'alter') !== false + if (stripos($raw, 'insert') !== false + || stripos($raw, 'update') !== false + || stripos($raw, 'drop') !== false + || stripos($raw, 'delete') !== false + || stripos($raw, 'create') !== false + || stripos($raw, 'alter') !== false ) { return false; } @@ -554,7 +554,7 @@ class Builder extends BuilderAbstract $i = 0; foreach ($columns as $column) { - if (isset($operator[$i]) && !\in_array(\strtolower($operator[$i]), self::OPERATORS)) { + if (isset($operator[$i]) && !\in_array(strtolower($operator[$i]), self::OPERATORS)) { throw new \InvalidArgumentException('Unknown operator: "' . $operator[$i] . '"'); } @@ -977,9 +977,9 @@ class Builder extends BuilderAbstract */ public function value(mixed $value) : self { - \end($this->values); + end($this->values); - $key = \key($this->values); + $key = key($this->values); $key ??= 0; if (\is_array($value)) { @@ -988,7 +988,7 @@ class Builder extends BuilderAbstract $this->values[$key][] = $value; } - \reset($this->values); + reset($this->values); return $this; } @@ -1020,7 +1020,7 @@ class Builder extends BuilderAbstract */ public function set(mixed $set) : self { - $this->sets[\key($set)] = \current($set); + $this->sets[key($set)] = current($set); return $this; } @@ -1307,7 +1307,7 @@ class Builder extends BuilderAbstract */ public function on(string | array $columns, string | array $operator = null, string | array $values = null, string | array $boolean = 'and', string $table = null) : self { - if ($operator !== null && !\is_array($operator) && !\in_array(\strtolower($operator), self::OPERATORS)) { + if ($operator !== null && !\is_array($operator) && !\in_array(strtolower($operator), self::OPERATORS)) { throw new \InvalidArgumentException('Unknown operator.'); } @@ -1320,10 +1320,10 @@ class Builder extends BuilderAbstract $joinCount = \count($this->joins) - 1; $i = 0; - $table ??= \array_keys($this->joins)[$joinCount]; + $table ??= array_keys($this->joins)[$joinCount]; foreach ($columns as $column) { - if (isset($operator[$i]) && !\in_array(\strtolower($operator[$i]), self::OPERATORS)) { + if (isset($operator[$i]) && !\in_array(strtolower($operator[$i]), self::OPERATORS)) { throw new \InvalidArgumentException('Unknown operator.'); } @@ -1408,8 +1408,8 @@ class Builder extends BuilderAbstract $sth->execute(); } catch (\Throwable $t) { - \var_dump($t->getMessage()); - \var_dump($this->toSql()); + var_dump($t->getMessage()); + var_dump($this->toSql()); $sth = null; } @@ -1459,7 +1459,7 @@ class Builder extends BuilderAbstract } elseif ($column instanceof \Serializable) { return $column->serialize(); } elseif ($column instanceof self) { - return \md5($column->toSql()); + return md5($column->toSql()); } throw new \Exception(); diff --git a/DataStorage/Database/Query/Grammar/Grammar.php b/DataStorage/Database/Query/Grammar/Grammar.php index d177c3801..9705f3b21 100644 --- a/DataStorage/Database/Query/Grammar/Grammar.php +++ b/DataStorage/Database/Query/Grammar/Grammar.php @@ -249,7 +249,7 @@ class Grammar extends GrammarAbstract $expression = ''; if (!$first) { - $expression = ' ' . \strtoupper($element['boolean']) . ' '; + $expression = ' ' . strtoupper($element['boolean']) . ' '; } if (\is_string($element['column'])) { @@ -257,14 +257,14 @@ class Grammar extends GrammarAbstract } elseif ($element['column'] instanceof \Closure) { $expression .= $element['column'](); } elseif ($element['column'] instanceof Where) { - $where = \rtrim($this->compileWhereQuery($element['column']), ';'); - $expression .= '(' . (\stripos($where, 'WHERE ') === 0 ? \substr($where, 6) : $where) . ')'; + $where = rtrim($this->compileWhereQuery($element['column']), ';'); + $expression .= '(' . (stripos($where, 'WHERE ') === 0 ? substr($where, 6) : $where) . ')'; } elseif ($element['column'] instanceof Builder) { - $expression .= '(' . \rtrim($element['column']->toSql(), ';') . ')'; + $expression .= '(' . rtrim($element['column']->toSql(), ';') . ')'; } if (isset($element['value'])) { - $expression .= ' ' . \strtoupper($element['operator']) . ' ' . $this->compileValue($query, $element['value']); + $expression .= ' ' . strtoupper($element['operator']) . ' ' . $this->compileValue($query, $element['value']); } elseif ($element['value'] === null && !($element['column'] instanceof Builder)) { $operator = $element['operator'] === '=' ? 'IS' : 'IS NOT'; $expression .= ' ' . $operator . ' ' . $this->compileValue($query, $element['value']); @@ -340,7 +340,7 @@ class Grammar extends GrammarAbstract $values .= $this->compileValue($query, $val) . ', '; } - return '(' . \rtrim($values, ', ') . ')'; + return '(' . rtrim($values, ', ') . ')'; } elseif ($value instanceof \DateTime) { return $query->quote($value->format($this->datetimeFormat)); } elseif ($value === null) { @@ -348,13 +348,13 @@ class Grammar extends GrammarAbstract } elseif (\is_bool($value)) { return (string) ((int) $value); } elseif (\is_float($value)) { - return \rtrim(\rtrim(\number_format($value, 5, '.', ''), '0'), '.'); + return rtrim(rtrim(number_format($value, 5, '.', ''), '0'), '.'); } elseif ($value instanceof Column) { - return '(' . \rtrim($this->compileColumnQuery($value), ';') . ')'; + return '(' . rtrim($this->compileColumnQuery($value), ';') . ')'; } elseif ($value instanceof Builder) { - return '(' . \rtrim($value->toSql(), ';') . ')'; + return '(' . rtrim($value->toSql(), ';') . ')'; } elseif ($value instanceof \JsonSerializable) { - $encoded = \json_encode($value); + $encoded = json_encode($value); return $encoded ? $encoded : 'NULL'; } elseif ($value instanceof \Serializable) { @@ -418,13 +418,13 @@ class Grammar extends GrammarAbstract } elseif ($join['table'] instanceof \Closure) { $expression .= $join['table']() . (\is_string($join['alias']) ? ' as ' . $join['alias'] : ''); } elseif ($join['table'] instanceof Builder) { - $expression .= '(' . \rtrim($join['table']->toSql(), ';') . ')' . (\is_string($join['alias']) ? ' as ' . $join['alias'] : ''); + $expression .= '(' . rtrim($join['table']->toSql(), ';') . ')' . (\is_string($join['alias']) ? ' as ' . $join['alias'] : ''); } $expression .= $this->compileOn($query, $query->ons[$join['alias'] ?? $table]) . ' '; } - $expression = \rtrim($expression, ', '); + $expression = rtrim($expression, ', '); return $expression; } @@ -472,12 +472,12 @@ class Grammar extends GrammarAbstract $expression = ''; if (!$first) { - $expression = ' ' . \strtoupper($element['boolean']) . ' '; + $expression = ' ' . strtoupper($element['boolean']) . ' '; } if (\is_string($element['column'])) { // handle bug when no table is specified in the where column - if (\count($query->from) === 1 && \stripos($element['column'], '.') === false) { + if (\count($query->from) === 1 && stripos($element['column'], '.') === false) { $element['column'] = $query->from[0] . '.' . $element['column']; } @@ -487,11 +487,11 @@ class Grammar extends GrammarAbstract } elseif ($element['column'] instanceof Builder) { $expression .= '(' . $element['column']->toSql() . ')'; } elseif ($element['column'] instanceof Where) { - $expression .= '(' . \rtrim($this->compileWhereQuery($element['column']), ';') . ')'; + $expression .= '(' . rtrim($this->compileWhereQuery($element['column']), ';') . ')'; } if (isset($element['value'])) { - $expression .= ' ' . \strtoupper($element['operator']) . ' ' . $this->compileSystem($element['value']); + $expression .= ' ' . strtoupper($element['operator']) . ' ' . $this->compileSystem($element['value']); } else { $operator = $element['operator'] === '=' ? 'IS' : 'IS NOT'; $expression .= ' ' . $operator . ' ' . $this->compileValue($query, $element['value']); @@ -518,7 +518,7 @@ class Grammar extends GrammarAbstract $expression .= $this->compileSystem($group) . ', '; } - $expression = \rtrim($expression, ', '); + $expression = rtrim($expression, ', '); return 'GROUP BY ' . $expression; } @@ -542,7 +542,7 @@ class Grammar extends GrammarAbstract $expression .= $this->compileSystem($column) . ' ' . $order . ', '; } - $expression = \rtrim($expression, ', '); + $expression = rtrim($expression, ', '); if ($expression === '') { return ''; @@ -612,7 +612,7 @@ class Grammar extends GrammarAbstract return ''; } - return '(' . \rtrim($cols, ', ') . ')'; + return '(' . rtrim($cols, ', ') . ')'; } /** @@ -637,7 +637,7 @@ class Grammar extends GrammarAbstract return ''; } - return 'VALUES ' . \rtrim($vals, ', '); + return 'VALUES ' . rtrim($vals, ', '); } /** @@ -664,6 +664,6 @@ class Grammar extends GrammarAbstract return ''; } - return 'SET ' . \rtrim($vals, ', '); + return 'SET ' . rtrim($vals, ', '); } } diff --git a/DataStorage/Database/Schema/Grammar/MysqlGrammar.php b/DataStorage/Database/Schema/Grammar/MysqlGrammar.php index 9f5d797c4..5ff04566f 100644 --- a/DataStorage/Database/Schema/Grammar/MysqlGrammar.php +++ b/DataStorage/Database/Schema/Grammar/MysqlGrammar.php @@ -77,7 +77,7 @@ class MysqlGrammar extends Grammar ->from('information_schema.tables') ->where('table_schema', '=', $query->getConnection()->getDatabase()); - return \rtrim($builder->toSql(), ';'); + return rtrim($builder->toSql(), ';'); } /** @@ -98,7 +98,7 @@ class MysqlGrammar extends Grammar ->where('table_schema', '=', $query->getConnection()->getDatabase()) ->andWhere('table_name', '=', $table); - return \rtrim($builder->toSql(), ';'); + return rtrim($builder->toSql(), ';'); } /** @@ -150,7 +150,7 @@ class MysqlGrammar extends Grammar } } - return '(' . \ltrim(\rtrim($fieldQuery . $keys, ','), ' ') . ')'; + return '(' . ltrim(rtrim($fieldQuery . $keys, ','), ' ') . ')'; } /** diff --git a/DataStorage/Database/SchemaMapper.php b/DataStorage/Database/SchemaMapper.php index 8cc48f352..9458f9fc6 100644 --- a/DataStorage/Database/SchemaMapper.php +++ b/DataStorage/Database/SchemaMapper.php @@ -65,7 +65,7 @@ class SchemaMapper $tables = []; foreach ($tNames as $name) { - $tables[] = \array_values($name)[0]; + $tables[] = array_values($name)[0]; } return $tables; @@ -103,7 +103,7 @@ class SchemaMapper $fields = []; foreach ($tNames as $name) { - $fields[] = \array_values($name); + $fields[] = array_values($name); } return $fields; diff --git a/DataStorage/Session/FileSession.php b/DataStorage/Session/FileSession.php index 13162df3a..9b66316d9 100644 --- a/DataStorage/Session/FileSession.php +++ b/DataStorage/Session/FileSession.php @@ -73,33 +73,33 @@ class FileSession implements SessionInterface */ public function __construct(int $liftetime = 3600, string $sid = '', int $inactivityInterval = 0) { - if (\session_id()) { - \session_write_close(); // @codeCoverageIgnore + if (session_id()) { + session_write_close(); // @codeCoverageIgnore } if ($sid !== '') { - \session_id((string) $sid); + session_id((string) $sid); } $this->inactivityInterval = $inactivityInterval; - if (\session_status() !== \PHP_SESSION_ACTIVE && !\headers_sent()) { + if (session_status() !== \PHP_SESSION_ACTIVE && !headers_sent()) { // @codeCoverageIgnoreStart - \session_set_cookie_params($liftetime, '/', '', false, true); - \session_start(); + session_set_cookie_params($liftetime, '/', '', false, true); + session_start(); // @codeCoverageIgnoreEnd } if ($this->inactivityInterval > 0 - && ($this->inactivityInterval + ($_SESSION['lastActivity'] ?? 0) < \time()) + && ($this->inactivityInterval + ($_SESSION['lastActivity'] ?? 0) < time()) ) { $this->destroy(); // @codeCoverageIgnore } $this->sessionData = $_SESSION ?? []; $_SESSION = null; - $this->sessionData['lastActivity'] = \time(); - $this->sid = (string) \session_id(); + $this->sessionData['lastActivity'] = time(); + $this->sid = (string) session_id(); } /** @@ -154,7 +154,7 @@ class FileSession implements SessionInterface } $_SESSION = $this->sessionData; - \session_write_close(); + session_write_close(); return true; } @@ -199,10 +199,10 @@ class FileSession implements SessionInterface */ private function destroy() : void { - if (\session_status() !== \PHP_SESSION_NONE) { - \session_destroy(); + if (session_status() !== \PHP_SESSION_NONE) { + session_destroy(); $this->sessionData = []; - \session_start(); + session_start(); } } diff --git a/DataStorage/Session/FileSessionHandler.php b/DataStorage/Session/FileSessionHandler.php index 9849aaf74..d6b6565f0 100644 --- a/DataStorage/Session/FileSessionHandler.php +++ b/DataStorage/Session/FileSessionHandler.php @@ -45,8 +45,8 @@ final class FileSessionHandler implements \SessionHandlerInterface, \SessionIdIn { $this->savePath = $path; - if (\realpath($path) === false) { - \mkdir($path, 0755, true); + if (realpath($path) === false) { + mkdir($path, 0755, true); } } @@ -59,7 +59,7 @@ final class FileSessionHandler implements \SessionHandlerInterface, \SessionIdIn */ public function create_sid() : string { - return ($sid = \session_create_id('s-')) === false ? '' : $sid; + return ($sid = session_create_id('s-')) === false ? '' : $sid; } /** @@ -76,7 +76,7 @@ final class FileSessionHandler implements \SessionHandlerInterface, \SessionIdIn { $this->savePath = $savePath; - return \is_dir($this->savePath); + return is_dir($this->savePath); } /** @@ -102,11 +102,11 @@ final class FileSessionHandler implements \SessionHandlerInterface, \SessionIdIn */ public function read($id) { - if (!\is_file($this->savePath . '/sess_' . $id)) { + if (!is_file($this->savePath . '/sess_' . $id)) { return ''; } - return (string) \file_get_contents($this->savePath . '/sess_' . $id); + return (string) file_get_contents($this->savePath . '/sess_' . $id); } /** @@ -121,7 +121,7 @@ final class FileSessionHandler implements \SessionHandlerInterface, \SessionIdIn */ public function write($id, $data) { - return \file_put_contents($this->savePath . '/sess_' . $id, $data) === false ? false : true; + return file_put_contents($this->savePath . '/sess_' . $id, $data) === false ? false : true; } /** @@ -136,8 +136,8 @@ final class FileSessionHandler implements \SessionHandlerInterface, \SessionIdIn public function destroy($id) { $file = $this->savePath . '/sess_' . $id; - if (\is_file($file)) { - \unlink($file); + if (is_file($file)) { + unlink($file); } return true; @@ -154,15 +154,15 @@ final class FileSessionHandler implements \SessionHandlerInterface, \SessionIdIn */ public function gc($maxlifetime) { - $files = \glob("{$this->savePath}/sess_*"); + $files = glob("{$this->savePath}/sess_*"); if ($files === false) { return false; } foreach ($files as $file) { - if (\filemtime($file) + $maxlifetime < \time() && \is_file($file)) { - \unlink($file); + if (filemtime($file) + $maxlifetime < time() && is_file($file)) { + unlink($file); } } diff --git a/DataStorage/Session/HttpSession.php b/DataStorage/Session/HttpSession.php index b52a601f2..276f2e65f 100644 --- a/DataStorage/Session/HttpSession.php +++ b/DataStorage/Session/HttpSession.php @@ -74,19 +74,19 @@ final class HttpSession implements SessionInterface */ public function __construct(int $liftetime = 3600, string $sid = '', int $inactivityInterval = 0) { - if (\session_id()) { - \session_write_close(); // @codeCoverageIgnore + if (session_id()) { + session_write_close(); // @codeCoverageIgnore } if ($sid !== '') { - \session_id((string) $sid); // @codeCoverageIgnore + session_id((string) $sid); // @codeCoverageIgnore } $this->inactivityInterval = $inactivityInterval; - if (\session_status() !== \PHP_SESSION_ACTIVE && !\headers_sent()) { + if (session_status() !== \PHP_SESSION_ACTIVE && !headers_sent()) { // @codeCoverageIgnoreStart - \session_set_cookie_params([ + session_set_cookie_params([ 'lifetime' => $liftetime, 'path' => '/', 'domain' => '', @@ -94,18 +94,18 @@ final class HttpSession implements SessionInterface 'httponly' => true, 'samesite' => 'Strict', ]); - \session_start(); + session_start(); // @codeCoverageIgnoreEnd } - if ($this->inactivityInterval > 0 && ($this->inactivityInterval + ($_SESSION['lastActivity'] ?? 0) < \time())) { + if ($this->inactivityInterval > 0 && ($this->inactivityInterval + ($_SESSION['lastActivity'] ?? 0) < time())) { $this->destroy(); // @codeCoverageIgnore } $this->sessionData = $_SESSION ?? []; $_SESSION = null; - $this->sessionData['lastActivity'] = \time(); - $this->sid = (string) \session_id(); + $this->sessionData['lastActivity'] = time(); + $this->sid = (string) session_id(); $this->setCsrfProtection(); } @@ -122,7 +122,7 @@ final class HttpSession implements SessionInterface $this->set('UID', 0, false); if (($csrf = $this->get('CSRF')) === null) { - $csrf = \bin2hex(\random_bytes(32)); + $csrf = bin2hex(random_bytes(32)); $this->set('CSRF', $csrf, false); } @@ -181,7 +181,7 @@ final class HttpSession implements SessionInterface } $_SESSION = $this->sessionData; - \session_write_close(); + session_write_close(); return true; } @@ -226,10 +226,10 @@ final class HttpSession implements SessionInterface */ private function destroy() : void { - if (\session_status() !== \PHP_SESSION_NONE) { - \session_destroy(); + if (session_status() !== \PHP_SESSION_NONE) { + session_destroy(); $this->sessionData = []; - \session_start(); + session_start(); } } diff --git a/Dispatcher/Dispatcher.php b/Dispatcher/Dispatcher.php index 90e1db545..d0b6748a4 100644 --- a/Dispatcher/Dispatcher.php +++ b/Dispatcher/Dispatcher.php @@ -68,7 +68,7 @@ final class Dispatcher implements DispatcherInterface if (\is_array($controller) && isset($controller['dest'])) { if (!empty($controller['data'])) { - $data = \array_merge( + $data = array_merge( empty($data) ? [] : $data, \is_array($controller['data']) ? $controller['data'] : [$controller['data']] ); @@ -112,7 +112,7 @@ final class Dispatcher implements DispatcherInterface private function dispatchString(string $controller, array $data = null) : array { $views = []; - $dispatch = \explode(':', $controller); + $dispatch = explode(':', $controller); if (!Autoloader::exists($dispatch[0]) && !isset($this->controllers[$dispatch[0]])) { throw new PathException($dispatch[0]); diff --git a/Event/EventManager.php b/Event/EventManager.php index 4528cd8ab..b0d4e4177 100644 --- a/Event/EventManager.php +++ b/Event/EventManager.php @@ -104,7 +104,7 @@ final class EventManager implements \Countable */ public function importFromFile(string $path) : bool { - if (!\is_file($path)) { + if (!is_file($path)) { return false; } @@ -169,18 +169,18 @@ final class EventManager implements \Countable */ public function triggerSimilar(string $group, string $id = '', mixed $data = null) : bool { - $groupIsRegex = \stripos($group, '/') === 0; - $idIsRegex = \stripos($id, '/') === 0; + $groupIsRegex = stripos($group, '/') === 0; + $idIsRegex = stripos($id, '/') === 0; $groups = []; foreach ($this->groups as $groupName => $value) { - $groupNameIsRegex = \stripos($groupName, '/') === 0; + $groupNameIsRegex = stripos($groupName, '/') === 0; if ($groupIsRegex) { - if (\preg_match($group, $groupName) === 1) { + if (preg_match($group, $groupName) === 1) { $groups[$groupName] = []; } - } elseif ($groupNameIsRegex && \preg_match($groupName, $group) === 1) { + } elseif ($groupNameIsRegex && preg_match($groupName, $group) === 1) { $groups[$groupName] = []; } elseif ($groupName === $group) { $groups[$groupName] = []; @@ -189,13 +189,13 @@ final class EventManager implements \Countable foreach ($groups as $groupName => $groupValues) { foreach ($this->groups[$groupName] as $idName => $value) { - $idNameIsRegex = \stripos($idName, '/') === 0; + $idNameIsRegex = stripos($idName, '/') === 0; if ($idIsRegex) { - if (\preg_match($id, $idName) === 1) { + if (preg_match($id, $idName) === 1) { $groups[$groupName][] = $idName; } - } elseif ($idNameIsRegex && \preg_match($idName, $id) === 1) { + } elseif ($idNameIsRegex && preg_match($idName, $id) === 1) { $groups[$groupName][] = $id; } elseif ($idName === $id) { $groups[$groupName] = []; diff --git a/Localization/L11nManager.php b/Localization/L11nManager.php index 6b0b4f8d1..67f7d4ddd 100644 --- a/Localization/L11nManager.php +++ b/Localization/L11nManager.php @@ -107,7 +107,7 @@ final class L11nManager */ public function loadLanguageFile(string $from, string $file) : void { - if (!\is_file($file)) { + if (!is_file($file)) { return; } @@ -135,7 +135,7 @@ final class L11nManager */ public function loadLanguageFromFile(string $language, string $from, string $file) : void { - if (!\is_file($file)) { + if (!is_file($file)) { return; } @@ -219,7 +219,7 @@ final class L11nManager */ public function getHtml(string $code, string $module, string $theme, string $translation) : string { - return \htmlspecialchars($this->getText($code, $module, $theme, $translation)); + return htmlspecialchars($this->getText($code, $module, $theme, $translation)); } /** @@ -235,7 +235,7 @@ final class L11nManager */ public function getNumeric(Localization $l11n, int | float $numeric, string $format = null) : string { - return \number_format( + return number_format( $numeric, $l11n->getPrecision()[$format ?? 'medium'], $l11n->getDecimal(), @@ -256,7 +256,7 @@ final class L11nManager */ public function getPercentage(Localization $l11n, float $percentage, string $format = null) : string { - return \number_format( + return number_format( $percentage, $l11n->getPrecision()[$format ?? 'medium'], $l11n->getDecimal(), $l11n->getThousands() @@ -282,7 +282,7 @@ final class L11nManager $symbol ??= $l11n->getCurrency(); if (\is_float($currency)) { - $currency = (int) ($currency * \pow(10, Money::MAX_DECIMALS)); + $currency = (int) ($currency * pow(10, Money::MAX_DECIMALS)); } if (!empty($symbol)) { diff --git a/Localization/Localization.php b/Localization/Localization.php index 095481245..3ca1ce945 100644 --- a/Localization/Localization.php +++ b/Localization/Localization.php @@ -248,37 +248,37 @@ class Localization implements \JsonSerializable */ public function loadFromLanguage(string $langCode, string $countryCode = '*') : void { - $langCode = \strtolower($langCode); - $countryCode = \strtoupper($countryCode); + $langCode = strtolower($langCode); + $countryCode = strtoupper($countryCode); if ($countryCode !== '*' - && !\is_file(self::DEFINITIONS_PATH . $langCode . '_' . $countryCode . '.json') + && !is_file(self::DEFINITIONS_PATH . $langCode . '_' . $countryCode . '.json') ) { $countryCode = ''; } - $files = \glob(self::DEFINITIONS_PATH . $langCode . '_' . $countryCode . '*'); + $files = glob(self::DEFINITIONS_PATH . $langCode . '_' . $countryCode . '*'); if ($files === false) { $files = []; // @codeCoverageIgnore } foreach ($files as $file) { - $fileContent = \file_get_contents($file); + $fileContent = file_get_contents($file); if ($fileContent === false) { break; // @codeCoverageIgnore } - $this->importLocale(\json_decode($fileContent, true)); + $this->importLocale(json_decode($fileContent, true)); return; } - $fileContent = \file_get_contents(self::DEFINITIONS_PATH . 'en_US.json'); + $fileContent = file_get_contents(self::DEFINITIONS_PATH . 'en_US.json'); if ($fileContent === false) { return; // @codeCoverageIgnore } - $this->importLocale(\json_decode($fileContent, true)); + $this->importLocale(json_decode($fileContent, true)); } /** @@ -398,7 +398,7 @@ class Localization implements \JsonSerializable */ public function setLanguage(string $language) : void { - $language = \strtolower($language); + $language = strtolower($language); if (!ISO639x1Enum::isValidValue($language)) { throw new InvalidEnumValue($language); diff --git a/Log/FileLogger.php b/Log/FileLogger.php index 43eda1480..ac602857c 100644 --- a/Log/FileLogger.php +++ b/Log/FileLogger.php @@ -100,11 +100,11 @@ final class FileLogger implements LoggerInterface */ public function __construct(string $lpath, bool $verbose = false) { - $path = \realpath(empty($lpath) ? __DIR__ . '/../../' : $lpath); + $path = realpath(empty($lpath) ? __DIR__ . '/../../' : $lpath); $this->verbose = $verbose; - $this->path = \is_dir($lpath) || \strpos($lpath, '.') === false - ? \rtrim($path !== false ? $path : $lpath, '/') . '/' . \date('Y-m-d') . '.log' + $this->path = is_dir($lpath) || strpos($lpath, '.') === false + ? rtrim($path !== false ? $path : $lpath, '/') . '/' . date('Y-m-d') . '.log' : $lpath; } @@ -117,7 +117,7 @@ final class FileLogger implements LoggerInterface */ private function createFile() : void { - if (!$this->created && !\is_file($this->path)) { + if (!$this->created && !is_file($this->path)) { File::create($this->path); $this->created = true; } @@ -153,7 +153,7 @@ final class FileLogger implements LoggerInterface public function __destruct() { if (\is_resource($this->fp)) { - \fclose($this->fp); + fclose($this->fp); } } @@ -180,7 +180,7 @@ final class FileLogger implements LoggerInterface */ public static function startTimeLog(string $id = '') : bool { - self::$timings[$id] = ['start' => \microtime(true), 'end' => 0.0, 'time' => 0.0]; + self::$timings[$id] = ['start' => microtime(true), 'end' => 0.0, 'time' => 0.0]; return true; } @@ -196,7 +196,7 @@ final class FileLogger implements LoggerInterface */ public static function endTimeLog(string $id = '') : float { - $mtime = \microtime(true); + $mtime = microtime(true); self::$timings[$id]['end'] = $mtime; self::$timings[$id]['time'] = $mtime - self::$timings[$id]['start']; @@ -222,7 +222,7 @@ final class FileLogger implements LoggerInterface $replace['{' . $key . '}'] = $val; } - $backtrace = \debug_backtrace(); + $backtrace = debug_backtrace(); // Removing sensitive config data from logging foreach ($backtrace as $key => $value) { @@ -231,18 +231,18 @@ final class FileLogger implements LoggerInterface } } - $backtrace = \json_encode($backtrace); + $backtrace = json_encode($backtrace); $replace['{backtrace}'] = $backtrace; - $replace['{datetime}'] = \sprintf('%--19s', (new \DateTimeImmutable('NOW'))->format('Y-m-d H:i:s')); - $replace['{level}'] = \sprintf('%--12s', $level); + $replace['{datetime}'] = sprintf('%--19s', (new \DateTimeImmutable('NOW'))->format('Y-m-d H:i:s')); + $replace['{level}'] = sprintf('%--12s', $level); $replace['{path}'] = $_SERVER['REQUEST_URI'] ?? 'REQUEST_URI'; - $replace['{ip}'] = \sprintf('%--15s', $_SERVER['REMOTE_ADDR'] ?? '0.0.0.0'); - $replace['{version}'] = \sprintf('%--15s', \PHP_VERSION); - $replace['{os}'] = \sprintf('%--15s', \PHP_OS); - $replace['{line}'] = \sprintf('%--15s', $context['line'] ?? '?'); + $replace['{ip}'] = sprintf('%--15s', $_SERVER['REMOTE_ADDR'] ?? '0.0.0.0'); + $replace['{version}'] = sprintf('%--15s', \PHP_VERSION); + $replace['{os}'] = sprintf('%--15s', \PHP_OS); + $replace['{line}'] = sprintf('%--15s', $context['line'] ?? '?'); - return \strtr($message, $replace); + return strtr($message, $replace); } /** @@ -261,17 +261,17 @@ final class FileLogger implements LoggerInterface } $this->createFile(); - if (!\is_writable($this->path)) { + if (!is_writable($this->path)) { return; // @codeCoverageIgnore } - $this->fp = \fopen($this->path, 'a'); + $this->fp = fopen($this->path, 'a'); - if ($this->fp !== false && \flock($this->fp, \LOCK_EX)) { - \fwrite($this->fp, $message . "\n"); - \fflush($this->fp); - \flock($this->fp, \LOCK_UN); - \fclose($this->fp); + if ($this->fp !== false && flock($this->fp, \LOCK_EX)) { + fwrite($this->fp, $message . "\n"); + fflush($this->fp); + flock($this->fp, \LOCK_UN); + fclose($this->fp); $this->fp = false; } } @@ -372,36 +372,36 @@ final class FileLogger implements LoggerInterface { $levels = []; - if (!\is_file($this->path)) { + if (!is_file($this->path)) { return $levels; } - $this->fp = \fopen($this->path, 'r'); + $this->fp = fopen($this->path, 'r'); if ($this->fp === false) { return $levels; // @codeCoverageIgnore } - \fseek($this->fp, 0); - $line = \fgetcsv($this->fp, 0, ';'); + fseek($this->fp, 0); + $line = fgetcsv($this->fp, 0, ';'); while ($line !== false && $line !== null) { if (\count($line) < 2) { continue; // @codeCoverageIgnore } - $line[1] = \trim($line[1]); + $line[1] = trim($line[1]); if (!isset($levels[$line[1]])) { $levels[$line[1]] = 0; } ++$levels[$line[1]]; - $line = \fgetcsv($this->fp, 0, ';'); + $line = fgetcsv($this->fp, 0, ';'); } - \fseek($this->fp, 0, \SEEK_END); - \fclose($this->fp); + fseek($this->fp, 0, \SEEK_END); + fclose($this->fp); return $levels; } @@ -419,37 +419,37 @@ final class FileLogger implements LoggerInterface { $connection = []; - if (!\is_file($this->path)) { + if (!is_file($this->path)) { return $connection; } - $this->fp = \fopen($this->path, 'r'); + $this->fp = fopen($this->path, 'r'); if ($this->fp === false) { return $connection; // @codeCoverageIgnore } - \fseek($this->fp, 0); - $line = \fgetcsv($this->fp, 0, ';'); + fseek($this->fp, 0); + $line = fgetcsv($this->fp, 0, ';'); while ($line !== false && $line !== null) { if (\count($line) < 3) { continue; // @codeCoverageIgnore } - $line[2] = \trim($line[2]); + $line[2] = trim($line[2]); if (!isset($connection[$line[2]])) { $connection[$line[2]] = 0; } ++$connection[$line[2]]; - $line = \fgetcsv($this->fp, 0, ';'); + $line = fgetcsv($this->fp, 0, ';'); } - \fseek($this->fp, 0, \SEEK_END); - \fclose($this->fp); - \asort($connection); + fseek($this->fp, 0, \SEEK_END); + fclose($this->fp); + asort($connection); return \array_slice($connection, 0, $limit); } @@ -469,19 +469,19 @@ final class FileLogger implements LoggerInterface $logs = []; $id = 0; - if (!\is_file($this->path)) { + if (!is_file($this->path)) { return $logs; } - $this->fp = \fopen($this->path, 'r'); + $this->fp = fopen($this->path, 'r'); if ($this->fp === false) { return $logs; // @codeCoverageIgnore } - \fseek($this->fp, 0); + fseek($this->fp, 0); - $line = \fgetcsv($this->fp, 0, ';'); + $line = fgetcsv($this->fp, 0, ';'); while ($line !== false && $line !== null) { if ($limit < 1) { break; @@ -490,25 +490,25 @@ final class FileLogger implements LoggerInterface ++$id; if ($offset > 0) { - $line = \fgetcsv($this->fp, 0, ';'); + $line = fgetcsv($this->fp, 0, ';'); --$offset; continue; } foreach ($line as &$value) { - $value = \trim($value); + $value = trim($value); } $logs[$id] = $line; --$limit; - $line = \fgetcsv($this->fp, 0, ';'); + $line = fgetcsv($this->fp, 0, ';'); } - \fseek($this->fp, 0, \SEEK_END); - \fclose($this->fp); + fseek($this->fp, 0, \SEEK_END); + fclose($this->fp); return $logs; } @@ -527,19 +527,19 @@ final class FileLogger implements LoggerInterface $log = []; $current = 0; - if (!\is_file($this->path)) { + if (!is_file($this->path)) { return $log; } - $this->fp = \fopen($this->path, 'r'); + $this->fp = fopen($this->path, 'r'); if ($this->fp === false) { return $log; // @codeCoverageIgnore } - \fseek($this->fp, 0); + fseek($this->fp, 0); - while (($line = \fgetcsv($this->fp, 0, ';')) !== false && $current <= $id) { + while (($line = fgetcsv($this->fp, 0, ';')) !== false && $current <= $id) { ++$current; if ($current < $id || $line === null) { @@ -547,14 +547,14 @@ final class FileLogger implements LoggerInterface } foreach ($line as $value) { - $log[] = \trim($value); + $log[] = trim($value); } break; } - \fseek($this->fp, 0, \SEEK_END); - \fclose($this->fp); + fseek($this->fp, 0, \SEEK_END); + fclose($this->fp); return $log; } @@ -573,7 +573,7 @@ final class FileLogger implements LoggerInterface public function console(string $message, bool $verbose = true, array $context = []) : void { if (empty($context)) { - $message = \date('[Y-m-d H:i:s] ') . $message . "\r\n"; + $message = date('[Y-m-d H:i:s] ') . $message . "\r\n"; } if ($verbose) { diff --git a/Math/Functions/Beta.php b/Math/Functions/Beta.php index 65eef0e32..eebe7afa3 100644 --- a/Math/Functions/Beta.php +++ b/Math/Functions/Beta.php @@ -71,7 +71,7 @@ final class Beta return 0.0; } - $bGamma = \exp(-self::logBeta($p, $q) + $p * \log($x) + $q * \log(1.0 - $x)); + $bGamma = exp(-self::logBeta($p, $q) + $p * log($x) + $q * log(1.0 - $x)); // this uses the symmetry of the beta function return ($x < ($p + 1.0) / ($p + $q + 2.0) @@ -99,7 +99,7 @@ final class Beta $pMinus = $p - 1.0; $h = 1.0 - $pqSum * $x / $pPlus; - if (\abs($h) < 1.18e-37) { + if (abs($h) < 1.18e-37) { $h = 1.18e-37; } @@ -112,33 +112,33 @@ final class Beta $m2 = 2 * $m; $d = $m * ($q - $m) * $x / (($pMinus + $m2) * ($p + $m2)); $h = 1.0 + $d * $h; - if (\abs($h) < 1.18e-37) { + if (abs($h) < 1.18e-37) { $h = 1.18e-37; } $h = 1.0 / $h; $c = 1.0 + $d / $c; - if (\abs($c) < 1.18e-37) { + if (abs($c) < 1.18e-37) { $c = 1.18e-37; } $frac *= $h * $c; $d = -($p + $m) * ($pqSum + $m) * $x / (($p + $m2) * ($pPlus + $m2)); $h = 1.0 + $d * $h; - if (\abs($h) < 1.18e-37) { + if (abs($h) < 1.18e-37) { $h = 1.18e-37; } $h = 1.0 / $h; $c = 1.0 + $d / $c; - if (\abs($c) < 1.18e-37) { + if (abs($c) < 1.18e-37) { $c = 1.18e-37; } $delta = $h * $c; $frac *= $delta; ++$m; - } while ($m < 1000000 && \abs($delta - 1.0) > 8.88e-16); + } while ($m < 1000000 && abs($delta - 1.0) > 8.88e-16); return $frac; } @@ -172,6 +172,6 @@ final class Beta */ public static function beta(float $p, float $q) : float { - return \exp(self::logBeta($p, $q)); + return exp(self::logBeta($p, $q)); } } diff --git a/Math/Functions/Fibonacci.php b/Math/Functions/Fibonacci.php index ac9d77ae3..f4b711c6f 100644 --- a/Math/Functions/Fibonacci.php +++ b/Math/Functions/Fibonacci.php @@ -90,6 +90,6 @@ final class Fibonacci */ public static function binet(int $n) : int { - return (int) (((1 + \sqrt(5)) ** $n - (1 - \sqrt(5)) ** $n) / (2 ** $n * \sqrt(5))); + return (int) (((1 + sqrt(5)) ** $n - (1 - sqrt(5)) ** $n) / (2 ** $n * sqrt(5))); } } diff --git a/Math/Functions/Functions.php b/Math/Functions/Functions.php index e695e8fd3..86fdd518d 100644 --- a/Math/Functions/Functions.php +++ b/Math/Functions/Functions.php @@ -73,11 +73,11 @@ final class Functions */ public static function binomialCoefficient(int $n, int $k) : int { - $max = \max([$k, $n - $k]); - $min = \min([$k, $n - $k]); + $max = max([$k, $n - $k]); + $min = min([$k, $n - $k]); $fact = 1; - $range = \array_reverse(\range(1, $min)); + $range = array_reverse(range(1, $min)); for ($i = $max + 1; $i < $n + 1; ++$i) { $div = 1; @@ -232,7 +232,7 @@ final class Functions */ public static function getRelativeDegree(int $value, int $length, int $start = 0) : int { - return \abs(self::mod($value - $start, $length)); + return abs(self::mod($value - $start, $length)); } /** @@ -249,7 +249,7 @@ final class Functions */ public static function getErf(float $value) : float { - if (\abs($value) > 2.2) { + if (abs($value) > 2.2) { return 1 - self::getErfc($value); } @@ -268,9 +268,9 @@ final class Functions $sum += $term / (2 * $i + 1); ++$i; - } while ($sum !== 0.0 && \abs($term / $sum) > 0.0000001); + } while ($sum !== 0.0 && abs($term / $sum) > 0.0000001); - return 2 / \sqrt(\M_PI) * $sum; + return 2 / sqrt(\M_PI) * $sum; } /** @@ -287,7 +287,7 @@ final class Functions */ public static function getErfc(float $value) : float { - if (\abs($value) <= 2.2) { + if (abs($value) <= 2.2) { return 1 - self::getErf($value); } @@ -311,9 +311,9 @@ final class Functions $n += 0.5; $q1 = $q2; $q2 = $b / $d; - } while (\abs($q1 - $q2) / $q2 > 0.0000001); + } while (abs($q1 - $q2) / $q2 > 0.0000001); - return 1 / \sqrt(\M_PI) * \exp(-$value * $value) * $q2; + return 1 / sqrt(\M_PI) * exp(-$value * $value) * $q2; } /** @@ -332,8 +332,8 @@ final class Functions public static function generalizedHypergeometricFunction(array $a, array $b, float $z) : float { $sum = 0.0; - $aProd = \array_fill(0, 20, []); - $bProd = \array_fill(0, 20, []); + $aProd = array_fill(0, 20, []); + $bProd = array_fill(0, 20, []); for ($n = 0; $n < 20; ++$n) { foreach ($a as $key => $value) { @@ -352,7 +352,7 @@ final class Functions } } - $temp = \array_product($aProd[$n]) / \array_product($bProd[$n]); + $temp = array_product($aProd[$n]) / array_product($bProd[$n]); $sum += $temp * $z ** $n / self::fact($n); } diff --git a/Math/Functions/Gamma.php b/Math/Functions/Gamma.php index 7b907ec82..3d0df7372 100644 --- a/Math/Functions/Gamma.php +++ b/Math/Functions/Gamma.php @@ -45,7 +45,7 @@ final class Gamma */ public static function gamma(int | float $z) : float { - return \exp(self::logGamma($z)); + return exp(self::logGamma($z)); } /** @@ -71,7 +71,7 @@ final class Gamma public static function lanczosApproximationReal(int | float $z) : float { if ($z < 0.5) { - return \M_PI / (\sin(\M_PI * $z) * self::lanczosApproximationReal(1 - $z)); + return \M_PI / (sin(\M_PI * $z) * self::lanczosApproximationReal(1 - $z)); } --$z; @@ -82,7 +82,7 @@ final class Gamma $a += self::LANCZOSAPPROXIMATION[$i] / ($z + $i); } - return \sqrt(2 * \M_PI) * \pow($t, $z + 0.5) * \exp(-$t) * $a; + return sqrt(2 * \M_PI) * pow($t, $z + 0.5) * exp(-$t) * $a; } /** @@ -96,7 +96,7 @@ final class Gamma */ public static function stirlingApproximation(int | float $x) : float { - return \sqrt(2.0 * \M_PI / $x) * \pow($x / \M_E, $x); + return sqrt(2.0 * \M_PI / $x) * pow($x / \M_E, $x); } /** @@ -111,10 +111,10 @@ final class Gamma public static function spougeApproximation(int | float $z) : float { $k1_fact = 1.0; - $c = [\sqrt(2.0 * \M_PI)]; + $c = [sqrt(2.0 * \M_PI)]; for ($k = 1; $k < 12; ++$k) { - $c[$k] = \exp(12 - $k) * \pow(12 - $k, $k - 0.5) / $k1_fact; + $c[$k] = exp(12 - $k) * pow(12 - $k, $k - 0.5) / $k1_fact; $k1_fact *= -$k; } @@ -123,7 +123,7 @@ final class Gamma $accm += $c[$k] / ($z + $k); } - $accm *= \exp(-$z - 12) * \pow($z + 12, $z + 0.5); + $accm *= exp(-$z - 12) * pow($z + 12, $z + 0.5); return $accm / $z; } @@ -149,14 +149,14 @@ final class Gamma $y = $z; - $temp = $z + 5.5 - ($z + 0.5) * \log($z + 5.5); + $temp = $z + 5.5 - ($z + 0.5) * log($z + 5.5); $sum = 1.000000000190015; for ($i = 0; $i < 6; ++$i) { $sum += $approx[$i] / ++$y; } - return -$temp + \log(\sqrt(2 * \M_PI) * $sum / $z); + return -$temp + log(sqrt(2 * \M_PI) * $sum / $z); } /** @@ -187,7 +187,7 @@ final class Gamma */ public static function incompleteGammaFirst(float $a, float $x) : float { - return self::regularizedGamma($a, $x) * \exp(self::logGamma($a)); + return self::regularizedGamma($a, $x) * exp(self::logGamma($a)); } /** @@ -202,7 +202,7 @@ final class Gamma */ public static function incompleteGammaSecond(float $a, float $x) : float { - return \exp(self::logGamma($a)) - self::regularizedGamma($a, $x) * \exp(self::logGamma($a)); + return exp(self::logGamma($a)) - self::regularizedGamma($a, $x) * exp(self::logGamma($a)); } /** @@ -252,7 +252,7 @@ final class Gamma $sum += $del; if ($del < $sum * 2.22e-16) { - return $sum * \exp(-$x + $a * \log($x) - self::logGamma($a)); + return $sum * exp(-$x + $a * log($x) - self::logGamma($a)); } } @@ -280,17 +280,17 @@ final class Gamma $h = $d; $del = 0.0; - for ($i = 1; $i < 150 && \abs($del - 1.0) > 2.22e-16; ++$i) { + for ($i = 1; $i < 150 && abs($del - 1.0) > 2.22e-16; ++$i) { $an = - $i * ($i - $a); $b += 2.0; $d = $an * $d + $b; $c = $b + $an / $c; - if (\abs($c) < 1.18e-37) { + if (abs($c) < 1.18e-37) { $c = 1.18e-37; } - if (\abs($d) < 1.18e-37) { + if (abs($d) < 1.18e-37) { $d = 1.18e-37; } @@ -299,6 +299,6 @@ final class Gamma $h *= $del; } - return \exp(-$x + $a * \log($x) - self::logGamma($a)) * $h; + return exp(-$x + $a * log($x) - self::logGamma($a)) * $h; } } diff --git a/Math/Geometry/ConvexHull/MonotoneChain.php b/Math/Geometry/ConvexHull/MonotoneChain.php index c298dc5f3..5def0073d 100644 --- a/Math/Geometry/ConvexHull/MonotoneChain.php +++ b/Math/Geometry/ConvexHull/MonotoneChain.php @@ -49,7 +49,7 @@ final class MonotoneChain return $points; } - \uasort($points, [self::class, 'sort']); + uasort($points, [self::class, 'sort']); $k = 0; $result = []; @@ -72,7 +72,7 @@ final class MonotoneChain $result[$k++] = $points[$i]; } - \ksort($result); + ksort($result); /** @return array */ return \array_slice($result, 0, $k - 1); diff --git a/Math/Geometry/Shape/D2/Circle.php b/Math/Geometry/Shape/D2/Circle.php index ef3fe9467..8e0de01ff 100644 --- a/Math/Geometry/Shape/D2/Circle.php +++ b/Math/Geometry/Shape/D2/Circle.php @@ -63,7 +63,7 @@ final class Circle implements D2ShapeInterface */ public static function getRadiusBySurface(float $surface) : float { - return \sqrt($surface / \M_PI); + return sqrt($surface / \M_PI); } /** diff --git a/Math/Geometry/Shape/D2/Ellipse.php b/Math/Geometry/Shape/D2/Ellipse.php index 21ec766e3..10d3de632 100644 --- a/Math/Geometry/Shape/D2/Ellipse.php +++ b/Math/Geometry/Shape/D2/Ellipse.php @@ -61,6 +61,6 @@ final class Ellipse implements D2ShapeInterface */ public static function getPerimeter(float $a, float $b) : float { - return \M_PI * ($a + $b) * (3 * ($a - $b) ** 2 / (($a + $b) ** 2 * (\sqrt(-3 * ($a - $b) ** 2 / (($a + $b) ** 2) + 4) + 10)) + 1); + return \M_PI * ($a + $b) * (3 * ($a - $b) ** 2 / (($a + $b) ** 2 * (sqrt(-3 * ($a - $b) ** 2 / (($a + $b) ** 2) + 4) + 10)) + 1); } } diff --git a/Math/Geometry/Shape/D2/Polygon.php b/Math/Geometry/Shape/D2/Polygon.php index d6ef05108..275e38d15 100644 --- a/Math/Geometry/Shape/D2/Polygon.php +++ b/Math/Geometry/Shape/D2/Polygon.php @@ -106,26 +106,26 @@ final class Polygon implements D2ShapeInterface $vertex1 = $polygon[$i - 1]; $vertex2 = $polygon[$i]; - if (\abs($vertex1['y'] - $vertex2['y']) < self::EPSILON - && \abs($vertex1['y'] - $point['y']) < self::EPSILON - && $point['x'] > \min($vertex1['x'], $vertex2['x']) - && $point['x'] < \max($vertex1['x'], $vertex2['x']) + if (abs($vertex1['y'] - $vertex2['y']) < self::EPSILON + && abs($vertex1['y'] - $point['y']) < self::EPSILON + && $point['x'] > min($vertex1['x'], $vertex2['x']) + && $point['x'] < max($vertex1['x'], $vertex2['x']) ) { return 0; // boundary } - if ($point['y'] > \min($vertex1['y'], $vertex2['y']) - && $point['y'] <= \max($vertex1['y'], $vertex2['y']) - && $point['x'] <= \max($vertex1['x'], $vertex2['x']) - && \abs($vertex1['y'] - $vertex2['y']) >= self::EPSILON + if ($point['y'] > min($vertex1['y'], $vertex2['y']) + && $point['y'] <= max($vertex1['y'], $vertex2['y']) + && $point['x'] <= max($vertex1['x'], $vertex2['x']) + && abs($vertex1['y'] - $vertex2['y']) >= self::EPSILON ) { $xinters = ($point['y'] - $vertex1['y']) * ($vertex2['x'] - $vertex1['x']) / ($vertex2['y'] - $vertex1['y']) + $vertex1['x']; - if (\abs($xinters - $point['x']) < self::EPSILON) { + if (abs($xinters - $point['x']) < self::EPSILON) { return 0; // boundary } - if (\abs($vertex1['x'] - $vertex2['x']) < self::EPSILON || $point['x'] < $xinters) { + if (abs($vertex1['x'] - $vertex2['x']) < self::EPSILON || $point['x'] < $xinters) { ++$countIntersect; } } @@ -151,7 +151,7 @@ final class Polygon implements D2ShapeInterface private static function isOnVertex(array $point, array $polygon) : bool { foreach ($polygon as $vertex) { - if (\abs($point['x'] - $vertex['x']) < self::EPSILON && \abs($point['y'] - $vertex['y']) < self::EPSILON) { + if (abs($point['x'] - $vertex['x']) < self::EPSILON && abs($point['y'] - $vertex['y']) < self::EPSILON) { return true; } } @@ -192,7 +192,7 @@ final class Polygon implements D2ShapeInterface */ public function getSurface() : float { - return \abs($this->getSignedSurface()); + return abs($this->getSignedSurface()); } /** @@ -227,10 +227,10 @@ final class Polygon implements D2ShapeInterface public function getPerimeter() : float { $count = \count($this->coord); - $perimeter = \sqrt(($this->coord[0]['x'] - $this->coord[$count - 1]['x']) ** 2 + ($this->coord[0]['y'] - $this->coord[$count - 1]['y']) ** 2); + $perimeter = sqrt(($this->coord[0]['x'] - $this->coord[$count - 1]['x']) ** 2 + ($this->coord[0]['y'] - $this->coord[$count - 1]['y']) ** 2); for ($i = 0; $i < $count - 1; ++$i) { - $perimeter += \sqrt(($this->coord[$i + 1]['x'] - $this->coord[$i]['x']) ** 2 + ($this->coord[$i + 1]['y'] - $this->coord[$i]['y']) ** 2); + $perimeter += sqrt(($this->coord[$i + 1]['x'] - $this->coord[$i]['x']) ** 2 + ($this->coord[$i + 1]['y'] - $this->coord[$i]['y']) ** 2); } return $perimeter; @@ -278,7 +278,7 @@ final class Polygon implements D2ShapeInterface */ public static function getRegularAreaByLength(float $length, int $sides) : float { - return $length ** 2 * $sides / (4 * \tan(\M_PI / $sides)); + return $length ** 2 * $sides / (4 * tan(\M_PI / $sides)); } /** @@ -293,6 +293,6 @@ final class Polygon implements D2ShapeInterface */ public static function getRegularAreaByRadius(float $r, int $sides) : float { - return $r ** 2 * $sides * \tan(\M_PI / $sides); + return $r ** 2 * $sides * tan(\M_PI / $sides); } } diff --git a/Math/Geometry/Shape/D2/Quadrilateral.php b/Math/Geometry/Shape/D2/Quadrilateral.php index 3ccca5e6b..73cdfcac7 100644 --- a/Math/Geometry/Shape/D2/Quadrilateral.php +++ b/Math/Geometry/Shape/D2/Quadrilateral.php @@ -39,8 +39,8 @@ final class Quadrilateral implements D2ShapeInterface public static function getSurfaceFromSidesAndAngle(float $a, float $b, float $c, float $d, float $alpha) : float { $s = ($a + $b + $c + $d) / 2; - $gamma = \acos(($c ** 2 + $d ** 2 - $a ** 2 - $b ** 2 + 2 * $a * $b * \cos(\deg2rad($alpha))) / (2 * $c * $d)); + $gamma = acos(($c ** 2 + $d ** 2 - $a ** 2 - $b ** 2 + 2 * $a * $b * cos(deg2rad($alpha))) / (2 * $c * $d)); - return \sqrt(($s - $a) * ($s - $b) * ($s - $c) * ($s - $d) - $a * $b * $c * $d * \cos((\deg2rad($alpha) + $gamma) / 2) ** 2); + return sqrt(($s - $a) * ($s - $b) * ($s - $c) * ($s - $d) - $a * $b * $c * $d * cos((deg2rad($alpha) + $gamma) / 2) ** 2); } } diff --git a/Math/Geometry/Shape/D2/Rectangle.php b/Math/Geometry/Shape/D2/Rectangle.php index a136f2629..40ace77d7 100644 --- a/Math/Geometry/Shape/D2/Rectangle.php +++ b/Math/Geometry/Shape/D2/Rectangle.php @@ -66,6 +66,6 @@ final class Rectangle implements D2ShapeInterface */ public static function getDiagonal(float $a, float $b) : float { - return \sqrt($a * $a + $b * $b); + return sqrt($a * $a + $b * $b); } } diff --git a/Math/Geometry/Shape/D2/Triangle.php b/Math/Geometry/Shape/D2/Triangle.php index 80d8ee0e0..d7a6185cf 100644 --- a/Math/Geometry/Shape/D2/Triangle.php +++ b/Math/Geometry/Shape/D2/Triangle.php @@ -92,6 +92,6 @@ final class Triangle implements D2ShapeInterface $hypot += $val * $val; } - return \sqrt($hypot); + return sqrt($hypot); } } diff --git a/Math/Geometry/Shape/D3/Cone.php b/Math/Geometry/Shape/D3/Cone.php index 8b962eecf..d4ea10b97 100644 --- a/Math/Geometry/Shape/D3/Cone.php +++ b/Math/Geometry/Shape/D3/Cone.php @@ -51,7 +51,7 @@ final class Cone implements D3ShapeInterface */ public static function getSurface(float $r, float $h) : float { - return \M_PI * $r * ($r + \sqrt($h ** 2 + $r ** 2)); + return \M_PI * $r * ($r + sqrt($h ** 2 + $r ** 2)); } /** @@ -66,7 +66,7 @@ final class Cone implements D3ShapeInterface */ public static function getSlantHeight(float $r, float $h) : float { - return \sqrt($h ** 2 + $r ** 2); + return sqrt($h ** 2 + $r ** 2); } /** diff --git a/Math/Geometry/Shape/D3/RectangularPyramid.php b/Math/Geometry/Shape/D3/RectangularPyramid.php index 1b1270654..f92fdbbeb 100644 --- a/Math/Geometry/Shape/D3/RectangularPyramid.php +++ b/Math/Geometry/Shape/D3/RectangularPyramid.php @@ -53,7 +53,7 @@ final class RectangularPyramid implements D3ShapeInterface */ public static function getSurface(float $a, float $b, float $h) : float { - return $a * $b + $a * \sqrt(($b / 2) ** 2 + $h ** 2) + $b * \sqrt(($a / 2) ** 2 + $h ** 2); + return $a * $b + $a * sqrt(($b / 2) ** 2 + $h ** 2) + $b * sqrt(($a / 2) ** 2 + $h ** 2); } /** @@ -69,6 +69,6 @@ final class RectangularPyramid implements D3ShapeInterface */ public static function getLateralSurface(float $a, float $b, float $h) : float { - return $a * \sqrt(($b / 2) ** 2 + $h ** 2) + $b * \sqrt(($a / 2) ** 2 + $h ** 2); + return $a * sqrt(($b / 2) ** 2 + $h ** 2) + $b * sqrt(($a / 2) ** 2 + $h ** 2); } } diff --git a/Math/Geometry/Shape/D3/Sphere.php b/Math/Geometry/Shape/D3/Sphere.php index a01475506..e1fb85ab3 100644 --- a/Math/Geometry/Shape/D3/Sphere.php +++ b/Math/Geometry/Shape/D3/Sphere.php @@ -59,18 +59,18 @@ final class Sphere implements D3ShapeInterface */ public static function distance2PointsOnSphere(float $latStart, float $longStart, float $latEnd, float $longEnd, float $radius = 6371000.0) : float { - $latFrom = \deg2rad($latStart); - $lonFrom = \deg2rad($longStart); - $latTo = \deg2rad($latEnd); - $lonTo = \deg2rad($longEnd); + $latFrom = deg2rad($latStart); + $lonFrom = deg2rad($longStart); + $latTo = deg2rad($latEnd); + $lonTo = deg2rad($longEnd); //$latDelta = $latTo - $latFrom; $lonDelta = $lonTo - $lonFrom; - $a = \pow(\cos($latTo) * \sin($lonDelta), 2) + \pow(\cos($latFrom) * \sin($latTo) - \sin($latFrom) * \cos($latTo) * \cos($lonDelta), 2); - $b = \sin($latFrom) * \sin($latTo) + \cos($latFrom) * \cos($latTo) * \cos($lonDelta); + $a = pow(cos($latTo) * sin($lonDelta), 2) + pow(cos($latFrom) * sin($latTo) - sin($latFrom) * cos($latTo) * cos($lonDelta), 2); + $b = sin($latFrom) * sin($latTo) + cos($latFrom) * cos($latTo) * cos($lonDelta); - $angle = \atan2(\sqrt($a), $b); + $angle = atan2(sqrt($a), $b); // Approximation (very good for short distances) // $angle = 2 * asin(\sqrt(\pow(\sin($latDelta / 2), 2) + \cos($latFrom) * \cos($latTo) * \pow(\sin($lonDelta / 2), 2))); @@ -116,7 +116,7 @@ final class Sphere implements D3ShapeInterface */ public static function getRadiusByVolume(float $v) : float { - return \pow($v * 3 / (4 * \M_PI), 1 / 3); + return pow($v * 3 / (4 * \M_PI), 1 / 3); } /** @@ -147,7 +147,7 @@ final class Sphere implements D3ShapeInterface */ public static function getRadiusBySurface(float $S) : float { - return \sqrt($S / (4 * \M_PI)); + return sqrt($S / (4 * \M_PI)); } /** diff --git a/Math/Geometry/Shape/D3/Tetrahedron.php b/Math/Geometry/Shape/D3/Tetrahedron.php index b14332e01..69687ed6d 100644 --- a/Math/Geometry/Shape/D3/Tetrahedron.php +++ b/Math/Geometry/Shape/D3/Tetrahedron.php @@ -35,7 +35,7 @@ final class Tetrahedron implements D3ShapeInterface */ public static function getVolume(float $a) : float { - return $a ** 3 / (6 * \sqrt(2)); + return $a ** 3 / (6 * sqrt(2)); } /** @@ -49,7 +49,7 @@ final class Tetrahedron implements D3ShapeInterface */ public static function getSurface(float $a) : float { - return \sqrt(3) * $a ** 2; + return sqrt(3) * $a ** 2; } /** @@ -63,6 +63,6 @@ final class Tetrahedron implements D3ShapeInterface */ public static function getFaceArea(float $a) : float { - return \sqrt(3) / 4 * $a ** 2; + return sqrt(3) / 4 * $a ** 2; } } diff --git a/Math/Matrix/CholeskyDecomposition.php b/Math/Matrix/CholeskyDecomposition.php index 1b36156bd..304d2b51e 100644 --- a/Math/Matrix/CholeskyDecomposition.php +++ b/Math/Matrix/CholeskyDecomposition.php @@ -73,7 +73,7 @@ final class CholeskyDecomposition if ($i === $j) { if ($sum >= 0) { - $this->L[$i][$i] = \sqrt($sum); + $this->L[$i][$i] = sqrt($sum); } else { $this->isSpd = false; } diff --git a/Math/Matrix/EigenvalueDecomposition.php b/Math/Matrix/EigenvalueDecomposition.php index c29952b3f..b4fa7ab9c 100644 --- a/Math/Matrix/EigenvalueDecomposition.php +++ b/Math/Matrix/EigenvalueDecomposition.php @@ -159,7 +159,7 @@ final class EigenvalueDecomposition $h = 0.0; for ($k = 0; $k < $i; ++$k) { - $scale += \abs($this->D[$k]); + $scale += abs($this->D[$k]); } if ($scale == 0) { @@ -176,7 +176,7 @@ final class EigenvalueDecomposition } $f = $this->D[$i - 1]; - $g = $f > 0 ? -\sqrt($h) : \sqrt($h); + $g = $f > 0 ? -sqrt($h) : sqrt($h); $this->E[$i] = $scale * $g; $h -= $f * $g; @@ -282,11 +282,11 @@ final class EigenvalueDecomposition $eps = 0.00001; for ($l = 0; $l < $this->m; ++$l) { - $tst1 = \max($tst1, \abs($this->D[$l]) + \abs($this->E[$l])); + $tst1 = max($tst1, abs($this->D[$l]) + abs($this->E[$l])); $m = $l; while ($m < $this->m) { - if (\abs($this->E[$m]) <= $eps * $tst1) { + if (abs($this->E[$m]) <= $eps * $tst1) { break; } @@ -344,7 +344,7 @@ final class EigenvalueDecomposition $p = -$s * $s2 * $c3 * $el1 * $this->E[$l] / $dl1; $this->E[$l] = $s * $p; $this->D[$l] = $c * $p; - } while (\abs($this->E[$l]) > $eps * $tst1); + } while (abs($this->E[$l]) > $eps * $tst1); } $this->D[$l] += $f; @@ -391,7 +391,7 @@ final class EigenvalueDecomposition $scale = 0.0; for ($i = $m; $i <= $high; ++$i) { - $scale += \abs($this->H[$i][$m - 1]); + $scale += abs($this->H[$i][$m - 1]); } if ($scale != 0) { @@ -401,7 +401,7 @@ final class EigenvalueDecomposition $h += $this->ort[$i] * $this->ort[$i]; } - $g = $this->ort[$m] > 0 ? -\sqrt($h) : \sqrt($h); + $g = $this->ort[$m] > 0 ? -sqrt($h) : sqrt($h); $h -= $this->ort[$m] * $g; $this->ort[$m] -= $g; @@ -478,7 +478,7 @@ final class EigenvalueDecomposition $r = 0.0; $d = 0.0; - if (\abs($yr) > \abs($yi)) { + if (abs($yr) > abs($yi)) { $r = $yi / $yr; $d = $yr + $r * $yi; @@ -521,8 +521,8 @@ final class EigenvalueDecomposition $this->E[$i] = 0.0; } - for ($j = \max($i - 1, 0); $j < $nn; ++$j) { - $norm += \abs($this->H[$i][$j]); + for ($j = max($i - 1, 0); $j < $nn; ++$j) { + $norm += abs($this->H[$i][$j]); } } @@ -530,12 +530,12 @@ final class EigenvalueDecomposition while ($n >= $low) { $l = $n; while ($l > $low) { - $s = \abs($this->H[$l - 1][$l - 1]) + \abs($this->H[$l][$l]); + $s = abs($this->H[$l - 1][$l - 1]) + abs($this->H[$l][$l]); if ($s == 0) { $s = $norm; } - if (\abs($this->H[$l][$l - 1]) < $eps * $s) { + if (abs($this->H[$l][$l - 1]) < $eps * $s) { break; } @@ -553,7 +553,7 @@ final class EigenvalueDecomposition $w = $this->H[$n][$n - 1] * $this->H[$n - 1][$n]; $p = ($this->H[$n - 1][$n - 1] - $this->H[$n][$n]) / 2.0; $q = $p * $p + $w; - $z = \sqrt(\abs($q)); + $z = sqrt(abs($q)); $this->H[$n][$n] += $exshift; $this->H[$n - 1][$n - 1] += $exshift; @@ -568,10 +568,10 @@ final class EigenvalueDecomposition $this->E[$n] = 0.0; $x = $this->H[$n][$n - 1]; - $s = \abs($x) + \abs($z); + $s = abs($x) + abs($z); $p = $x / $s; $q = $z / $s; - $r = \sqrt($p * $p + $q * $q); + $r = sqrt($p * $p + $q * $q); $p /= $r; $q /= $r; @@ -617,7 +617,7 @@ final class EigenvalueDecomposition $this->H[$i][$i] -= $x; } - $s = \abs($this->H[$n][$n - 1]) + \abs($this->H[$n - 1][$n - 2]); + $s = abs($this->H[$n][$n - 1]) + abs($this->H[$n - 1][$n - 2]); $x = 0.75 * $s; $y = $x; $w = -0.4375 * $s * $s; @@ -628,7 +628,7 @@ final class EigenvalueDecomposition $s = $s * $s + $w; if ($s > 0) { - $s = $y < $x ? -\sqrt($s) : \sqrt($s); + $s = $y < $x ? -sqrt($s) : sqrt($s); $s = $x - $w / (($y - $x) / 2.0 + $s); for ($i = $low; $i <= $n; ++$i) { @@ -650,13 +650,13 @@ final class EigenvalueDecomposition $p = ($r * $s - $w) / $this->H[$m + 1][$m] + $this->H[$m][$m + 1]; $q = $this->H[$m + 1][$m + 1] - $z - $r - $s; $r = $this->H[$m + 2][$m + 1]; - $s = \abs($p) + \abs($q) + \abs($r); + $s = abs($p) + abs($q) + abs($r); $p /= $s; $q /= $s; $r /= $s; if ($m === $l - || \abs($this->H[$m][$m - 1]) * (\abs($q) + \abs($r)) < $eps * (\abs($p) * (\abs($this->H[$m - 1][$m - 1]) + \abs($z) + \abs($this->H[$m + 1][$m + 1]))) + || abs($this->H[$m][$m - 1]) * (abs($q) + abs($r)) < $eps * (abs($p) * (abs($this->H[$m - 1][$m - 1]) + abs($z) + abs($this->H[$m + 1][$m + 1]))) ) { break; } @@ -679,7 +679,7 @@ final class EigenvalueDecomposition $p = $this->H[$k][$k - 1]; $q = $this->H[$k + 1][$k - 1]; $r = ($notlast ? $this->H[$k + 2][$k - 1] : 0.0); - $x = \abs($p) + \abs($q) + \abs($r); + $x = abs($p) + abs($q) + abs($r); if ($x == 0) { continue; @@ -690,7 +690,7 @@ final class EigenvalueDecomposition $r /= $x; } - $s = $p < 0 ? -\sqrt($p * $p + $q * $q + $r * $r) : \sqrt($p * $p + $q * $q + $r * $r); + $s = $p < 0 ? -sqrt($p * $p + $q * $q + $r * $r) : sqrt($p * $p + $q * $q + $r * $r); if ($s == 0) { continue; @@ -720,7 +720,7 @@ final class EigenvalueDecomposition $this->H[$k + 1][$j] = $this->H[$k + 1][$j] - $p * $y; } - $min = \min($n, $k + 3); + $min = min($n, $k + 3); for ($i = 0; $i <= $min; ++$i) { $p = $x * $this->H[$i][$k] + $y * $this->H[$i][$k + 1]; @@ -781,10 +781,10 @@ final class EigenvalueDecomposition $q = ($this->D[$i] - $p) * ($this->D[$i] - $p) + $this->E[$i] * $this->E[$i]; $t = ($x * $s - $z * $r) / $q; $this->H[$i][$n] = $t; - $this->H[$i + 1][$n] = \abs($x) > \abs($z) ? (-$r - $w * $t) / $x : (-$s - $y * $t) / $z; + $this->H[$i + 1][$n] = abs($x) > abs($z) ? (-$r - $w * $t) / $x : (-$s - $y * $t) / $z; } - $t = \abs($this->H[$i][$n]); + $t = abs($this->H[$i][$n]); if (($eps * $t) * $t > 1) { for ($j = $i; $j <= $n; ++$j) { $this->H[$j][$n] = $this->H[$j][$n] / $t; @@ -795,7 +795,7 @@ final class EigenvalueDecomposition } elseif ($q < 0) { $l = $n - 1; - if (\abs($this->H[$n][$n - 1]) > \abs($this->H[$n - 1][$n])) { + if (abs($this->H[$n][$n - 1]) > abs($this->H[$n - 1][$n])) { $this->H[$n - 1][$n - 1] = $q / $this->H[$n][$n - 1]; $this->H[$n - 1][$n] = -($this->H[$n][$n] - $p) / $this->H[$n][$n - 1]; } else { @@ -836,7 +836,7 @@ final class EigenvalueDecomposition $vi = ($this->D[$i] - $p) * 2.0 * $q; if ($vr == 0 & $vi == 0) { - $vr = $eps * $norm * (\abs($w) + \abs($q) + \abs($x) + \abs($y) + \abs($z)); + $vr = $eps * $norm * (abs($w) + abs($q) + abs($x) + abs($y) + abs($z)); } $this->cdiv($x * $r - $z * $ra + $q * $sa, $x * $s - $z * $sa - $q * $ra, $vr, $vi); @@ -844,7 +844,7 @@ final class EigenvalueDecomposition $this->H[$i][$n - 1] = $this->cdivr; $this->H[$i][$n] = $this->cdivi; - if (\abs($x) > (\abs($z) + \abs($q))) { + if (abs($x) > (abs($z) + abs($q))) { $this->H[$i + 1][$n - 1] = (-$ra - $w * $this->H[$i][$n - 1] + $q * $this->H[$i][$n]) / $x; $this->H[$i + 1][$n] = (-$sa - $w * $this->H[$i][$n] - $q * $this->H[$i][$n - 1]) / $x; } else { @@ -854,7 +854,7 @@ final class EigenvalueDecomposition } } - $t = \max(\abs($this->H[$i][$n - 1]), \abs($this->H[$i][$n])); + $t = max(abs($this->H[$i][$n - 1]), abs($this->H[$i][$n])); if (($eps * $t) * $t > 1) { for ($j = $i; $j <= $n; ++$j) { $this->H[$j][$n - 1] = $this->H[$j][$n - 1] / $t; @@ -878,7 +878,7 @@ final class EigenvalueDecomposition for ($i = $low; $i <= $high; ++$i) { $z = 0.0; - $min = \min($j, $high); + $min = min($j, $high); for ($k = $low; $k <= $min; ++$k) { $z += $this->V[$i][$k] * $this->H[$k][$j]; } diff --git a/Math/Matrix/LUDecomposition.php b/Math/Matrix/LUDecomposition.php index d190d14d7..91334e000 100644 --- a/Math/Matrix/LUDecomposition.php +++ b/Math/Matrix/LUDecomposition.php @@ -96,7 +96,7 @@ final class LUDecomposition for ($i = 0; $i < $this->m; ++$i) { $LUrowi = $this->LU[$i]; - $kmax = \min($i, $j); + $kmax = min($i, $j); $s = 0.0; for ($k = 0; $k < $kmax; ++$k) { @@ -107,7 +107,7 @@ final class LUDecomposition $p = $j; for ($i = $j + 1; $i < $this->m; ++$i) { - if (\abs($LUcolj[$i]) > \abs($LUcolj[$p])) { + if (abs($LUcolj[$i]) > abs($LUcolj[$p])) { $p = $i; } } diff --git a/Math/Matrix/Matrix.php b/Math/Matrix/Matrix.php index 7b1cca595..b6e7393c4 100644 --- a/Math/Matrix/Matrix.php +++ b/Math/Matrix/Matrix.php @@ -75,7 +75,7 @@ class Matrix implements \ArrayAccess, \Iterator $this->m = $m; for ($i = 0; $i < $m; ++$i) { - $this->matrix[$i] = \array_fill(0, $n, 0); + $this->matrix[$i] = array_fill(0, $n, 0); } } @@ -149,7 +149,7 @@ class Matrix implements \ArrayAccess, \Iterator public function transpose() : self { $matrix = new self($this->n, $this->m); - $matrix->setMatrix(\array_map(null, ...$this->matrix)); + $matrix->setMatrix(array_map(null, ...$this->matrix)); return $matrix; } @@ -322,11 +322,11 @@ class Matrix implements \ArrayAccess, \Iterator $nDim = $this->n; $rank = 0; - $selected = \array_fill(0, $mDim, false); + $selected = array_fill(0, $mDim, false); for ($i = 0; $i < $nDim; ++$i) { for ($j = 0; $j < $mDim; ++$j) { - if (!$selected[$j] && \abs($matrix[$j][$i]) > 0.0001) { + if (!$selected[$j] && abs($matrix[$j][$i]) > 0.0001) { break; } } @@ -342,7 +342,7 @@ class Matrix implements \ArrayAccess, \Iterator } for ($k = 0; $k < $mDim; ++$k) { - if ($k !== $j && \abs($matrix[$k][$i]) > 0.0001) { + if ($k !== $j && abs($matrix[$k][$i]) > 0.0001) { for ($p = $i + 1; $p < $nDim; ++$p) { $matrix[$k][$p] -= $matrix[$j][$p] * $matrix[$k][$i]; } @@ -384,7 +384,7 @@ class Matrix implements \ArrayAccess, \Iterator */ public function sub(int | float | self $value) : self { - if (\is_numeric($value)) { + if (is_numeric($value)) { return $this->addScalar(-$value); } @@ -402,7 +402,7 @@ class Matrix implements \ArrayAccess, \Iterator */ public function add(int | float | self $value) : self { - if (\is_numeric($value)) { + if (is_numeric($value)) { return $this->addScalar($value); } @@ -499,7 +499,7 @@ class Matrix implements \ArrayAccess, \Iterator */ public function mult(int | float | self $value) : self { - if (\is_numeric($value)) { + if (is_numeric($value)) { return $this->multScalar($value); } @@ -606,7 +606,7 @@ class Matrix implements \ArrayAccess, \Iterator $max = 0; for ($j = $i; $j < $n; ++$j) { - if (\abs($arr[$j][$i]) > \abs($arr[$max][$i])) { + if (abs($arr[$j][$i]) > abs($arr[$max][$i])) { $max = $j; } } diff --git a/Math/Number/Complex.php b/Math/Number/Complex.php index fe5527fda..d8b8e4248 100644 --- a/Math/Number/Complex.php +++ b/Math/Number/Complex.php @@ -117,8 +117,8 @@ final class Complex public function sqrt() : self { return new self( - \sqrt(($this->re + \sqrt($this->re ** 2 + $this->im ** 2)) / 2), - ($this->im <=> 0) * \sqrt((-$this->re + \sqrt($this->re ** 2 + $this->im ** 2)) / 2) + sqrt(($this->re + sqrt($this->re ** 2 + $this->im ** 2)) / 2), + ($this->im <=> 0) * sqrt((-$this->re + sqrt($this->re ** 2 + $this->im ** 2)) / 2) ); } @@ -131,7 +131,7 @@ final class Complex */ public function abs() : int | float { - return \sqrt($this->re ** 2 + $this->im ** 2); + return sqrt($this->re ** 2 + $this->im ** 2); } /** @@ -225,7 +225,7 @@ final class Complex */ public function add(int | float | self $value) : self { - if (\is_numeric($value)) { + if (is_numeric($value)) { return $this->addScalar($value); } @@ -271,7 +271,7 @@ final class Complex */ public function sub(int | float | self $value) : self { - if (\is_numeric($value)) { + if (is_numeric($value)) { return $this->subScalar($value); } @@ -317,7 +317,7 @@ final class Complex */ public function mult(int | float | self $value) : self { - if (\is_numeric($value)) { + if (is_numeric($value)) { return $this->multScalar($value); } @@ -368,7 +368,7 @@ final class Complex */ public function div(int | float | self $value) : self { - if (\is_numeric($value)) { + if (is_numeric($value)) { return $this->divScalar($value); } @@ -417,12 +417,12 @@ final class Complex */ public function render(int $precision = 2) : string { - return ($this->re !== 0 ? \number_format($this->re, $precision) : '') + return ($this->re !== 0 ? number_format($this->re, $precision) : '') . ($this->im > 0 && $this->re !== 0 ? ' +' : '') . ($this->im < 0 && $this->re !== 0 ? ' -' : '') . ($this->im !== 0 ? ( - ($this->re !== 0 ? ' ' : '') . \number_format( - ($this->im < 0 && $this->re === 0 ? $this->im : \abs($this->im)), $precision + ($this->re !== 0 ? ' ' : '') . number_format( + ($this->im < 0 && $this->re === 0 ? $this->im : abs($this->im)), $precision ) . 'i' ) : ''); } diff --git a/Math/Number/Integer.php b/Math/Number/Integer.php index 426f122a5..5e0e5ad4e 100644 --- a/Math/Number/Integer.php +++ b/Math/Number/Integer.php @@ -126,8 +126,8 @@ final class Integer */ public static function greatestCommonDivisor(int $n, int $m) : int { - $n = \abs($n); - $m = \abs($m); + $n = abs($n); + $m = abs($m); while ($n !== $m) { if ($n > $m) { @@ -158,7 +158,7 @@ final class Integer throw new \InvalidArgumentException('Only odd integers are allowed'); } - $a = (int) \ceil(\sqrt($value)); + $a = (int) ceil(sqrt($value)); $b2 = ($a * $a - $value); $i = 1; @@ -168,6 +168,6 @@ final class Integer $b2 = ($a * $a - $value); } - return [(int) \round($a - \sqrt($b2)), (int) \round($a + \sqrt($b2))]; + return [(int) round($a - sqrt($b2)), (int) round($a + sqrt($b2))]; } } diff --git a/Math/Number/Numbers.php b/Math/Number/Numbers.php index 4e7cfb4ac..f0aa5991d 100644 --- a/Math/Number/Numbers.php +++ b/Math/Number/Numbers.php @@ -68,14 +68,14 @@ final class Numbers public static function isSelfdescribing(int $n) : bool { $n = (string) $n; - $split = \str_split($n); + $split = str_split($n); if ($split === false) { return false; // @codeCoverageIgnore } foreach ($split as $place => $value) { - if (\substr_count($n, (string) $place) != $value) { + if (substr_count($n, (string) $place) != $value) { return false; } } @@ -94,7 +94,7 @@ final class Numbers */ public static function isSquare(int $n) : bool { - return \abs(((int) \sqrt($n)) * ((int) \sqrt($n)) - $n) < 0.001; + return abs(((int) sqrt($n)) * ((int) sqrt($n)) - $n) < 0.001; } /** diff --git a/Math/Number/Prime.php b/Math/Number/Prime.php index 46d865f80..bc66092bc 100644 --- a/Math/Number/Prime.php +++ b/Math/Number/Prime.php @@ -45,7 +45,7 @@ final class Prime */ public static function isMersenne(int $n) : bool { - $mersenne = \log($n + 1, 2); + $mersenne = log($n + 1, 2); return $mersenne - (int) $mersenne < 0.00001; } @@ -93,8 +93,8 @@ final class Prime } for ($i = 0; $i < $k; ++$i) { - $a = \mt_rand(2, $n - 1); - $x = \bcpowmod((string) $a, (string) $d, (string) $n); + $a = mt_rand(2, $n - 1); + $x = bcpowmod((string) $a, (string) $d, (string) $n); if ($x == 1 || $x == $n - 1) { continue; @@ -105,12 +105,12 @@ final class Prime return false; } - $mul = \bcmul($x, $x); + $mul = bcmul($x, $x); if ($mul === null) { return false; } - $x = \bcmod($mul, (string) $n); + $x = bcmod($mul, (string) $n); if ($x == 1 || $x === null) { return false; } @@ -138,8 +138,8 @@ final class Prime public static function sieveOfEratosthenes(int $n) : array { $number = 2; - $range = \range(2, $n); - $primes = \array_combine($range, $range); + $range = range(2, $n); + $primes = array_combine($range, $range); if ($primes === false) { return []; // @codeCoverageIgnore @@ -154,10 +154,10 @@ final class Prime unset($primes[$i]); } - $number = \next($primes); + $number = next($primes); } - return \array_values($primes); + return array_values($primes); } /** @@ -177,7 +177,7 @@ final class Prime return true; } - $sqrtN = \sqrt($n); + $sqrtN = sqrt($n); while ($i <= $sqrtN) { if ($n % $i === 0) { return false; diff --git a/Math/Numerics/Interpolation/CubicSplineInterpolation.php b/Math/Numerics/Interpolation/CubicSplineInterpolation.php index 420444e53..57c4ba330 100644 --- a/Math/Numerics/Interpolation/CubicSplineInterpolation.php +++ b/Math/Numerics/Interpolation/CubicSplineInterpolation.php @@ -157,7 +157,7 @@ final class CubicSplineInterpolation implements InterpolationInterface } } - $xPos = \max($xPos - 1, 0); + $xPos = max($xPos - 1, 0); $h = $x - $this->points[$xPos]['x']; if ($x < $this->points[0]['x']) { diff --git a/Math/Numerics/Interpolation/LinearInterpolation.php b/Math/Numerics/Interpolation/LinearInterpolation.php index 0f23e1950..809212c30 100644 --- a/Math/Numerics/Interpolation/LinearInterpolation.php +++ b/Math/Numerics/Interpolation/LinearInterpolation.php @@ -109,7 +109,7 @@ final class LinearInterpolation implements InterpolationInterface } } - $xPos = \max($xPos - 1, 0); + $xPos = max($xPos - 1, 0); $h = $x - $this->points[$xPos]['x']; if ($x < $this->points[0]['x']) { diff --git a/Math/Parser/Evaluator.php b/Math/Parser/Evaluator.php index aedbf4d34..c2702c85c 100644 --- a/Math/Parser/Evaluator.php +++ b/Math/Parser/Evaluator.php @@ -37,8 +37,8 @@ final class Evaluator */ public static function evaluate(string $equation) : ?float { - if (\substr_count($equation, '(') !== \substr_count($equation, ')') - || \preg_match('#[^0-9\+\-\*\/\(\)\ \^\.]#', $equation) + if (substr_count($equation, '(') !== substr_count($equation, ')') + || preg_match('#[^0-9\+\-\*\/\(\)\ \^\.]#', $equation) ) { return null; } @@ -47,11 +47,11 @@ final class Evaluator $postfix = self::shuntingYard($equation); foreach ($postfix as $i => $value) { - if (\is_numeric($value)) { + if (is_numeric($value)) { $stack[] = $value; } else { - $a = self::parseValue(\array_pop($stack) ?? 0); - $b = self::parseValue(\array_pop($stack) ?? 0); + $a = self::parseValue(array_pop($stack) ?? 0); + $b = self::parseValue(array_pop($stack) ?? 0); if ($value === '+') { $stack[] = $a + $b; @@ -67,9 +67,9 @@ final class Evaluator } } - $result = \array_pop($stack); + $result = array_pop($stack); - return \is_numeric($result) ? (float) $result : null; + return is_numeric($result) ? (float) $result : null; } /** @@ -85,7 +85,7 @@ final class Evaluator { return !\is_string($value) ? $value - : (\stripos($value, '.') === false ? (int) $value : (float) $value); + : (stripos($value, '.') === false ? (int) $value : (float) $value); } /** @@ -109,46 +109,46 @@ final class Evaluator ]; $output = []; - $equation = \str_replace(' ', '', $equation); - $equation = \preg_split('/([\+\-\*\/\^\(\)])/', $equation, -1, \PREG_SPLIT_NO_EMPTY | \PREG_SPLIT_DELIM_CAPTURE); + $equation = str_replace(' ', '', $equation); + $equation = preg_split('/([\+\-\*\/\^\(\)])/', $equation, -1, \PREG_SPLIT_NO_EMPTY | \PREG_SPLIT_DELIM_CAPTURE); if ($equation === false) { return []; // @codeCoverageIgnore } - $equation = \array_filter($equation, function($n) { + $equation = array_filter($equation, function($n) { return $n !== ''; }); foreach ($equation as $i => $token) { - if (\is_numeric($token)) { + if (is_numeric($token)) { $output[] = $token; - } elseif (\strpbrk($token, '^*/+-') !== false) { + } elseif (strpbrk($token, '^*/+-') !== false) { $o1 = $token; - $o2 = \end($stack); + $o2 = end($stack); - while ($o2 !== false && \strpbrk($o2, '^*/+-') !== false + while ($o2 !== false && strpbrk($o2, '^*/+-') !== false && (($operators[$o1]['order'] === -1 && $operators[$o1]['precedence'] <= $operators[$o2]['precedence']) || ($operators[$o1]['order'] === 1 && $operators[$o1]['precedence'] < $operators[$o2]['precedence'])) ) { - $output[] = \array_pop($stack); - $o2 = \end($stack); + $output[] = array_pop($stack); + $o2 = end($stack); } $stack[] = $o1; } elseif ($token === '(') { $stack[] = $token; } elseif ($token === ')') { - while (\end($stack) !== '(') { - $output[] = \array_pop($stack); + while (end($stack) !== '(') { + $output[] = array_pop($stack); } - \array_pop($stack); + array_pop($stack); } } while (\count($stack) > 0) { - $output[] = \array_pop($stack); + $output[] = array_pop($stack); } /** @var string[] $output */ diff --git a/Math/Statistic/Average.php b/Math/Statistic/Average.php index 3fc6715e7..4e5baa62c 100644 --- a/Math/Statistic/Average.php +++ b/Math/Statistic/Average.php @@ -189,12 +189,12 @@ final class Average } if ($offset > 0) { - \sort($values); + sort($values); $values = \array_slice($values, $offset, -$offset); $count -= $offset * 2; } - return \array_sum($values) / $count; + return array_sum($values) / $count; } /** @@ -212,14 +212,14 @@ final class Average public static function mode(array $values, int $offset = 0) : float { if ($offset > 0) { - \sort($values); + sort($values); $values = \array_slice($values, $offset, -$offset); } - $count = \array_count_values($values); - $best = \max($count); + $count = array_count_values($values); + $best = max($count); - return (float) (\array_keys($count, $best)[0] ?? 0.0); + return (float) (array_keys($count, $best)[0] ?? 0.0); } /** @@ -236,14 +236,14 @@ final class Average */ public static function median(array $values, int $offset = 0) : float { - \sort($values); + sort($values); if ($offset > 0) { $values = \array_slice($values, $offset, -$offset); } $count = \count($values); - $middleval = (int) \floor(($count - 1) / 2); + $middleval = (int) floor(($count - 1) / 2); if ($count % 2) { $median = $values[$middleval]; @@ -278,12 +278,12 @@ final class Average } if ($offset > 0) { - \sort($values); + sort($values); $values = \array_slice($values, $offset, -$offset); $count -= $offset * 2; } - return \pow(\array_product($values), 1 / $count); + return pow(array_product($values), 1 / $count); } /** @@ -308,7 +308,7 @@ final class Average } if ($offset > 0) { - \sort($values); + sort($values); $values = \array_slice($values, $offset, -$offset); $count -= $offset * 2; } @@ -345,7 +345,7 @@ final class Average } if ($offset > 0) { - \sort($angles); + sort($angles); $angles = \array_slice($angles, $offset, -$offset); $count -= $offset * 2; } @@ -354,14 +354,14 @@ final class Average $x = 0; for ($i = 0; $i < $count; ++$i) { - $x += \cos(\deg2rad($angles[$i])); - $y += \sin(\deg2rad($angles[$i])); + $x += cos(deg2rad($angles[$i])); + $y += sin(deg2rad($angles[$i])); } $x /= $count; $y /= $count; - return \rad2deg(\atan2($y, $x)); + return rad2deg(atan2($y, $x)); } /** @@ -384,7 +384,7 @@ final class Average } if ($offset > 0) { - \sort($angles); + sort($angles); $angles = \array_slice($angles, $offset, -$offset); $count -= $offset * 2; } @@ -393,13 +393,13 @@ final class Average $coss = 0.0; foreach ($angles as $a) { - $sins += \sin(\deg2rad($a)); - $coss += \cos(\deg2rad($a)); + $sins += sin(deg2rad($a)); + $coss += cos(deg2rad($a)); } $avgsin = $sins / (0.0 + $count); $avgcos = $coss / (0.0 + $count); - $avgang = \rad2deg(\atan2($avgsin, $avgcos)); + $avgang = rad2deg(atan2($avgsin, $avgcos)); while ($avgang < 0.0) { $avgang += 360.0; diff --git a/Math/Statistic/Basic.php b/Math/Statistic/Basic.php index 7c2392006..5196777ca 100644 --- a/Math/Statistic/Basic.php +++ b/Math/Statistic/Basic.php @@ -50,8 +50,8 @@ final class Basic $freaquency = []; $sum = 1; - if (!($isArray = \is_array(\reset($values)))) { - $sum = \array_sum($values); + if (!($isArray = \is_array(reset($values)))) { + $sum = array_sum($values); } foreach ($values as $value) { diff --git a/Math/Statistic/Forecast/Error.php b/Math/Statistic/Forecast/Error.php index 33997b7ca..f8dbe09c4 100644 --- a/Math/Statistic/Forecast/Error.php +++ b/Math/Statistic/Forecast/Error.php @@ -139,7 +139,7 @@ final class Error { $deviation = 0.0; foreach ($observed as $key => $value) { - $deviation += \abs($value - $forecasted[$key]); + $deviation += abs($value - $forecasted[$key]); } return $deviation / \count($observed); @@ -171,7 +171,7 @@ final class Error */ public static function getRootMeanSquaredError(array $errors) : float { - return \sqrt(Average::arithmeticMean(ArrayUtils::power($errors, 2))); + return sqrt(Average::arithmeticMean(ArrayUtils::power($errors, 2))); } /** @@ -259,7 +259,7 @@ final class Error $error = []; foreach ($observed as $key => $value) { - $error[] = \abs($value - $forecasted[$key]) / ($value + $forecasted[$key]) / 2; + $error[] = abs($value - $forecasted[$key]) / ($value + $forecasted[$key]) / 2; } return Average::arithmeticMean($error); @@ -348,7 +348,7 @@ final class Error $count = \count($observed); for ($i = 0 + $m; $i < $count; ++$i) { - $sum += \abs($observed[$i] - $observed[$i - $m]); + $sum += abs($observed[$i] - $observed[$i - $m]); } return $sum; diff --git a/Math/Statistic/Forecast/Regression/LevelLogRegression.php b/Math/Statistic/Forecast/Regression/LevelLogRegression.php index e4c92203e..61cc5d7ec 100644 --- a/Math/Statistic/Forecast/Regression/LevelLogRegression.php +++ b/Math/Statistic/Forecast/Regression/LevelLogRegression.php @@ -36,7 +36,7 @@ final class LevelLogRegression extends RegressionAbstract } for ($i = 0; $i < $c; ++$i) { - $x[$i] = \log($x[$i]); + $x[$i] = log($x[$i]); } return parent::getRegression($x, $y); diff --git a/Math/Statistic/Forecast/Regression/LogLevelRegression.php b/Math/Statistic/Forecast/Regression/LogLevelRegression.php index a860f7203..cf4e7466e 100644 --- a/Math/Statistic/Forecast/Regression/LogLevelRegression.php +++ b/Math/Statistic/Forecast/Regression/LogLevelRegression.php @@ -36,7 +36,7 @@ final class LogLevelRegression extends RegressionAbstract } for ($i = 0; $i < $c; ++$i) { - $y[$i] = \log($y[$i]); + $y[$i] = log($y[$i]); } return parent::getRegression($x, $y); diff --git a/Math/Statistic/Forecast/Regression/LogLogRegression.php b/Math/Statistic/Forecast/Regression/LogLogRegression.php index 36e29d870..127aeda0f 100644 --- a/Math/Statistic/Forecast/Regression/LogLogRegression.php +++ b/Math/Statistic/Forecast/Regression/LogLogRegression.php @@ -36,8 +36,8 @@ final class LogLogRegression extends RegressionAbstract } for ($i = 0; $i < $c; ++$i) { - $x[$i] = \log($x[$i]); - $y[$i] = \log($y[$i]); + $x[$i] = log($x[$i]); + $y[$i] = log($y[$i]); } return parent::getRegression($x, $y); diff --git a/Math/Statistic/Forecast/Regression/PolynomialRegression.php b/Math/Statistic/Forecast/Regression/PolynomialRegression.php index f998165e5..47bc6addd 100644 --- a/Math/Statistic/Forecast/Regression/PolynomialRegression.php +++ b/Math/Statistic/Forecast/Regression/PolynomialRegression.php @@ -48,7 +48,7 @@ final class PolynomialRegression $xm = Average::arithmeticMean($x); $ym = Average::arithmeticMean($y); - $r = \range(0, $n - 1); + $r = range(0, $n - 1); $xTemp = []; foreach ($r as $e) { diff --git a/Math/Statistic/Forecast/Regression/RegressionAbstract.php b/Math/Statistic/Forecast/Regression/RegressionAbstract.php index 821592aad..2d94ba7ee 100644 --- a/Math/Statistic/Forecast/Regression/RegressionAbstract.php +++ b/Math/Statistic/Forecast/Regression/RegressionAbstract.php @@ -74,7 +74,7 @@ abstract class RegressionAbstract $sum += $errors[$i] ** 2; } - return \sqrt($sum / $count); + return sqrt($sum / $count); } /** @@ -99,7 +99,7 @@ abstract class RegressionAbstract $sum += $errors[$i] ** 2; } - return \sqrt($sum / ($count - 2)); + return sqrt($sum / ($count - 2)); } /** @@ -127,7 +127,7 @@ abstract class RegressionAbstract $sum += ($x[$i] - $meanX) ** 2; } - $interval = $multiplier * \sqrt($mse + $mse / $count + $mse * ($fX - $meanX) ** 2 / $sum); + $interval = $multiplier * sqrt($mse + $mse / $count + $mse * ($fX - $meanX) ** 2 / $sum); return [$fY - $interval, $fY + $interval]; } diff --git a/Math/Statistic/MeasureOfDispersion.php b/Math/Statistic/MeasureOfDispersion.php index 33d8edadd..7704c447d 100644 --- a/Math/Statistic/MeasureOfDispersion.php +++ b/Math/Statistic/MeasureOfDispersion.php @@ -50,9 +50,9 @@ final class MeasureOfDispersion */ public static function range(array $values) : float { - \sort($values); - $end = \end($values); - $start = \reset($values); + sort($values); + $end = end($values); + $start = reset($values); return $end - $start; } @@ -108,7 +108,7 @@ final class MeasureOfDispersion ++$valueCount; } - return \sqrt($sum / ($valueCount - 1)); + return sqrt($sum / ($valueCount - 1)); } /** @@ -137,7 +137,7 @@ final class MeasureOfDispersion ++$valueCount; } - return \sqrt($sum / $valueCount); + return sqrt($sum / $valueCount); } /** @@ -300,7 +300,7 @@ final class MeasureOfDispersion /** @var int $count */ $count /= 2; - \sort($x); + sort($x); $Q1 = Average::median(\array_slice($x, 0, $count)); $Q3 = Average::median(\array_slice($x, -$count, $count)); @@ -368,7 +368,7 @@ final class MeasureOfDispersion $sum = 0.0; foreach ($x as $xi) { - $sum += \abs($xi - $mean); + $sum += abs($xi - $mean); } return $sum / (\count($x) - $offset); @@ -388,7 +388,7 @@ final class MeasureOfDispersion $mean = $mean !== null ? $mean : Average::arithmeticMean($x); foreach ($x as $key => $value) { - $x[$key] = \abs($value - $mean); + $x[$key] = abs($value - $mean); } return $x; diff --git a/Math/Stochastic/Distribution/BernoulliDistribution.php b/Math/Stochastic/Distribution/BernoulliDistribution.php index b3bf2d0c5..70eb8b2b3 100644 --- a/Math/Stochastic/Distribution/BernoulliDistribution.php +++ b/Math/Stochastic/Distribution/BernoulliDistribution.php @@ -147,7 +147,7 @@ final class BernoulliDistribution */ public static function getStandardDeviation(float $p) : float { - return \sqrt(self::getVariance($p)); + return sqrt(self::getVariance($p)); } /** @@ -162,7 +162,7 @@ final class BernoulliDistribution */ public static function getMgf(float $p, float $t) : float { - return (1 - $p) + $p * \exp($t); + return (1 - $p) + $p * exp($t); } /** @@ -176,7 +176,7 @@ final class BernoulliDistribution */ public static function getSkewness(float $p) : float { - return (1 - 2 * $p) / \sqrt($p * (1 - $p)); + return (1 - 2 * $p) / sqrt($p * (1 - $p)); } /** @@ -190,7 +190,7 @@ final class BernoulliDistribution */ public static function getEntropy(float $p) : float { - return -(1 - $p) * \log(1 - $p) - $p * \log($p); + return -(1 - $p) * log(1 - $p) - $p * log($p); } /** diff --git a/Math/Stochastic/Distribution/BetaDistribution.php b/Math/Stochastic/Distribution/BetaDistribution.php index 7b0828f9e..7b6eee913 100644 --- a/Math/Stochastic/Distribution/BetaDistribution.php +++ b/Math/Stochastic/Distribution/BetaDistribution.php @@ -91,7 +91,7 @@ final class BetaDistribution */ public static function getStandardDeviation(float $alpha, float $beta) : float { - return \sqrt(self::getVariance($alpha, $beta)); + return sqrt(self::getVariance($alpha, $beta)); } /** @@ -106,7 +106,7 @@ final class BetaDistribution */ public static function getSkewness(float $alpha, float $beta) : float { - return 2 * ($beta - $alpha) * \sqrt($alpha + $beta + 1) / (($alpha + $beta + 2) * \sqrt($alpha * $beta)); + return 2 * ($beta - $alpha) * sqrt($alpha + $beta + 1) / (($alpha + $beta + 2) * sqrt($alpha * $beta)); } /** @@ -164,7 +164,7 @@ final class BetaDistribution */ public static function getPdf(float $x, float $alpha, float $beta) : float { - return \pow($x, $alpha - 1) * \pow(1 - $x, $beta - 1) / Beta::beta($alpha, $beta); + return pow($x, $alpha - 1) * pow(1 - $x, $beta - 1) / Beta::beta($alpha, $beta); } /** diff --git a/Math/Stochastic/Distribution/BinomialDistribution.php b/Math/Stochastic/Distribution/BinomialDistribution.php index 77e845c1f..7120ed8f8 100644 --- a/Math/Stochastic/Distribution/BinomialDistribution.php +++ b/Math/Stochastic/Distribution/BinomialDistribution.php @@ -38,7 +38,7 @@ final class BinomialDistribution */ public static function getMode(int $n, float $p) : float { - return \floor(($n + 1) * $p); + return floor(($n + 1) * $p); } /** @@ -54,7 +54,7 @@ final class BinomialDistribution */ public static function getMgf(int $n, float $t, float $p) : float { - return \pow(1 - $p + $p * \exp($t), $n); + return pow(1 - $p + $p * exp($t), $n); } /** @@ -69,7 +69,7 @@ final class BinomialDistribution */ public static function getSkewness(int $n, float $p) : float { - return (1 - 2 * $p) / \sqrt($n * $p * (1 - $p)); + return (1 - 2 * $p) / sqrt($n * $p * (1 - $p)); } /** @@ -139,7 +139,7 @@ final class BinomialDistribution */ public static function getPmf(int $n, int $k, float $p) : float { - return Functions::binomialCoefficient($n, $k) * \pow($p, $k) * \pow(1 - $p, $n - $k); + return Functions::binomialCoefficient($n, $k) * pow($p, $k) * pow(1 - $p, $n - $k); } /** @@ -154,7 +154,7 @@ final class BinomialDistribution */ public static function getMedian(int $n, float $p) : float { - return \floor($n * $p); + return floor($n * $p); } /** @@ -199,6 +199,6 @@ final class BinomialDistribution */ public static function getStandardDeviation(int $n, float $p) : float { - return \sqrt(self::getVariance($n, $p)); + return sqrt(self::getVariance($n, $p)); } } diff --git a/Math/Stochastic/Distribution/CauchyDistribution.php b/Math/Stochastic/Distribution/CauchyDistribution.php index ff3fa0fb4..f02576f66 100644 --- a/Math/Stochastic/Distribution/CauchyDistribution.php +++ b/Math/Stochastic/Distribution/CauchyDistribution.php @@ -53,7 +53,7 @@ final class CauchyDistribution */ public static function getCdf(float $x, float $x0, float $gamma) : float { - return 1 / \M_PI * \atan(($x - $x0) / $gamma) + 0.5; + return 1 / \M_PI * atan(($x - $x0) / $gamma) + 0.5; } /** @@ -95,6 +95,6 @@ final class CauchyDistribution */ public static function getEntropy(float $gamma) : float { - return \log(4 * \M_PI * $gamma); + return log(4 * \M_PI * $gamma); } } diff --git a/Math/Stochastic/Distribution/ChiSquaredDistribution.php b/Math/Stochastic/Distribution/ChiSquaredDistribution.php index 2af92eb26..38f46e73b 100644 --- a/Math/Stochastic/Distribution/ChiSquaredDistribution.php +++ b/Math/Stochastic/Distribution/ChiSquaredDistribution.php @@ -138,7 +138,7 @@ final class ChiSquaredDistribution */ public static function getDegreesOfFreedom(array $values) : int { - if (\is_array($first = \reset($values))) { + if (\is_array($first = reset($values))) { return (\count($values) - 1) * (\count($first) - 1); } else { return \count($values) - 1; @@ -163,7 +163,7 @@ final class ChiSquaredDistribution throw new \OutOfBoundsException('Out of bounds'); } - return 1 / (\pow(2, $df / 2) * Gamma::gamma($df / 2)) * \pow($x, $df / 2 - 1) * \exp(-$x / 2); + return 1 / (pow(2, $df / 2) * Gamma::gamma($df / 2)) * pow($x, $df / 2 - 1) * exp(-$x / 2); } /** @@ -192,7 +192,7 @@ final class ChiSquaredDistribution */ public static function getMode(int $df) : int { - return \max($df - 2, 0); + return max($df - 2, 0); } /** @@ -248,7 +248,7 @@ final class ChiSquaredDistribution */ public static function getStandardDeviation(int $df) : float { - return \sqrt(self::getVariance($df)); + return sqrt(self::getVariance($df)); } /** @@ -269,7 +269,7 @@ final class ChiSquaredDistribution throw new \OutOfBoundsException('Out of bounds'); } - return \pow(1 - 2 * $t, -$df / 2); + return pow(1 - 2 * $t, -$df / 2); } /** @@ -283,7 +283,7 @@ final class ChiSquaredDistribution */ public static function getSkewness(int $df) : float { - return \sqrt(8 / $df); + return sqrt(8 / $df); } /** diff --git a/Math/Stochastic/Distribution/ExponentialDistribution.php b/Math/Stochastic/Distribution/ExponentialDistribution.php index 5e2ce9e15..3a20947fe 100644 --- a/Math/Stochastic/Distribution/ExponentialDistribution.php +++ b/Math/Stochastic/Distribution/ExponentialDistribution.php @@ -36,7 +36,7 @@ final class ExponentialDistribution */ public static function getPdf(float $x, float $lambda) : float { - return $x >= 0 ? $lambda * \exp(-$lambda * $x) : 0; + return $x >= 0 ? $lambda * exp(-$lambda * $x) : 0; } /** @@ -51,7 +51,7 @@ final class ExponentialDistribution */ public static function getCdf(float $x, float $lambda) : float { - return $x >= 0 ? 1 - 1 / \exp($lambda * $x) : 0; + return $x >= 0 ? 1 - 1 / exp($lambda * $x) : 0; } /** @@ -91,7 +91,7 @@ final class ExponentialDistribution */ public static function getMedian(float $lambda) : float { - return 1 / $lambda * \log(2); + return 1 / $lambda * log(2); } /** @@ -105,7 +105,7 @@ final class ExponentialDistribution */ public static function getVariance(float $lambda) : float { - return \pow($lambda, -2); + return pow($lambda, -2); } /** @@ -119,7 +119,7 @@ final class ExponentialDistribution */ public static function getStandardDeviation(float $lambda) : float { - return \sqrt(self::getVariance($lambda)); + return sqrt(self::getVariance($lambda)); } /** diff --git a/Math/Stochastic/Distribution/FDistribution.php b/Math/Stochastic/Distribution/FDistribution.php index fb9c10641..b5067aa59 100644 --- a/Math/Stochastic/Distribution/FDistribution.php +++ b/Math/Stochastic/Distribution/FDistribution.php @@ -38,7 +38,7 @@ final class FDistribution */ public static function getPdf(float $x, int $d1, int $d2) : float { - return \sqrt((\pow($d1 * $x, $d1) * ($d2 ** $d2)) / \pow($d1 * $x + $d2, $d1 + $d2)) + return sqrt((pow($d1 * $x, $d1) * ($d2 ** $d2)) / pow($d1 * $x + $d2, $d1 + $d2)) / ($x * Beta::beta($d1 / 2, $d2 / 2)); } @@ -127,7 +127,7 @@ final class FDistribution */ public static function getStandardDeviation(int $d1, int $d2) : float { - return \sqrt(self::getVariance($d1, $d2)); + return sqrt(self::getVariance($d1, $d2)); } /** @@ -146,7 +146,7 @@ final class FDistribution return 0.0; } - return (2 * $d1 + $d2 - 2) * \sqrt(8 * ($d2 - 4)) - / (($d2 - 6) * \sqrt($d1 * ($d1 + $d2 - 2))); + return (2 * $d1 + $d2 - 2) * sqrt(8 * ($d2 - 4)) + / (($d2 - 6) * sqrt($d1 * ($d1 + $d2 - 2))); } } diff --git a/Math/Stochastic/Distribution/GammaDistribution.php b/Math/Stochastic/Distribution/GammaDistribution.php index 2944da0b4..2a6b36ad5 100644 --- a/Math/Stochastic/Distribution/GammaDistribution.php +++ b/Math/Stochastic/Distribution/GammaDistribution.php @@ -38,7 +38,7 @@ final class GammaDistribution */ public static function getPdfScale(float $x, float $k, float $theta) : float { - return 1 / (Gamma::gamma($k) * $theta ** $k) * \pow($x, $k - 1) * \exp(-$x / $theta); + return 1 / (Gamma::gamma($k) * $theta ** $k) * pow($x, $k - 1) * exp(-$x / $theta); } /** @@ -54,7 +54,7 @@ final class GammaDistribution */ public static function getPdfRate(float $x, float $alpha, float $beta) : float { - return $beta ** $alpha / Gamma::gamma($alpha) * \pow($x, $alpha - 1) * \exp(-$beta * $x); + return $beta ** $alpha / Gamma::gamma($alpha) * pow($x, $alpha - 1) * exp(-$beta * $x); } /** @@ -70,7 +70,7 @@ final class GammaDistribution */ public static function getPdfIntegerScale(float $x, int $k, float $theta) : float { - return 1 / (Gamma::getGammaInteger($k) * $theta ** $k) * \pow($x, $k - 1) * \exp(-$x / $theta); + return 1 / (Gamma::getGammaInteger($k) * $theta ** $k) * pow($x, $k - 1) * exp(-$x / $theta); } /** @@ -86,7 +86,7 @@ final class GammaDistribution */ public static function getPdfIntegerRate(float $x, int $alpha, float $beta) : float { - return $beta ** $alpha / Gamma::getGammaInteger($alpha) * \pow($x, $alpha - 1) * \exp(-$beta * $x); + return $beta ** $alpha / Gamma::getGammaInteger($alpha) * pow($x, $alpha - 1) * exp(-$beta * $x); } /** @@ -192,7 +192,7 @@ final class GammaDistribution */ public static function getSkewness(float $k) : float { - return 2 / \sqrt($k); + return 2 / sqrt($k); } /** @@ -236,7 +236,7 @@ final class GammaDistribution */ public static function getStandardDeviationScale(float $k, float $theta) : float { - return \sqrt(self::getVarianceScale($k, $theta)); + return sqrt(self::getVarianceScale($k, $theta)); } /** @@ -266,7 +266,7 @@ final class GammaDistribution */ public static function getStandardDeviationRate(float $alpha, float $beta) : float { - return \sqrt(self::getVarianceRate($alpha, $beta)); + return sqrt(self::getVarianceRate($alpha, $beta)); } /** @@ -282,7 +282,7 @@ final class GammaDistribution */ public static function getMgfScale(float $k, float $t, float $theta) : float { - return \pow(1 - $theta * $t, -$k); + return pow(1 - $theta * $t, -$k); } /** @@ -298,6 +298,6 @@ final class GammaDistribution */ public static function getMgfRate(float $t, float $alpha, float $beta) : float { - return \pow(1 - $t / $beta, -$alpha); + return pow(1 - $t / $beta, -$alpha); } } diff --git a/Math/Stochastic/Distribution/GeometricDistribution.php b/Math/Stochastic/Distribution/GeometricDistribution.php index bc3cbeaca..fa844b60d 100644 --- a/Math/Stochastic/Distribution/GeometricDistribution.php +++ b/Math/Stochastic/Distribution/GeometricDistribution.php @@ -36,7 +36,7 @@ final class GeometricDistribution */ public static function getPmf(float $p, int $k) : float { - return \pow(1 - $p, $k - 1) * $p; + return pow(1 - $p, $k - 1) * $p; } /** @@ -51,7 +51,7 @@ final class GeometricDistribution */ public static function getCdf(float $p, int $k) : float { - return 1 - \pow(1 - $p, $k); + return 1 - pow(1 - $p, $k); } /** @@ -91,7 +91,7 @@ final class GeometricDistribution */ public static function getMedian(float $p) : float { - return \ceil(-1 / (\log(1 - $p, 2))); + return ceil(-1 / (log(1 - $p, 2))); } /** @@ -119,7 +119,7 @@ final class GeometricDistribution */ public static function getStandardDeviation(float $p) : float { - return \sqrt(self::getVariance($p)); + return sqrt(self::getVariance($p)); } /** @@ -134,9 +134,9 @@ final class GeometricDistribution */ public static function getMgf(float $p, float $t) : float { - return $t < -\log(1 - $p) - ? $p * \exp($t) / (1 - (1 - $p) * \exp($t)) - : $p / (1 - (1 - $p) * \exp($t)); + return $t < -log(1 - $p) + ? $p * exp($t) / (1 - (1 - $p) * exp($t)) + : $p / (1 - (1 - $p) * exp($t)); } /** @@ -150,7 +150,7 @@ final class GeometricDistribution */ public static function getSkewness(float $lambda) : float { - return (2 - $lambda) / \sqrt(1 - $lambda); + return (2 - $lambda) / sqrt(1 - $lambda); } /** diff --git a/Math/Stochastic/Distribution/HypergeometricDistribution.php b/Math/Stochastic/Distribution/HypergeometricDistribution.php index 0f37b88e0..13ccfdb21 100644 --- a/Math/Stochastic/Distribution/HypergeometricDistribution.php +++ b/Math/Stochastic/Distribution/HypergeometricDistribution.php @@ -103,7 +103,7 @@ final class HypergeometricDistribution */ public static function getStandardDeviation(int $K, int $N, int $n) : float { - return \sqrt($n * $K / $N * ($N - $K) / $N * ($N - $n) / ($N - 1)); + return sqrt($n * $K / $N * ($N - $K) / $N * ($N - $n) / ($N - 1)); } /** @@ -119,8 +119,8 @@ final class HypergeometricDistribution */ public static function getSkewness(int $K, int $N, int $n) : float { - return ($N - 2 * $K) * \sqrt($N - 1) * ($N - 2 * $n) - / (\sqrt($n * $K * ($N - $K) * ($N - $n)) * ($N - 2)); + return ($N - 2 * $K) * sqrt($N - 1) * ($N - 2 * $n) + / (sqrt($n * $K * ($N - $K) * ($N - $n)) * ($N - 2)); } /** diff --git a/Math/Stochastic/Distribution/LaplaceDistribution.php b/Math/Stochastic/Distribution/LaplaceDistribution.php index 26554a853..be74cdf36 100644 --- a/Math/Stochastic/Distribution/LaplaceDistribution.php +++ b/Math/Stochastic/Distribution/LaplaceDistribution.php @@ -37,7 +37,7 @@ final class LaplaceDistribution */ public static function getPdf(float $x, float $mu, float $b) : float { - return 1 / (2 * $b) * \exp(-\abs($x - $mu) / $b); + return 1 / (2 * $b) * exp(-abs($x - $mu) / $b); } /** @@ -53,7 +53,7 @@ final class LaplaceDistribution */ public static function getCdf(float $x, float $mu, float $b) : float { - return $x < $mu ? \exp(($x - $mu) / $b) / 2 : 1 - \exp(-($x - $mu) / $b) / 2; + return $x < $mu ? exp(($x - $mu) / $b) / 2 : 1 - exp(-($x - $mu) / $b) / 2; } /** @@ -123,7 +123,7 @@ final class LaplaceDistribution */ public static function getStandardDeviation(float $b) : float { - return \sqrt(self::getVariance($b)); + return sqrt(self::getVariance($b)); } /** @@ -141,11 +141,11 @@ final class LaplaceDistribution */ public static function getMgf(float $t, float $mu, float $b) : float { - if (\abs($t) >= 1 / $b) { + if (abs($t) >= 1 / $b) { throw new \OutOfBoundsException('Out of bounds'); } - return \exp($mu * $t) / (1 - $b ** 2 * $t ** 2); + return exp($mu * $t) / (1 - $b ** 2 * $t ** 2); } /** diff --git a/Math/Stochastic/Distribution/LogDistribution.php b/Math/Stochastic/Distribution/LogDistribution.php index 7d487d035..757c6f488 100644 --- a/Math/Stochastic/Distribution/LogDistribution.php +++ b/Math/Stochastic/Distribution/LogDistribution.php @@ -37,7 +37,7 @@ final class LogDistribution */ public static function getPmf(float $p, int $k) : float { - return -1 / \log(1 - $p) * $p ** $k / $k; + return -1 / log(1 - $p) * $p ** $k / $k; } /** @@ -55,7 +55,7 @@ final class LogDistribution // This is a workaround! // Actually 0 should be used instead of 0.0001. // This is only used because the incomplete beta function doesn't work for p or q = 0 - return 1 + Beta::incompleteBeta($p, $k + 1, 0.0001) / \log(1 - $p); + return 1 + Beta::incompleteBeta($p, $k + 1, 0.0001) / log(1 - $p); } /** @@ -69,7 +69,7 @@ final class LogDistribution */ public static function getMean(float $p) : float { - return -1 / \log(1 - $p) * $p / (1 - $p); + return -1 / log(1 - $p) * $p / (1 - $p); } /** @@ -95,8 +95,8 @@ final class LogDistribution */ public static function getVariance(float $p) : float { - return -($p ** 2 + $p * \log(1 - $p)) - / ((1 - $p) ** 2 * \log(1 - $p) ** 2); + return -($p ** 2 + $p * log(1 - $p)) + / ((1 - $p) ** 2 * log(1 - $p) ** 2); } /** @@ -110,7 +110,7 @@ final class LogDistribution */ public static function getStandardDeviation(float $p) : float { - return \sqrt(self::getVariance($p)); + return sqrt(self::getVariance($p)); } /** @@ -125,6 +125,6 @@ final class LogDistribution */ public static function getMgf(float $p, float $t) : float { - return \log(1 - $p * \exp($t)) / \log(1 - $p); + return log(1 - $p * exp($t)) / log(1 - $p); } } diff --git a/Math/Stochastic/Distribution/LogNormalDistribution.php b/Math/Stochastic/Distribution/LogNormalDistribution.php index bd3ca67ba..07b78858f 100644 --- a/Math/Stochastic/Distribution/LogNormalDistribution.php +++ b/Math/Stochastic/Distribution/LogNormalDistribution.php @@ -38,8 +38,8 @@ final class LogNormalDistribution */ public static function getPdf(float $x, float $mu, float $sigma) : float { - return 1 / ($x * $sigma * \sqrt(2 * \M_PI)) - * \exp(-(\log($x) - $mu) ** 2 / (2 * $sigma ** 2)); + return 1 / ($x * $sigma * sqrt(2 * \M_PI)) + * exp(-(log($x) - $mu) ** 2 / (2 * $sigma ** 2)); } /** @@ -54,7 +54,7 @@ final class LogNormalDistribution */ public static function getMean(float $mu, float $sigma) : float { - return \exp($mu + $sigma ** 2 / 2); + return exp($mu + $sigma ** 2 / 2); } /** @@ -68,7 +68,7 @@ final class LogNormalDistribution */ public static function getMedian(float $mu) : float { - return \exp($mu); + return exp($mu); } /** @@ -83,7 +83,7 @@ final class LogNormalDistribution */ public static function getMode(float $mu, float $sigma) : float { - return \exp($mu - $sigma ** 2); + return exp($mu - $sigma ** 2); } /** @@ -98,7 +98,7 @@ final class LogNormalDistribution */ public static function getVariance(float $mu, float $sigma) : float { - return (\exp($sigma ** 2) - 1) * \exp(2 * $mu + $sigma ** 2); + return (exp($sigma ** 2) - 1) * exp(2 * $mu + $sigma ** 2); } /** @@ -113,7 +113,7 @@ final class LogNormalDistribution */ public static function getStandardDeviation(float $mu, float $sigma) : float { - return \sqrt(self::getVariance($mu, $sigma)); + return sqrt(self::getVariance($mu, $sigma)); } /** @@ -127,7 +127,7 @@ final class LogNormalDistribution */ public static function getSkewness(float $sigma) : float { - return (\exp($sigma ** 2) + 2) * \sqrt(\exp($sigma ** 2) - 1); + return (exp($sigma ** 2) + 2) * sqrt(exp($sigma ** 2) - 1); } /** @@ -141,7 +141,7 @@ final class LogNormalDistribution */ public static function getExKurtosis(float $sigma) : float { - return \exp(4 * $sigma ** 2) + 2 * \exp(3 * $sigma ** 2) + 3 * \exp(2 * $sigma ** 2) - 6; + return exp(4 * $sigma ** 2) + 2 * exp(3 * $sigma ** 2) + 3 * exp(2 * $sigma ** 2) - 6; } /** @@ -156,7 +156,7 @@ final class LogNormalDistribution */ public static function getEntropy(float $mu, float $sigma) : float { - return \log($sigma * \exp($mu + 1 / 2) * \sqrt(2 * \M_PI), 2); + return log($sigma * exp($mu + 1 / 2) * sqrt(2 * \M_PI), 2); } /** @@ -189,6 +189,6 @@ final class LogNormalDistribution */ public static function getCdf(float $x, float $mean, float $standardDeviation) : float { - return 0.5 + 0.5 * Functions::getErf((\log($x) - $mean) / (\sqrt(2) * $standardDeviation)); + return 0.5 + 0.5 * Functions::getErf((log($x) - $mean) / (sqrt(2) * $standardDeviation)); } } diff --git a/Math/Stochastic/Distribution/LogisticDistribution.php b/Math/Stochastic/Distribution/LogisticDistribution.php index a963fcf5b..76ccfb1ee 100644 --- a/Math/Stochastic/Distribution/LogisticDistribution.php +++ b/Math/Stochastic/Distribution/LogisticDistribution.php @@ -36,8 +36,8 @@ final class LogisticDistribution */ public static function getPdf(float $x, float $mu, float $s) : float { - return \exp(-($x - $mu) / $s) - / ($s * (1 + \exp(-($x - $mu) / $s)) ** 2); + return exp(-($x - $mu) / $s) + / ($s * (1 + exp(-($x - $mu) / $s)) ** 2); } /** @@ -53,7 +53,7 @@ final class LogisticDistribution */ public static function getCdf(float $x, float $mu, float $s) : float { - return 1 / (1 + \exp(-($x - $mu) / $s)); + return 1 / (1 + exp(-($x - $mu) / $s)); } /** @@ -123,7 +123,7 @@ final class LogisticDistribution */ public static function getStandardDeviation(float $s) : float { - return \sqrt(self::getVariance($s)); + return sqrt(self::getVariance($s)); } /** @@ -161,6 +161,6 @@ final class LogisticDistribution */ public static function getEntropy(float $s) : float { - return \log($s) + 2; + return log($s) + 2; } } diff --git a/Math/Stochastic/Distribution/NormalDistribution.php b/Math/Stochastic/Distribution/NormalDistribution.php index c05135531..4ba256d6f 100644 --- a/Math/Stochastic/Distribution/NormalDistribution.php +++ b/Math/Stochastic/Distribution/NormalDistribution.php @@ -85,7 +85,7 @@ final class NormalDistribution */ public static function getPdf(float $x, float $mu, float $sig) : float { - return 1 / ($sig * \sqrt(2 * \M_PI)) * \exp(-($x - $mu) ** 2 / (2 * $sig ** 2)); + return 1 / ($sig * sqrt(2 * \M_PI)) * exp(-($x - $mu) ** 2 / (2 * $sig ** 2)); } /** @@ -101,7 +101,7 @@ final class NormalDistribution */ public static function getCdf(float $x, float $mu, float $sig) : float { - return 1 / 2 * (1 + Functions::getErf(($x - $mu) / ($sig * \sqrt(2)))); + return 1 / 2 * (1 + Functions::getErf(($x - $mu) / ($sig * sqrt(2)))); } /** @@ -187,7 +187,7 @@ final class NormalDistribution */ public static function getMgf(float $t, float $mu, float $sig) : float { - return \exp($mu * $t + ($sig ** 2 * $t ** 2) / 2); + return exp($mu * $t + ($sig ** 2 * $t ** 2) / 2); } /** diff --git a/Math/Stochastic/Distribution/ParetoDistribution.php b/Math/Stochastic/Distribution/ParetoDistribution.php index 7de7b4719..50f17f016 100644 --- a/Math/Stochastic/Distribution/ParetoDistribution.php +++ b/Math/Stochastic/Distribution/ParetoDistribution.php @@ -36,7 +36,7 @@ final class ParetoDistribution */ public static function getPdf(float $x, float $xm, float $alpha) : float { - return $alpha * $xm ** $alpha / (\pow($x, $alpha + 1)); + return $alpha * $xm ** $alpha / (pow($x, $alpha + 1)); } /** @@ -82,7 +82,7 @@ final class ParetoDistribution */ public static function getMedian(float $xm, float $alpha) : float { - return $xm * \pow(2, 1 / $alpha); + return $xm * pow(2, 1 / $alpha); } /** @@ -126,7 +126,7 @@ final class ParetoDistribution */ public static function getStandardDeviation(float $xm, float $alpha) : float { - return \sqrt(self::getVariance($xm, $alpha)); + return sqrt(self::getVariance($xm, $alpha)); } /** @@ -140,7 +140,7 @@ final class ParetoDistribution */ public static function getSkewness(float $alpha) : float { - return $alpha < 4 ? 0.0 : 2 * (1 + $alpha) / ($alpha - 3) * \sqrt(($alpha - 2) / $alpha); + return $alpha < 4 ? 0.0 : 2 * (1 + $alpha) / ($alpha - 3) * sqrt(($alpha - 2) / $alpha); } /** @@ -174,7 +174,7 @@ final class ParetoDistribution */ public static function getEntropy(float $xm, float $alpha) : float { - return \log(($xm / $alpha) * \exp(1 + 1 / $alpha)); + return log(($xm / $alpha) * exp(1 + 1 / $alpha)); } /** diff --git a/Math/Stochastic/Distribution/PoissonDistribution.php b/Math/Stochastic/Distribution/PoissonDistribution.php index 2a424eb5d..61d933cf6 100644 --- a/Math/Stochastic/Distribution/PoissonDistribution.php +++ b/Math/Stochastic/Distribution/PoissonDistribution.php @@ -41,7 +41,7 @@ final class PoissonDistribution */ public static function getPmf(int $k, float $lambda) : float { - return \exp($k * \log($lambda) - $lambda - \log(Gamma::getGammaInteger($k + 1))); + return exp($k * log($lambda) - $lambda - log(Gamma::getGammaInteger($k + 1))); } /** @@ -59,10 +59,10 @@ final class PoissonDistribution $sum = 0.0; for ($i = 0; $i < $k + 1; ++$i) { - $sum += \pow($lambda, $i) / Functions::fact($i); + $sum += pow($lambda, $i) / Functions::fact($i); } - return \exp(-$lambda) * $sum; + return exp(-$lambda) * $sum; } /** @@ -76,7 +76,7 @@ final class PoissonDistribution */ public static function getMode(float $lambda) : float { - return \floor($lambda); + return floor($lambda); } /** @@ -104,7 +104,7 @@ final class PoissonDistribution */ public static function getMedian(float $lambda) : float { - return \floor($lambda + 1 / 3 - 0.02 / $lambda); + return floor($lambda + 1 / 3 - 0.02 / $lambda); } /** @@ -132,7 +132,7 @@ final class PoissonDistribution */ public static function getStandardDeviation(float $lambda) : float { - return \sqrt($lambda); + return sqrt($lambda); } /** @@ -147,7 +147,7 @@ final class PoissonDistribution */ public static function getMgf(float $lambda, float $t) : float { - return \exp($lambda * (\exp($t) - 1)); + return exp($lambda * (exp($t) - 1)); } /** @@ -161,7 +161,7 @@ final class PoissonDistribution */ public static function getSkewness(float $lambda) : float { - return \pow($lambda, -1 / 2); + return pow($lambda, -1 / 2); } /** @@ -175,7 +175,7 @@ final class PoissonDistribution */ public static function getFisherInformation(float $lambda) : float { - return \pow($lambda, -1); + return pow($lambda, -1); } /** @@ -189,6 +189,6 @@ final class PoissonDistribution */ public static function getExKurtosis(float $lambda) : float { - return \pow($lambda, -1); + return pow($lambda, -1); } } diff --git a/Math/Stochastic/Distribution/TDistribution.php b/Math/Stochastic/Distribution/TDistribution.php index 343e9c2b0..4cd1dc5a8 100644 --- a/Math/Stochastic/Distribution/TDistribution.php +++ b/Math/Stochastic/Distribution/TDistribution.php @@ -145,7 +145,7 @@ final class TDistribution */ public static function getStandardDeviation(int $nu) : float { - return $nu < 3 ? \PHP_FLOAT_MAX : \sqrt(self::getVariance($nu)); + return $nu < 3 ? \PHP_FLOAT_MAX : sqrt(self::getVariance($nu)); } /** @@ -184,9 +184,9 @@ final class TDistribution * Ellis Horwood Ltd.; W. Sussex, England */ $term = $degrees; - $theta = \atan2($x, \sqrt($term)); - $cos = \cos($theta); - $sin = \sin($theta); + $theta = atan2($x, sqrt($term)); + $cos = cos($theta); + $sin = sin($theta); $sum = 0.0; if ($degrees % 2 === 1) { @@ -212,6 +212,6 @@ final class TDistribution $t = 0.5 * (1 + $sum); - return $tails === 1 ? \abs($t) : 1 - \abs(1 - $t - $t); + return $tails === 1 ? abs($t) : 1 - abs(1 - $t - $t); } } diff --git a/Math/Stochastic/Distribution/UniformDistributionContinuous.php b/Math/Stochastic/Distribution/UniformDistributionContinuous.php index c55ce0911..e514f562d 100644 --- a/Math/Stochastic/Distribution/UniformDistributionContinuous.php +++ b/Math/Stochastic/Distribution/UniformDistributionContinuous.php @@ -90,7 +90,7 @@ final class UniformDistributionContinuous */ public static function getMgf(int $t, float $a, float $b) : float { - return $t === 0 ? 1 : (\exp($t * $b) - \exp($t * $a)) / ($t * ($b - $a)); + return $t === 0 ? 1 : (exp($t * $b) - exp($t * $a)) / ($t * ($b - $a)); } /** @@ -174,6 +174,6 @@ final class UniformDistributionContinuous */ public static function getStandardDeviation(float $a, float $b) : float { - return \sqrt(self::getVariance($a, $b)); + return sqrt(self::getVariance($a, $b)); } } diff --git a/Math/Stochastic/Distribution/UniformDistributionDiscrete.php b/Math/Stochastic/Distribution/UniformDistributionDiscrete.php index 939a103b8..e46e2f055 100644 --- a/Math/Stochastic/Distribution/UniformDistributionDiscrete.php +++ b/Math/Stochastic/Distribution/UniformDistributionDiscrete.php @@ -58,7 +58,7 @@ final class UniformDistributionDiscrete throw new \OutOfBoundsException('Out of bounds'); } - return (\floor($k) - $a + 1) / ($b - $a + 1); + return (floor($k) - $a + 1) / ($b - $a + 1); } /** @@ -74,8 +74,8 @@ final class UniformDistributionDiscrete */ public static function getMgf(int $t, float $a, float $b) : float { - return (\exp($a * $t) - \exp(($b + 1) * $t)) - / (($b - $a + 1) * (1 - \exp($t))); + return (exp($a * $t) - exp(($b + 1) * $t)) + / (($b - $a + 1) * (1 - exp($t))); } /** @@ -164,6 +164,6 @@ final class UniformDistributionDiscrete */ public static function getStandardDeviation(float $a, float $b) : float { - return \sqrt(self::getVariance($a, $b)); + return sqrt(self::getVariance($a, $b)); } } diff --git a/Math/Stochastic/Distribution/WeibullDistribution.php b/Math/Stochastic/Distribution/WeibullDistribution.php index 7187f453c..b60b5ad68 100644 --- a/Math/Stochastic/Distribution/WeibullDistribution.php +++ b/Math/Stochastic/Distribution/WeibullDistribution.php @@ -40,7 +40,7 @@ final class WeibullDistribution { return $x < 0.0 ? 0.0 - : $k / $lambda * \pow($x / $lambda, $k - 1) * \exp(-($x / $lambda) ** $k); + : $k / $lambda * pow($x / $lambda, $k - 1) * exp(-($x / $lambda) ** $k); } /** @@ -58,7 +58,7 @@ final class WeibullDistribution { return $x < 0.0 ? 0.0 - : 1 - \exp(-($x / $lambda) ** $k); + : 1 - exp(-($x / $lambda) ** $k); } /** @@ -88,7 +88,7 @@ final class WeibullDistribution */ public static function getMedian(float $lambda, float $k) : float { - return $lambda * \pow(\log(2), 1 / $k); + return $lambda * pow(log(2), 1 / $k); } /** @@ -118,7 +118,7 @@ final class WeibullDistribution */ public static function getStandardDeviation(float $lambda, float $k) : float { - return \sqrt(self::getVariance($lambda, $k)); + return sqrt(self::getVariance($lambda, $k)); } /** @@ -133,7 +133,7 @@ final class WeibullDistribution */ public static function getMode(float $lambda, float $k) : float { - return $lambda * \pow(($k - 1) / $k, 1 / $k); + return $lambda * pow(($k - 1) / $k, 1 / $k); } /** @@ -169,6 +169,6 @@ final class WeibullDistribution { $gamma = 0.57721566490153286060651209008240243104215933593992; - return $gamma * (1 - 1 / $k) + \log($lambda / $k) + 1; + return $gamma * (1 - 1 / $k) + log($lambda / $k) + 1; } } diff --git a/Math/Stochastic/Distribution/ZTesting.php b/Math/Stochastic/Distribution/ZTesting.php index 85e193d01..883497ac2 100644 --- a/Math/Stochastic/Distribution/ZTesting.php +++ b/Math/Stochastic/Distribution/ZTesting.php @@ -54,7 +54,7 @@ final class ZTesting */ public static function testHypothesis(float $dataset, float $expected, float $total, float $significance = 0.95) : bool { - $z = ($dataset - $expected) / \sqrt($expected * (1 - $expected) / $total); + $z = ($dataset - $expected) / sqrt($expected * (1 - $expected) / $total); $zSignificance = 0.0; foreach (self::TABLE as $key => $value) { @@ -81,7 +81,7 @@ final class ZTesting { $sigma ??= MeasureOfDispersion::standardDeviationSample($data); - return 1 - NormalDistribution::getCdf((Average::arithmeticMean($data) - $value) / ($sigma / \sqrt(\count($data))), 0.0, 1.0); + return 1 - NormalDistribution::getCdf((Average::arithmeticMean($data) - $value) / ($sigma / sqrt(\count($data))), 0.0, 1.0); } /** @@ -98,6 +98,6 @@ final class ZTesting */ public static function zTestValues(float $value, float $mean, int $dataSize, float $sigma) : float { - return 1 - NormalDistribution::getCdf(($mean - $value) / ($sigma / \sqrt($dataSize)), 0.0, 1.0); + return 1 - NormalDistribution::getCdf(($mean - $value) / ($sigma / sqrt($dataSize)), 0.0, 1.0); } } diff --git a/Math/Stochastic/NaiveBayesClassifier.php b/Math/Stochastic/NaiveBayesClassifier.php index 0c76bc8bc..3b529fd45 100644 --- a/Math/Stochastic/NaiveBayesClassifier.php +++ b/Math/Stochastic/NaiveBayesClassifier.php @@ -148,24 +148,24 @@ final class NaiveBayesClassifier if (isset($this->dict[$criteria][$attr]['data'][$word]) && $this->dict[$criteria][$attr]['data'][$word] >= $minimum ) { - $p = ($this->dict[$criteria][$attr]['data'][$word] / \array_sum($this->dict[$criteria][$attr]['data'])) + $p = ($this->dict[$criteria][$attr]['data'][$word] / array_sum($this->dict[$criteria][$attr]['data'])) * ($this->probabilities['criteria'][$criteria]['count'] / $this->probabilities['count']) / $this->probabilities['attr'][$attr]['data'][$word]; - $n += \log(1 - $p) - \log($p); + $n += log(1 - $p) - log($p); } } } else { - $p = (1 / \sqrt(2 * \M_PI * $this->probabilities['criteria'][$criteria]['attr'][$attr]['variance']) - * \exp(-($value - $this->probabilities['criteria'][$criteria]['attr'][$attr]['mean']) ** 2 / (2 * $this->probabilities['criteria'][$criteria]['attr'][$attr]['variance']))) + $p = (1 / sqrt(2 * \M_PI * $this->probabilities['criteria'][$criteria]['attr'][$attr]['variance']) + * exp(-($value - $this->probabilities['criteria'][$criteria]['attr'][$attr]['mean']) ** 2 / (2 * $this->probabilities['criteria'][$criteria]['attr'][$attr]['variance']))) * ($this->probabilities['criteria'][$criteria]['count'] / $this->probabilities['count']) / $this->probabilities['attr'][$attr]['data']; - $n += \log(1 - $p) - \log($p); + $n += log(1 - $p) - log($p); } } - return 1 / (1 + \exp($n)); + return 1 / (1 + exp($n)); } /** @@ -191,8 +191,8 @@ final class NaiveBayesClassifier $this->probabilities['attr'][$attr] = ['data' => 0.0]; } - $this->probabilities['attr'][$attr]['data'] += (1 / \sqrt(2 * \M_PI * $this->probabilities['criteria'][$criteria]['attr'][$attr]['variance']) - * \exp(-($toMatch[$attr] - $this->probabilities['criteria'][$criteria]['attr'][$attr]['mean']) ** 2 / (2 * $this->probabilities['criteria'][$criteria]['attr'][$attr]['variance']))) + $this->probabilities['attr'][$attr]['data'] += (1 / sqrt(2 * \M_PI * $this->probabilities['criteria'][$criteria]['attr'][$attr]['variance']) + * exp(-($toMatch[$attr] - $this->probabilities['criteria'][$criteria]['attr'][$attr]['mean']) ** 2 / (2 * $this->probabilities['criteria'][$criteria]['attr'][$attr]['variance']))) * ($this->probabilities['criteria'][$criteria]['count'] / $this->probabilities['count']); } else { if (!isset($this->probabilities['attr'][$attr])) { @@ -208,7 +208,7 @@ final class NaiveBayesClassifier $this->probabilities['attr'][$attr]['data'][$word] = 0.0; } - $this->probabilities['attr'][$attr]['data'][$word] += ($this->dict[$criteria][$attr]['data'][$word] / \array_sum($this->dict[$criteria][$attr]['data'])) + $this->probabilities['attr'][$attr]['data'][$word] += ($this->dict[$criteria][$attr]['data'][$word] / array_sum($this->dict[$criteria][$attr]['data'])) * ($this->probabilities['criteria'][$criteria]['count'] / $this->probabilities['count']); } } diff --git a/Math/Topology/Metrics2D.php b/Math/Topology/Metrics2D.php index 7d55d2083..2513b08e5 100644 --- a/Math/Topology/Metrics2D.php +++ b/Math/Topology/Metrics2D.php @@ -51,7 +51,7 @@ final class Metrics2D */ public static function manhattan(array $a, array $b) : float { - return \abs($a['x'] - $b['x']) + \abs($a['y'] - $b['y']); + return abs($a['x'] - $b['x']) + abs($a['y'] - $b['y']); } /** @@ -68,10 +68,10 @@ final class Metrics2D */ public static function euclidean(array $a, array $b) : float { - $dx = \abs($a['x'] - $b['x']); - $dy = \abs($a['y'] - $b['y']); + $dx = abs($a['x'] - $b['x']); + $dy = abs($a['y'] - $b['y']); - return \sqrt($dx * $dx + $dy * $dy); + return sqrt($dx * $dx + $dy * $dy); } /** @@ -88,10 +88,10 @@ final class Metrics2D */ public static function octile(array $a, array $b) : float { - $dx = \abs($a['x'] - $b['x']); - $dy = \abs($a['y'] - $b['y']); + $dx = abs($a['x'] - $b['x']); + $dy = abs($a['y'] - $b['y']); - return $dx < $dy ? (\sqrt(2) - 1) * $dx + $dy : (\sqrt(2) - 1) * $dy + $dx; + return $dx < $dy ? (sqrt(2) - 1) * $dx + $dy : (sqrt(2) - 1) * $dy + $dx; } /** @@ -108,9 +108,9 @@ final class Metrics2D */ public static function chebyshev(array $a, array $b) : float { - return \max( - \abs($a['x'] - $b['x']), - \abs($a['y'] - $b['y']) + return max( + abs($a['x'] - $b['x']), + abs($a['y'] - $b['y']) ); } @@ -129,9 +129,9 @@ final class Metrics2D */ public static function minkowski(array $a, array $b, int $lambda) : float { - return \pow( - \pow(\abs($a['x'] - $b['x']), $lambda) - + \pow(\abs($a['y'] - $b['y']), $lambda), + return pow( + pow(abs($a['x'] - $b['x']), $lambda) + + pow(abs($a['y'] - $b['y']), $lambda), 1 / $lambda ); } @@ -150,8 +150,8 @@ final class Metrics2D */ public static function canberra(array $a, array $b) : float { - return \abs($a['x'] - $b['x']) / (\abs($a['x']) + \abs($b['x'])) - + \abs($a['y'] - $b['y']) / (\abs($a['y']) + \abs($b['y'])); + return abs($a['x'] - $b['x']) / (abs($a['x']) + abs($b['x'])) + + abs($a['y'] - $b['y']) / (abs($a['y']) + abs($b['y'])); } /** @@ -168,8 +168,8 @@ final class Metrics2D */ public static function brayCurtis(array $a, array $b) : float { - return (\abs($a['x'] - $b['x']) - + \abs($a['y'] - $b['y'])) + return (abs($a['x'] - $b['x']) + + abs($a['y'] - $b['y'])) / (($a['x'] + $b['x']) + ($a['y'] + $b['y'])); } @@ -188,7 +188,7 @@ final class Metrics2D */ public static function angularSeparation(array $a, array $b) : float { - return ($a['x'] * $b['x'] + $a['y'] * $b['y']) / \pow(($a['x'] ** 2 + $a['y'] ** 2) * ($b['x'] ** 2 + $b['y'] ** 2), 1 / 2); + return ($a['x'] * $b['x'] + $a['y'] * $b['y']) / pow(($a['x'] ** 2 + $a['y'] ** 2) * ($b['x'] ** 2 + $b['y'] ** 2), 1 / 2); } /** @@ -253,11 +253,11 @@ final class Metrics2D $bPos[$i] = [$b[$i], $i]; } - \usort($bPos, function ($e1, $e2) { + usort($bPos, function ($e1, $e2) { return $e1[0] <=> $e2[0]; }); - $vis = \array_fill(0, $size, false); + $vis = array_fill(0, $size, false); $ans = 0; for ($i = 0; $i < $size; ++$i) { diff --git a/Math/Topology/MetricsND.php b/Math/Topology/MetricsND.php index b2b4c2bd3..9ccbdd74b 100644 --- a/Math/Topology/MetricsND.php +++ b/Math/Topology/MetricsND.php @@ -57,7 +57,7 @@ final class MetricsND $dist = 0.0; foreach ($a as $key => $e) { - $dist += \abs($e - $b[$key]); + $dist += abs($e - $b[$key]); } return $dist; @@ -83,10 +83,10 @@ final class MetricsND $dist = 0.0; foreach ($a as $key => $e) { - $dist += \abs($e - $b[$key]) ** 2; + $dist += abs($e - $b[$key]) ** 2; } - return \sqrt($dist); + return sqrt($dist); } /** @@ -109,10 +109,10 @@ final class MetricsND $dist = []; foreach ($a as $key => $e) { - $dist[] = \abs($e - $b[$key]); + $dist[] = abs($e - $b[$key]); } - return (float) \max($dist); + return (float) max($dist); } /** @@ -136,10 +136,10 @@ final class MetricsND $dist = 0.0; foreach ($a as $key => $e) { - $dist += \pow(\abs($e - $b[$key]), $lambda); + $dist += pow(abs($e - $b[$key]), $lambda); } - return \pow($dist, 1 / $lambda); + return pow($dist, 1 / $lambda); } /** @@ -162,7 +162,7 @@ final class MetricsND $dist = 0.0; foreach ($a as $key => $e) { - $dist += \abs($e - $b[$key]) / (\abs($e) + \abs($b[$key])); + $dist += abs($e - $b[$key]) / (abs($e) + abs($b[$key])); } return $dist; @@ -189,7 +189,7 @@ final class MetricsND $distTop = 0.0; $distBottom = 0.0; foreach ($a as $key => $e) { - $distTop += \abs($e - $b[$key]); + $distTop += abs($e - $b[$key]); $distBottom += $e + $b[$key]; } @@ -223,7 +223,7 @@ final class MetricsND $distBottomB += $b[$key] ** 2; } - return $distTop / \pow($distBottomA * $distBottomB, 1 / 2); + return $distTop / pow($distBottomA * $distBottomB, 1 / 2); } /** diff --git a/Message/Console/ConsoleHeader.php b/Message/Console/ConsoleHeader.php index c7844d8da..a73639b7a 100644 --- a/Message/Console/ConsoleHeader.php +++ b/Message/Console/ConsoleHeader.php @@ -72,7 +72,7 @@ final class ConsoleHeader extends HeaderAbstract return false; } - $key = \strtolower($key); + $key = strtolower($key); if (!$overwrite && isset($this->header[$key])) { return false; @@ -146,7 +146,7 @@ final class ConsoleHeader extends HeaderAbstract return $this->header; } - return $this->header[\strtolower($key)] ?? []; + return $this->header[strtolower($key)] ?? []; } /** diff --git a/Message/Console/ConsoleRequest.php b/Message/Console/ConsoleRequest.php index 39ee7f1fd..f5830a8a4 100644 --- a/Message/Console/ConsoleRequest.php +++ b/Message/Console/ConsoleRequest.php @@ -108,7 +108,7 @@ final class ConsoleRequest extends RequestAbstract $paths[] = $pathArray[$i]; } - $this->hash[] = \sha1(\implode('', $paths)); + $this->hash[] = sha1(implode('', $paths)); } } @@ -148,7 +148,7 @@ final class ConsoleRequest extends RequestAbstract public function getOS() : string { if (!isset($this->os)) { - $this->os = \strtolower(\PHP_OS); + $this->os = strtolower(\PHP_OS); } return $this->os; diff --git a/Message/Console/ConsoleResponse.php b/Message/Console/ConsoleResponse.php index 0cc881ea6..440c0f328 100644 --- a/Message/Console/ConsoleResponse.php +++ b/Message/Console/ConsoleResponse.php @@ -109,8 +109,8 @@ final class ConsoleResponse extends ResponseAbstract implements RenderableInterf $types = $this->header->get('Content-Type'); foreach ($types as $type) { - if (\stripos($type, MimeType::M_JSON) !== false) { - return (string) \json_encode($this->jsonSerialize()); + if (stripos($type, MimeType::M_JSON) !== false) { + return (string) json_encode($this->jsonSerialize()); } } @@ -135,7 +135,7 @@ final class ConsoleResponse extends ResponseAbstract implements RenderableInterf foreach ($this->response as $key => $response) { if ($response instanceof \Serializable) { $render .= $response->serialize(); - } elseif (\is_string($response) || \is_numeric($response)) { + } elseif (\is_string($response) || is_numeric($response)) { $render .= $response; } else { throw new \Exception('Wrong response type'); @@ -158,7 +158,7 @@ final class ConsoleResponse extends ResponseAbstract implements RenderableInterf $result += $response->toArray(); } elseif (\is_array($response)) { $result += $response; - } elseif (\is_scalar($response)) { + } elseif (is_scalar($response)) { $result[] = $response; } elseif ($response instanceof \JsonSerializable) { $result[] = $response->jsonSerialize(); diff --git a/Message/Http/HttpHeader.php b/Message/Http/HttpHeader.php index e022c7fbf..55cd99c82 100644 --- a/Message/Http/HttpHeader.php +++ b/Message/Http/HttpHeader.php @@ -66,7 +66,7 @@ final class HttpHeader extends HeaderAbstract return false; } - $key = \strtolower($key); + $key = strtolower($key); if (!$overwrite && isset($this->header[$key])) { return false; @@ -113,7 +113,7 @@ final class HttpHeader extends HeaderAbstract */ public static function isSecurityHeader(string $key) : bool { - $key = \strtolower($key); + $key = strtolower($key); return $key === 'content-security-policy' || $key === 'x-xss-protection' @@ -144,20 +144,20 @@ final class HttpHeader extends HeaderAbstract if (\function_exists('getallheaders')) { // @codeCoverageIgnoreStart - self::$serverHeaders = \getallheaders(); + self::$serverHeaders = getallheaders(); // @codeCoverageIgnoreEnd } foreach ($_SERVER as $name => $value) { - $part = \substr($name, 5); + $part = substr($name, 5); if ($part === 'HTTP_') { self::$serverHeaders[ - \str_replace( + str_replace( ' ', '-', - \ucwords( - \strtolower( - \str_replace('_', ' ', $part) + ucwords( + strtolower( + str_replace('_', ' ', $part) ) ) ) @@ -207,7 +207,7 @@ final class HttpHeader extends HeaderAbstract */ public function get(string $key = null) : array { - return $key === null ? $this->header : ($this->header[\strtolower($key)] ?? []); + return $key === null ? $this->header : ($this->header[strtolower($key)] ?? []); } /** @@ -234,11 +234,11 @@ final class HttpHeader extends HeaderAbstract foreach ($this->header as $name => $arr) { foreach ($arr as $value) { - \header($name . ': ' . $value); + header($name . ': ' . $value); } } - \header("X-Powered-By: hidden"); + header("X-Powered-By: hidden"); $this->lock(); } @@ -280,7 +280,7 @@ final class HttpHeader extends HeaderAbstract { $this->set('HTTP', 'HTTP/1.0 403 Forbidden'); $this->set('Status', 'Status: HTTP/1.0 403 Forbidden'); - \http_response_code(403); + http_response_code(403); } /** @@ -294,7 +294,7 @@ final class HttpHeader extends HeaderAbstract { $this->set('HTTP', 'HTTP/1.0 404 Not Found'); $this->set('Status', 'Status: HTTP/1.0 404 Not Found'); - \http_response_code(404); + http_response_code(404); } /** @@ -308,7 +308,7 @@ final class HttpHeader extends HeaderAbstract { $this->set('HTTP', 'HTTP/1.0 406 Not acceptable'); $this->set('Status', 'Status: 406 Not acceptable'); - \http_response_code(406); + http_response_code(406); } /** @@ -320,7 +320,7 @@ final class HttpHeader extends HeaderAbstract */ private function generate407() : void { - \http_response_code(407); + http_response_code(407); } /** @@ -335,7 +335,7 @@ final class HttpHeader extends HeaderAbstract $this->set('HTTP', 'HTTP/1.0 503 Service Temporarily Unavailable'); $this->set('Status', 'Status: 503 Service Temporarily Unavailable'); $this->set('Retry-After', 'Retry-After: 300'); - \http_response_code(503); + http_response_code(503); } /** @@ -350,6 +350,6 @@ final class HttpHeader extends HeaderAbstract $this->set('HTTP', 'HTTP/1.0 500 Internal Server Error'); $this->set('Status', 'Status: 500 Internal Server Error'); $this->set('Retry-After', 'Retry-After: 300'); - \http_response_code(500); + http_response_code(500); } } diff --git a/Message/Http/HttpRequest.php b/Message/Http/HttpRequest.php index 2fda9c2fc..080876e9a 100644 --- a/Message/Http/HttpRequest.php +++ b/Message/Http/HttpRequest.php @@ -101,7 +101,7 @@ final class HttpRequest extends RequestAbstract self::cleanupGlobals(); } - $this->data = \array_change_key_case($this->data, \CASE_LOWER); + $this->data = array_change_key_case($this->data, \CASE_LOWER); } /** @@ -136,38 +136,38 @@ final class HttpRequest extends RequestAbstract return; } - if (\stripos($_SERVER['CONTENT_TYPE'], 'application/json') !== false) { + if (stripos($_SERVER['CONTENT_TYPE'], 'application/json') !== false) { // @codeCoverageIgnoreStart // Tested but coverage doesn't show up - $input = \file_get_contents('php://input'); + $input = file_get_contents('php://input'); if ($input === false || empty($input)) { return; } - $json = \json_decode($input, true); + $json = json_decode($input, true); if ($json === false || $json === null) { throw new \Exception('Is not valid json ' . $input); } $this->data = $json + $this->data; // @codeCoverageIgnoreEnd - } elseif (\stripos($_SERVER['CONTENT_TYPE'], 'application/x-www-form-urlencoded') !== false) { + } elseif (stripos($_SERVER['CONTENT_TYPE'], 'application/x-www-form-urlencoded') !== false) { // @codeCoverageIgnoreStart // Tested but coverage doesn't show up - $content = \file_get_contents('php://input'); + $content = file_get_contents('php://input'); if ($content === false || empty($content)) { return; } - \parse_str($content, $temp); + parse_str($content, $temp); $this->data += $temp; // @codeCoverageIgnoreEnd - } elseif (\stripos($_SERVER['CONTENT_TYPE'], 'multipart/form-data') !== false) { + } elseif (stripos($_SERVER['CONTENT_TYPE'], 'multipart/form-data') !== false) { // @codeCoverageIgnoreStart // Tested but coverage doesn't show up - $stream = \fopen('php://input', 'r'); + $stream = fopen('php://input', 'r'); $partInfo = null; $boundary = null; @@ -176,35 +176,35 @@ final class HttpRequest extends RequestAbstract } // @codeCoverageIgnoreEnd - while (($lineRaw = \fgets($stream)) !== false) { + while (($lineRaw = fgets($stream)) !== false) { // @codeCoverageIgnoreStart // Tested but coverage doesn't show up - if (\strpos($lineRaw, '--') === 0) { + if (strpos($lineRaw, '--') === 0) { if ($boundary === null) { - $boundary = \rtrim($lineRaw); + $boundary = rtrim($lineRaw); } continue; } - $line = \rtrim($lineRaw); + $line = rtrim($lineRaw); if ($line === '') { if (!empty($partInfo['Content-Disposition']['filename'])) { /* Is file */ - $tempdir = \sys_get_temp_dir(); + $tempdir = sys_get_temp_dir(); $name = $partInfo['Content-Disposition']['name']; $this->files[$name] = []; $this->files[$name]['name'] = $partInfo['Content-Disposition']['filename']; $this->files[$name]['type'] = $partInfo['Content-Type']['value'] ?? null; - $tempname = \tempnam($tempdir, 'oms_upl_'); + $tempname = tempnam($tempdir, 'oms_upl_'); if ($tempname === false) { $this->files[$name]['error'] = \UPLOAD_ERR_NO_TMP_DIR; return; } - $outFP = \fopen($tempname, 'wb'); + $outFP = fopen($tempname, 'wb'); if ($outFP === false) { $this->files[$name]['error'] = \UPLOAD_ERR_CANT_WRITE; @@ -212,13 +212,13 @@ final class HttpRequest extends RequestAbstract } $lastLine = null; - while (($lineRaw = \fgets($stream, 4096)) !== false) { + while (($lineRaw = fgets($stream, 4096)) !== false) { if ($lastLine !== null) { - if ($boundary === null || \strpos($lineRaw, $boundary) === 0) { + if ($boundary === null || strpos($lineRaw, $boundary) === 0) { break; } - if (\fwrite($outFP, $lastLine) === false) { + if (fwrite($outFP, $lastLine) === false) { $this->files[$name] = \UPLOAD_ERR_CANT_WRITE; return; } @@ -228,16 +228,16 @@ final class HttpRequest extends RequestAbstract } if ($lastLine !== null) { - if (\fwrite($outFP, \rtrim($lastLine, "\r\n")) === false) { + if (fwrite($outFP, rtrim($lastLine, "\r\n")) === false) { $this->files[$name]['error'] = \UPLOAD_ERR_CANT_WRITE; return; } } - \fclose($outFP); + fclose($outFP); $this->files[$name]['error'] = \UPLOAD_ERR_OK; - $this->files[$name]['size'] = \filesize($tempname); + $this->files[$name]['size'] = filesize($tempname); $this->files[$name]['tmp_name'] = $tempname; // @codeCoverageIgnoreEnd } elseif ($partInfo !== null) { /* Is variable */ @@ -246,7 +246,7 @@ final class HttpRequest extends RequestAbstract $fullValue = ''; $lastLine = null; - while (($lineRaw = \fgets($stream)) !== false && $boundary !== null && \strpos($lineRaw, $boundary) !== 0) { + while (($lineRaw = fgets($stream)) !== false && $boundary !== null && strpos($lineRaw, $boundary) !== 0) { if ($lastLine !== null) { $fullValue .= $lastLine; } @@ -255,7 +255,7 @@ final class HttpRequest extends RequestAbstract } if ($lastLine !== null) { - $fullValue .= \rtrim($lastLine, "\r\n"); + $fullValue .= rtrim($lastLine, "\r\n"); } $this->data[$partInfo['Content-Disposition']['name']] = $fullValue; @@ -269,20 +269,20 @@ final class HttpRequest extends RequestAbstract // @codeCoverageIgnoreStart // Tested but coverage doesn't show up - $delim = \strpos($line, ':'); + $delim = strpos($line, ':'); if ($delim === false) { continue; } - $headerKey = \substr($line, 0, $delim); - $headerVal = \substr($line, $delim + 1); + $headerKey = substr($line, 0, $delim); + $headerVal = substr($line, $delim + 1); $header = []; $regex = '/(^|;)\s*(?P[^=:,;\s"]*):?(=("(?P[^"]*(\\.[^"]*)*)")|(\s*(?P[^=,;\s"]*)))?/mx'; $matches = null; - \preg_match_all($regex, $headerVal, $matches, \PREG_SET_ORDER); + preg_match_all($regex, $headerVal, $matches, \PREG_SET_ORDER); $length = \count($matches); for ($i = 0; $i < $length; ++$i) { @@ -290,7 +290,7 @@ final class HttpRequest extends RequestAbstract $name = $match['name']; $quotedValue = $match['quotedValue']; - $value = empty($quotedValue) ? $value = $match['value'] : \stripcslashes($quotedValue); + $value = empty($quotedValue) ? $value = $match['value'] : stripcslashes($quotedValue); if ($name === $headerKey && $i === 0) { $name = 'value'; @@ -306,7 +306,7 @@ final class HttpRequest extends RequestAbstract // @codeCoverageIgnoreEnd } - \fclose($stream); + fclose($stream); } } @@ -338,15 +338,15 @@ final class HttpRequest extends RequestAbstract } // @codeCoverageIgnoreStart - $components = \explode(';', $_SERVER['HTTP_ACCEPT_LANGUAGE']); - $locals = \stripos($components[0], ',') !== false - ? $locals = \explode(',', $components[0]) + $components = explode(';', $_SERVER['HTTP_ACCEPT_LANGUAGE']); + $locals = stripos($components[0], ',') !== false + ? $locals = explode(',', $components[0]) : $components; - $firstLocalComponents = \explode('-', $locals[0]); + $firstLocalComponents = explode('-', $locals[0]); // @codeCoverageIgnoreEnd - return \strtolower($firstLocalComponents[0]); // @codeCoverageIgnore + return strtolower($firstLocalComponents[0]); // @codeCoverageIgnore } /** @@ -363,11 +363,11 @@ final class HttpRequest extends RequestAbstract } // @codeCoverageIgnoreStart - $components = \explode(';', $_SERVER['HTTP_ACCEPT_LANGUAGE']); - $locals = \stripos($components[0], ',') !== false ? $locals = \explode(',', $components[0]) : $components; + $components = explode(';', $_SERVER['HTTP_ACCEPT_LANGUAGE']); + $locals = stripos($components[0], ',') !== false ? $locals = explode(',', $components[0]) : $components; // @codeCoverageIgnoreEnd - return \str_replace('-', '_', $locals[0]); // @codeCoverageIgnore + return str_replace('-', '_', $locals[0]); // @codeCoverageIgnore } /** @@ -425,7 +425,7 @@ final class HttpRequest extends RequestAbstract */ public function createRequestHashs(int $start = 0) : void { - $this->hash = [\sha1('')]; + $this->hash = [sha1('')]; $pathArray = $this->uri->getPathElements(); $pathLength = \count($pathArray); @@ -439,7 +439,7 @@ final class HttpRequest extends RequestAbstract $paths[] = $pathArray[$j]; } - $this->hash[] = \sha1(\implode('', $paths)); + $this->hash[] = sha1(implode('', $paths)); } } @@ -454,7 +454,7 @@ final class HttpRequest extends RequestAbstract { $useragent = $_SERVER['HTTP_USER_AGENT'] ?? ''; - if (\preg_match('/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i', $useragent) || \preg_match('/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i', $useragent)) { + if (preg_match('/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i', $useragent) || preg_match('/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i', $useragent)) { return true; // @codeCoverageIgnore } @@ -485,10 +485,10 @@ final class HttpRequest extends RequestAbstract { if (!isset($this->browser)) { $arr = BrowserType::getConstants(); - $httpUserAgent = \strtolower($_SERVER['HTTP_USER_AGENT'] ?? ''); + $httpUserAgent = strtolower($_SERVER['HTTP_USER_AGENT'] ?? ''); foreach ($arr as $key => $val) { - if (\stripos($httpUserAgent, $val)) { + if (stripos($httpUserAgent, $val)) { // @codeCoverageIgnoreStart $this->browser = $val; @@ -528,10 +528,10 @@ final class HttpRequest extends RequestAbstract { if (!isset($this->os)) { $arr = OSType::getConstants(); - $httpUserAgent = \strtolower($_SERVER['HTTP_USER_AGENT'] ?? ''); + $httpUserAgent = strtolower($_SERVER['HTTP_USER_AGENT'] ?? ''); foreach ($arr as $val) { - if (\stripos($httpUserAgent, $val)) { + if (stripos($httpUserAgent, $val)) { // @codeCoverageIgnoreStart $this->os = $val; @@ -596,7 +596,7 @@ final class HttpRequest extends RequestAbstract */ public function getBody() : string { - $body = \file_get_contents('php://input'); + $body = file_get_contents('php://input'); return $body === false ? '' : $body; } @@ -670,8 +670,8 @@ final class HttpRequest extends RequestAbstract { if ($this->getMethod() === RequestMethod::GET && !empty($this->data)) { return $this->uri->__toString() - . (\parse_url($this->uri->__toString(), \PHP_URL_QUERY) ? '&' : '?') - . \http_build_query($this->data); + . (parse_url($this->uri->__toString(), \PHP_URL_QUERY) ? '&' : '?') + . http_build_query($this->data); } return parent::__toString(); diff --git a/Message/Http/HttpResponse.php b/Message/Http/HttpResponse.php index a84506694..05aa39db9 100644 --- a/Message/Http/HttpResponse.php +++ b/Message/Http/HttpResponse.php @@ -94,7 +94,7 @@ final class HttpResponse extends ResponseAbstract implements RenderableInterface */ public function getJsonData() : array { - return \json_decode($this->getRaw(), true) ?? []; + return json_decode($this->getRaw(), true) ?? []; } /** @@ -111,8 +111,8 @@ final class HttpResponse extends ResponseAbstract implements RenderableInterface $types = $this->header->get('Content-Type'); foreach ($types as $type) { - if (\stripos($type, MimeType::M_JSON) !== false) { - return (string) \json_encode($this->jsonSerialize()); + if (stripos($type, MimeType::M_JSON) !== false) { + return (string) json_encode($this->jsonSerialize()); } } @@ -157,10 +157,10 @@ final class HttpResponse extends ResponseAbstract implements RenderableInterface private function removeWhitespaceAndLineBreak(string $render) : string { $types = $this->header->get('Content-Type'); - if (\stripos($types[0], MimeType::M_HTML) !== false) { - $clean = \preg_replace('/(?s).*?<\/pre>(*SKIP)(*F)|(\s{2,}|\n|\t)/', ' ', $render); + if (stripos($types[0], MimeType::M_HTML) !== false) { + $clean = preg_replace('/(?s).*?<\/pre>(*SKIP)(*F)|(\s{2,}|\n|\t)/', ' ', $render); - return \trim($clean ?? ''); + return trim($clean ?? ''); } return $render; @@ -176,7 +176,7 @@ final class HttpResponse extends ResponseAbstract implements RenderableInterface foreach ($this->response as $response) { if ($response instanceof View) { $result[] = $response->toArray(); - } elseif (\is_array($response) || \is_scalar($response)) { + } elseif (\is_array($response) || is_scalar($response)) { $result[] = $response; } elseif ($response instanceof \JsonSerializable) { $result[] = $response->jsonSerialize(); @@ -214,9 +214,9 @@ final class HttpResponse extends ResponseAbstract implements RenderableInterface $this->header->push(); } - $levels = $levels === 0 ? \ob_get_level() : $levels; + $levels = $levels === 0 ? ob_get_level() : $levels; for ($i = 0; $i < $levels; ++$i) { - \ob_end_clean(); + ob_end_clean(); } } } diff --git a/Message/Http/Rest.php b/Message/Http/Rest.php index 5091dd081..0dda82e1b 100644 --- a/Message/Http/Rest.php +++ b/Message/Http/Rest.php @@ -39,101 +39,101 @@ final class Rest */ public static function request(HttpRequest $request) : HttpResponse { - $curl = \curl_init(); + $curl = curl_init(); if ($curl === false) { throw new \Exception('Internal curl_init error.'); // @codeCoverageIgnore } - \curl_setopt($curl, \CURLOPT_NOBODY, true); + curl_setopt($curl, \CURLOPT_NOBODY, true); // handle header $requestHeaders = $request->header->get(); $headers = []; foreach ($requestHeaders as $key => $header) { - $headers[$key] = $key . ': ' . \implode('', $header); + $headers[$key] = $key . ': ' . implode('', $header); } - \curl_setopt($curl, \CURLOPT_HTTPHEADER, $headers); - \curl_setopt($curl, \CURLOPT_HEADER, true); - \curl_setopt($curl, \CURLOPT_CONNECTTIMEOUT, 5); - \curl_setopt($curl, \CURLOPT_TIMEOUT, 30); + curl_setopt($curl, \CURLOPT_HTTPHEADER, $headers); + curl_setopt($curl, \CURLOPT_HEADER, true); + curl_setopt($curl, \CURLOPT_CONNECTTIMEOUT, 5); + curl_setopt($curl, \CURLOPT_TIMEOUT, 30); switch ($request->getMethod()) { case RequestMethod::GET: - \curl_setopt($curl, \CURLOPT_HTTPGET, true); + curl_setopt($curl, \CURLOPT_HTTPGET, true); break; case RequestMethod::POST: - \curl_setopt($curl, \CURLOPT_CUSTOMREQUEST, 'POST'); + curl_setopt($curl, \CURLOPT_CUSTOMREQUEST, 'POST'); break; case RequestMethod::PUT: - \curl_setopt($curl, \CURLOPT_CUSTOMREQUEST, 'PUT'); + curl_setopt($curl, \CURLOPT_CUSTOMREQUEST, 'PUT'); break; case RequestMethod::DELETE: - \curl_setopt($curl, \CURLOPT_CUSTOMREQUEST, 'DELETE'); + curl_setopt($curl, \CURLOPT_CUSTOMREQUEST, 'DELETE'); break; } // handle none-get if ($request->getMethod() !== RequestMethod::GET) { - \curl_setopt($curl, \CURLOPT_POST, 1); + curl_setopt($curl, \CURLOPT_POST, 1); // handle different content types $contentType = $requestHeaders['content-type'] ?? []; if ($request->getData() !== null && (empty($contentType) || \in_array(MimeType::M_POST, $contentType))) { - \curl_setopt($curl, \CURLOPT_POSTFIELDS, \http_build_query($request->getData())); + curl_setopt($curl, \CURLOPT_POSTFIELDS, http_build_query($request->getData())); } elseif ($request->getData() !== null && \in_array(MimeType::M_JSON, $contentType)) { - \curl_setopt($curl, \CURLOPT_POSTFIELDS, \json_encode($request->getData())); + curl_setopt($curl, \CURLOPT_POSTFIELDS, json_encode($request->getData())); } elseif ($request->getData() !== null && \in_array(MimeType::M_MULT, $contentType)) { - $boundary = '----' . \uniqid(); + $boundary = '----' . uniqid(); $data = self::createMultipartData($boundary, $request->getData()); // @todo: replace boundary/ with the correct boundary= in the future. Currently this cannot be done due to a bug. If we do it now the server cannot correclty populate php://input $headers['content-type'] = 'Content-Type: multipart/form-data; boundary/' . $boundary; $headers['content-length'] = 'Content-Length: ' . \strlen($data); - \curl_setopt($curl, \CURLOPT_HTTPHEADER, $headers); - \curl_setopt($curl, \CURLOPT_POSTFIELDS, $data); + curl_setopt($curl, \CURLOPT_HTTPHEADER, $headers); + curl_setopt($curl, \CURLOPT_POSTFIELDS, $data); } } // handle user auth if ($request->uri->user !== '') { - \curl_setopt($curl, \CURLOPT_HTTPAUTH, \CURLAUTH_BASIC); - \curl_setopt($curl, \CURLOPT_USERPWD, $request->uri->getUserInfo()); + curl_setopt($curl, \CURLOPT_HTTPAUTH, \CURLAUTH_BASIC); + curl_setopt($curl, \CURLOPT_USERPWD, $request->uri->getUserInfo()); } $cHeaderString = ''; $response = new HttpResponse(); - \curl_setopt($curl, \CURLOPT_HEADERFUNCTION, + curl_setopt($curl, \CURLOPT_HEADERFUNCTION, function($curl, $header) use ($response, &$cHeaderString) { $cHeaderString .= $header; $length = \strlen($header); - $header = \explode(':', $header, 2); + $header = explode(':', $header, 2); if (\count($header) < 2) { return $length; } - $name = \strtolower(\trim($header[0])); - $response->header->set($name, \trim($header[1])); + $name = strtolower(trim($header[0])); + $response->header->set($name, trim($header[1])); return $length; } ); - \curl_setopt($curl, \CURLOPT_URL, $request->__toString()); - \curl_setopt($curl, \CURLOPT_RETURNTRANSFER, 1); + curl_setopt($curl, \CURLOPT_URL, $request->__toString()); + curl_setopt($curl, \CURLOPT_RETURNTRANSFER, 1); - $result = \curl_exec($curl); + $result = curl_exec($curl); $len = \strlen($cHeaderString); - \curl_close($curl); + curl_close($curl); - $response->set('', \substr(\is_bool($result) ? '' : $result, $len === false ? 0 : $len)); + $response->set('', substr(\is_bool($result) ? '' : $result, $len === false ? 0 : $len)); return $response; } diff --git a/Message/Mail/Email.php b/Message/Mail/Email.php index 29b1fd331..ab70004df 100644 --- a/Message/Mail/Email.php +++ b/Message/Mail/Email.php @@ -42,7 +42,7 @@ class Email implements MessageInterface * @var string * @since 1.0.0 */ - const XMAILER = 'phpOMS'; + public const XMAILER = 'phpOMS'; /** * The maximum line length supported by mail(). @@ -50,7 +50,7 @@ class Email implements MessageInterface * @var int * @since 1.0.0 */ - const MAIL_MAX_LINE_LENGTH = 63; + public const MAIL_MAX_LINE_LENGTH = 63; /** * The maximum line length allowed by RFC 2822 section 2.1.1. @@ -58,7 +58,7 @@ class Email implements MessageInterface * @var int * @since 1.0.0 */ - const MAX_LINE_LENGTH = 998; + public const MAX_LINE_LENGTH = 998; /** * The lower maximum line length allowed by RFC 2822 section 2.1.1. @@ -66,7 +66,7 @@ class Email implements MessageInterface * @var int * @since 1.0.0 */ - const STD_LINE_LENGTH = 76; + public const STD_LINE_LENGTH = 76; /** * Folding White Space. @@ -74,7 +74,7 @@ class Email implements MessageInterface * @var string * @since 1.0.0 */ - const FWS = ' '; + public const FWS = ' '; /** * SMTP RFC standard line ending @@ -444,8 +444,8 @@ class Email implements MessageInterface */ public function setFrom(string $address, string $name = '') : bool { - $address = \trim($address); - $name = \trim(\preg_replace('/[\r\n]+/', '', $name)); + $address = trim($address); + $name = trim(preg_replace('/[\r\n]+/', '', $name)); if (!EmailValidator::isValid($address)) { return false; @@ -592,13 +592,13 @@ class Email implements MessageInterface { $addresses = []; if ($useimap && \function_exists('imap_rfc822_parse_adrlist')) { - $list = \imap_rfc822_parse_adrlist($addrstr, ''); + $list = imap_rfc822_parse_adrlist($addrstr, ''); foreach ($list as $address) { - if (('.SYNTAX-ERROR.' !== $address->host) + if (($address->host !== '.SYNTAX-ERROR.') && EmailValidator::isValid($address->mailbox . '@' . $address->host) ) { $addresses[] = [ - 'name' => (\property_exists($address, 'personal') ? $address->personal : ''), + 'name' => (property_exists($address, 'personal') ? $address->personal : ''), 'address' => $address->mailbox . '@' . $address->host, ]; } @@ -607,10 +607,10 @@ class Email implements MessageInterface return $addresses; } - $list = \explode(',', $addrstr); + $list = explode(',', $addrstr); foreach ($list as $address) { - $address = \trim($address); - if (\strpos($address, '<') === false) { + $address = trim($address); + if (strpos($address, '<') === false) { if (EmailValidator::isValid($address)) { $addresses[] = [ 'name' => '', @@ -618,12 +618,12 @@ class Email implements MessageInterface ]; } } else { - list($name, $email) = \explode('<', $address); - $email = \trim(\str_replace('>', '', $email)); + list($name, $email) = explode('<', $address); + $email = trim(str_replace('>', '', $email)); if (EmailValidator::isValid($email)) { $addresses[] = [ - 'name' => \trim(\str_replace(['"', "'"], '', $name)), + 'name' => trim(str_replace(['"', "'"], '', $name)), 'address' => $email, ]; } @@ -669,7 +669,7 @@ class Email implements MessageInterface ? $this->createAddressList('To', $this->to) : 'Subject: undisclosed-recipients:;' . self::$LE; - $this->header .= 'Subject: ' . $this->encodeHeader(\trim(\str_replace(["\r", "\n"], '', $this->subject))) . self::$LE; + $this->header .= 'Subject: ' . $this->encodeHeader(trim(str_replace(["\r", "\n"], '', $this->subject))) . self::$LE; } // Sign with DKIM if enabled @@ -678,17 +678,17 @@ class Email implements MessageInterface && (!empty($this->dkimPrivateKey) || (!empty($this->dkimPrivatePath) && FileUtils::isPermittedPath($this->dkimPrivatePath) - && \is_file($this->dkimPrivatePath) + && is_file($this->dkimPrivatePath) ) ) ) { $headerDkim = $this->dkimAdd( $this->headerMime . $this->header, - $this->encodeHeader(\trim(\str_replace(["\r", "\n"], '', $this->subject))), + $this->encodeHeader(trim(str_replace(["\r", "\n"], '', $this->subject))), $this->bodyMime ); - $this->headerMime = \rtrim($this->headerMime, " \r\n\t") . self::$LE . + $this->headerMime = rtrim($this->headerMime, " \r\n\t") . self::$LE . self::normalizeBreaks($headerDkim, self::$LE) . self::$LE; } @@ -716,7 +716,7 @@ class Email implements MessageInterface : 'To: undisclosed-recipients:;' . self::$LE; } - $result .= $this->addrAppend('From', [[\trim($this->from), $this->fromName]]); + $result .= $this->addrAppend('From', [[trim($this->from), $this->fromName]]); // sendmail and mail() extract Cc from the header before sending if (\count($this->cc) > 0) { @@ -738,16 +738,16 @@ class Email implements MessageInterface // mail() sets the subject itself if ($this->mailer !== SubmitType::MAIL) { - $result .= 'Subject: ' . $this->encodeHeader(\trim(\str_replace(["\r", "\n"], '', $this->subject))) . self::$LE; + $result .= 'Subject: ' . $this->encodeHeader(trim(str_replace(["\r", "\n"], '', $this->subject))) . self::$LE; } $this->hostname = empty($this->hostname) ? SystemUtils::getHostname() : $this->hostname; // Only allow a custom message Id if it conforms to RFC 5322 section 3.6.4 // https://tools.ietf.org/html/rfc5322#section-3.6.4 - $this->messageId = $this->messageId !== '' && \preg_match('/^<.*@.*>$/', $this->messageId) + $this->messageId = $this->messageId !== '' && preg_match('/^<.*@.*>$/', $this->messageId) ? $this->messageId - : \sprintf('<%s@%s>', $this->uniqueid, $this->hostname); + : sprintf('<%s@%s>', $this->uniqueid, $this->hostname); $result .= 'Message-ID: ' . $this->messageId . self::$LE; @@ -763,7 +763,7 @@ class Email implements MessageInterface // Add custom headers foreach ($this->customHeader as $header) { - $result .= \trim($header[0]) . ': ' . $this->encodeHeader(\trim($header[1])) . self::$LE; + $result .= trim($header[0]) . ': ' . $this->encodeHeader(trim($header[1])) . self::$LE; } if (!empty($this->signKeyFile)) { @@ -791,7 +791,7 @@ class Email implements MessageInterface $addresses[] = $this->addrFormat($address); } - return $type . ': ' . \implode(', ', $addresses) . self::$LE; + return $type . ': ' . implode(', ', $addresses) . self::$LE; } /** @@ -806,11 +806,11 @@ class Email implements MessageInterface public function addrFormat(array $addr) : string { if (empty($addr[1])) { - return \trim(\str_replace(["\r", "\n"], '', $addr[0])); + return trim(str_replace(["\r", "\n"], '', $addr[0])); } - return $this->encodeHeader(\trim(\str_replace(["\r", "\n"], '', $addr[1])), 'phrase') . - ' <' . \trim(\str_replace(["\r", "\n"], '', $addr[0])) . '>'; + return $this->encodeHeader(trim(str_replace(["\r", "\n"], '', $addr[1])), 'phrase') . + ' <' . trim(str_replace(["\r", "\n"], '', $addr[0])) . '>'; } /** @@ -884,24 +884,24 @@ class Email implements MessageInterface return $address; } - $pos = \strrpos($address, '@'); - $domain = \substr($address, ++$pos); + $pos = strrpos($address, '@'); + $domain = substr($address, ++$pos); - if (!((bool) \preg_match('/[\x80-\xFF]/', $domain)) || !\mb_check_encoding($domain, $charset)) { + if (!((bool) preg_match('/[\x80-\xFF]/', $domain)) || !mb_check_encoding($domain, $charset)) { return $address; } - $domain = \mb_convert_encoding($domain, 'UTF-8', $charset); + $domain = mb_convert_encoding($domain, 'UTF-8', $charset); $errorcode = 0; if (\defined('INTL_IDNA_VARIANT_UTS46')) { - $punycode = \idn_to_ascii($domain, $errorcode, \INTL_IDNA_VARIANT_UTS46); + $punycode = idn_to_ascii($domain, $errorcode, \INTL_IDNA_VARIANT_UTS46); } else { - $punycode = \idn_to_ascii($domain, $errorcode); + $punycode = idn_to_ascii($domain, $errorcode); } if ($punycode !== false) { - return \substr($address, 0, $pos) . $punycode; + return substr($address, 0, $pos) . $punycode; } return $address; @@ -918,13 +918,13 @@ class Email implements MessageInterface { $len = 32; //32 bytes = 256 bits $bytes = ''; - $bytes = \random_bytes($len); + $bytes = random_bytes($len); if ($bytes === '') { - $bytes = \hash('sha256', \uniqid((string) \mt_rand(), true), true); // @codeCoverageIgnore + $bytes = hash('sha256', uniqid((string) mt_rand(), true), true); // @codeCoverageIgnore } - return \str_replace(['=', '+', '/'], '', \base64_encode(\hash('sha256', $bytes, true))); + return str_replace(['=', '+', '/'], '', base64_encode(hash('sha256', $bytes, true))); } /** @@ -953,7 +953,7 @@ class Email implements MessageInterface $bodyCharSet = $this->charset; // Can we do a 7-bit downgrade? - if ($bodyEncoding === EncodingType::E_8BIT && !((bool) \preg_match('/[\x80-\xFF]/', $this->body))) { + if ($bodyEncoding === EncodingType::E_8BIT && !((bool) preg_match('/[\x80-\xFF]/', $this->body))) { $bodyEncoding = EncodingType::E_7BIT; //All ISO 8859, Windows codepage and UTF-8 charsets are ascii compatible up to 7-bit @@ -963,7 +963,7 @@ class Email implements MessageInterface // If lines are too long, and we're not already using an encoding that will shorten them, // change to quoted-printable transfer encoding for the body part only if ($this->encoding !== EncodingType::E_BASE64 - && ((bool) \preg_match('/^(.{' . (self::MAX_LINE_LENGTH + \strlen(self::$LE)) . ',})/m', $this->body)) + && ((bool) preg_match('/^(.{' . (self::MAX_LINE_LENGTH + \strlen(self::$LE)) . ',})/m', $this->body)) ) { $bodyEncoding = EncodingType::E_QUOTED; } @@ -972,7 +972,7 @@ class Email implements MessageInterface $altBodyCharSet = $this->charset; //Can we do a 7-bit downgrade? - if ($altBodyEncoding === EncodingType::E_8BIT && !((bool) \preg_match('/[\x80-\xFF]/', $this->bodyAlt))) { + if ($altBodyEncoding === EncodingType::E_8BIT && !((bool) preg_match('/[\x80-\xFF]/', $this->bodyAlt))) { $altBodyEncoding = EncodingType::E_7BIT; //All ISO 8859, Windows codepage and UTF-8 charsets are ascii compatible up to 7-bit @@ -982,7 +982,7 @@ class Email implements MessageInterface //If lines are too long, and we're not already using an encoding that will shorten them, //change to quoted-printable transfer encoding for the alt body part only if ($altBodyEncoding !== EncodingType::E_BASE64 - && ((bool) \preg_match('/^(.{' . (self::MAX_LINE_LENGTH + \strlen(self::$LE)) . ',})/m', $this->bodyAlt)) + && ((bool) preg_match('/^(.{' . (self::MAX_LINE_LENGTH + \strlen(self::$LE)) . ',})/m', $this->bodyAlt)) ) { $altBodyEncoding = EncodingType::E_QUOTED; } @@ -1025,7 +1025,7 @@ class Email implements MessageInterface $methods = ICALMethodType::getConstants(); foreach ($methods as $imethod) { - if (\stripos($this->ical, 'METHOD:' . $imethod) !== false) { + if (stripos($this->ical, 'METHOD:' . $imethod) !== false) { $method = $imethod; break; } @@ -1065,7 +1065,7 @@ class Email implements MessageInterface $methods = ICALMethodType::getConstants(); foreach ($methods as $imethod) { - if (\stripos($this->ical, 'METHOD:' . $imethod) !== false) { + if (stripos($this->ical, 'METHOD:' . $imethod) !== false) { $method = $imethod; break; } @@ -1107,36 +1107,36 @@ class Email implements MessageInterface return ''; } - $file = \tempnam(\sys_get_temp_dir(), 'srcsign'); - $signed = \tempnam(\sys_get_temp_dir(), 'mailsign'); - \file_put_contents($file, $body); + $file = tempnam(sys_get_temp_dir(), 'srcsign'); + $signed = tempnam(sys_get_temp_dir(), 'mailsign'); + file_put_contents($file, $body); //Workaround for PHP bug https://bugs.php.net/bug.php?id=69197 $sign = empty($this->signExtracertFiles) - ? \openssl_pkcs7_sign($file, $signed, - 'file://' . \realpath($this->signCertFile), - ['file://' . \realpath($this->signKeyFile), $this->signKeyPass], + ? openssl_pkcs7_sign($file, $signed, + 'file://' . realpath($this->signCertFile), + ['file://' . realpath($this->signKeyFile), $this->signKeyPass], [] ) - : \openssl_pkcs7_sign($file, $signed, - 'file://' . \realpath($this->signCertFile), - ['file://' . \realpath($this->signKeyFile), $this->signKeyPass], + : openssl_pkcs7_sign($file, $signed, + 'file://' . realpath($this->signCertFile), + ['file://' . realpath($this->signKeyFile), $this->signKeyPass], [], \PKCS7_DETACHED, $this->signExtracertFiles ); - \unlink($file); + unlink($file); if ($sign === false) { - \unlink($signed); + unlink($signed); return ''; } - $body = \file_get_contents($signed); - \unlink($signed); + $body = file_get_contents($signed); + unlink($signed); //The message returned by openssl contains both headers and body, so need to split them up - $parts = \explode("\n\n", $body, 2); + $parts = explode("\n\n", $body, 2); $this->headerMime .= $parts[0] . self::$LE . self::$LE; $body = $parts[1]; } @@ -1172,7 +1172,7 @@ class Email implements MessageInterface } $result .= '--' . $boundary . self::$LE; - $result .= \sprintf('Content-Type: %s; charset=%s', $contentType, $charset); + $result .= sprintf('Content-Type: %s; charset=%s', $contentType, $charset); $result .= self::$LE; // RFC1341 part 5 says 7bit is assumed if not specified @@ -1209,7 +1209,7 @@ class Email implements MessageInterface $string = $bString ? $attachment[0] : ''; $path = !$bString ? $attachment[0] : ''; - $inclHash = \hash('sha256', \serialize($attachment)); + $inclHash = hash('sha256', serialize($attachment)); if (\in_array($inclHash, $incl, true)) { continue; } @@ -1226,40 +1226,40 @@ class Email implements MessageInterface } $cidUniq[$cid] = true; - $mime[] = \sprintf('--%s%s', $boundary, self::$LE); + $mime[] = sprintf('--%s%s', $boundary, self::$LE); //Only include a filename property if we have one $mime[] = !empty($name) - ? \sprintf('Content-Type: %s; name=%s%s', + ? sprintf('Content-Type: %s; name=%s%s', $type, - self::quotedString($this->encodeHeader(\trim(\str_replace(["\r", "\n"], '', $name)))), + self::quotedString($this->encodeHeader(trim(str_replace(["\r", "\n"], '', $name)))), self::$LE ) - : \sprintf('Content-Type: %s%s', + : sprintf('Content-Type: %s%s', $type, self::$LE ); // RFC1341 part 5 says 7bit is assumed if not specified if ($encoding !== EncodingType::E_7BIT) { - $mime[] = \sprintf('Content-Transfer-Encoding: %s%s', $encoding, self::$LE); + $mime[] = sprintf('Content-Transfer-Encoding: %s%s', $encoding, self::$LE); } //Only set Content-IDs on inline attachments if ((string) $cid !== '' && $disposition === 'inline') { - $mime[] = 'Content-ID: <' . $this->encodeHeader(\trim(\str_replace(["\r", "\n"], '', $cid))) . '>' . self::$LE; + $mime[] = 'Content-ID: <' . $this->encodeHeader(trim(str_replace(["\r", "\n"], '', $cid))) . '>' . self::$LE; } // Allow for bypassing the Content-Disposition header if (!empty($disposition)) { - $encodedName = $this->encodeHeader(\trim(\str_replace(["\r", "\n"], '', $name))); + $encodedName = $this->encodeHeader(trim(str_replace(["\r", "\n"], '', $name))); $mime[] = !empty($encodedName) - ? \sprintf('Content-Disposition: %s; filename=%s%s', + ? sprintf('Content-Disposition: %s; filename=%s%s', $disposition, self::quotedString($encodedName), self::$LE . self::$LE ) - : \sprintf('Content-Disposition: %s%s', $disposition, self::$LE . self::$LE); + : sprintf('Content-Disposition: %s%s', $disposition, self::$LE . self::$LE); } else { $mime[] = self::$LE; } @@ -1272,9 +1272,9 @@ class Email implements MessageInterface $mime[] = self::$LE; } - $mime[] = \sprintf('--%s--%s', $boundary, self::$LE); + $mime[] = sprintf('--%s--%s', $boundary, self::$LE); - return \implode('', $mime); + return implode('', $mime); } /** @@ -1289,8 +1289,8 @@ class Email implements MessageInterface */ private static function quotedString(string $str) : string { - if (\preg_match('/[ ()<>@,;:"\/\[\]?=]/', $str)) { - return '"' . \str_replace('"', '\\"', $str) . '"'; + if (preg_match('/[ ()<>@,;:"\/\[\]?=]/', $str)) { + return '"' . str_replace('"', '\\"', $str) . '"'; } return $str; @@ -1312,7 +1312,7 @@ class Email implements MessageInterface return ''; } - $fileBuffer = \file_get_contents($path); + $fileBuffer = file_get_contents($path); if ($fileBuffer === false) { return ''; } @@ -1335,14 +1335,14 @@ class Email implements MessageInterface private function encodeString(string $str, string $encoding = EncodingType::E_BASE64) : string { $encoded = ''; - switch (\strtolower($encoding)) { + switch (strtolower($encoding)) { case EncodingType::E_BASE64: - $encoded = \chunk_split(\base64_encode($str), self::STD_LINE_LENGTH, self::$LE); + $encoded = chunk_split(base64_encode($str), self::STD_LINE_LENGTH, self::$LE); break; case EncodingType::E_7BIT: case EncodingType::E_8BIT: $encoded = self::normalizeBreaks($str, self::$LE); - if (\substr($encoded, -(\strlen(self::$LE))) !== self::$LE) { + if (substr($encoded, -(\strlen(self::$LE))) !== self::$LE) { $encoded .= self::$LE; } @@ -1351,7 +1351,7 @@ class Email implements MessageInterface $encoded = $str; break; case EncodingType::E_QUOTED: - $encoded = self::normalizeBreaks(\quoted_printable_encode($str), self::$LE); + $encoded = self::normalizeBreaks(quoted_printable_encode($str), self::$LE); break; default: return ''; @@ -1382,7 +1382,7 @@ class Email implements MessageInterface $type[] = 'attach'; } - $this->messageType = \implode('_', $type); + $this->messageType = implode('_', $type); if ($this->messageType === '') { $this->messageType = 'plain'; } @@ -1441,7 +1441,7 @@ class Email implements MessageInterface $addresses[] = $this->addrFormat($address); } - return $type . ': ' . \implode(', ', $addresses) . static::$LE; + return $type . ': ' . implode(', ', $addresses) . static::$LE; } /** @@ -1484,26 +1484,26 @@ class Email implements MessageInterface */ private function wrapText(string $message, int $length, bool $qpMode = false) : string { - $softBreak = $qpMode ? \sprintf(' =%s', self::$LE) : self::$LE; + $softBreak = $qpMode ? sprintf(' =%s', self::$LE) : self::$LE; // Don't split multibyte characters - $isUtf8 = \strtolower($this->charset) === CharsetType::UTF_8; + $isUtf8 = strtolower($this->charset) === CharsetType::UTF_8; $leLen = \strlen(self::$LE); $crlfLen = \strlen(self::$LE); $message = self::normalizeBreaks($message, self::$LE); //Remove a trailing line break - if (\substr($message, -$leLen) === self::$LE) { - $message = \substr($message, 0, -$leLen); + if (substr($message, -$leLen) === self::$LE) { + $message = substr($message, 0, -$leLen); } //Split message into lines - $lines = \explode(self::$LE, $message); + $lines = explode(self::$LE, $message); $message = ''; foreach ($lines as $line) { - $words = \explode(' ', $line); + $words = explode(' ', $line); $buf = ''; $firstword = true; @@ -1516,16 +1516,16 @@ class Email implements MessageInterface $len = $spaceLeft; if ($isUtf8) { $len = MbStringUtils::utf8CharBoundary($word, $len); - } elseif ('=' === \substr($word, $len - 1, 1)) { + } elseif (substr($word, $len - 1, 1) === '=') { --$len; - } elseif ('=' === \substr($word, $len - 2, 1)) { + } elseif (substr($word, $len - 2, 1) === '=') { $len -= 2; } - $part = \substr($word, 0, $len); - $word = \substr($word, $len); + $part = substr($word, 0, $len); + $word = substr($word, $len); $buf .= ' ' . $part; - $message .= $buf . \sprintf('=%s', self::$LE); + $message .= $buf . sprintf('=%s', self::$LE); } else { $message .= $buf . $softBreak; } @@ -1541,17 +1541,17 @@ class Email implements MessageInterface $len = $length; if ($isUtf8) { $len = MbStringUtils::utf8CharBoundary($word, $len); - } elseif (\substr($word, $len - 1, 1) === '=') { + } elseif (substr($word, $len - 1, 1) === '=') { --$len; - } elseif (\substr($word, $len - 2, 1) === '=') { + } elseif (substr($word, $len - 2, 1) === '=') { $len -= 2; } - $part = \substr($word, 0, $len); - $word = (string) \substr($word, $len); + $part = substr($word, 0, $len); + $word = (string) substr($word, $len); if ($word !== '') { - $message .= $part . \sprintf('=%s', self::$LE); + $message .= $part . sprintf('=%s', self::$LE); } else { $buf = $part; } @@ -1563,7 +1563,7 @@ class Email implements MessageInterface } $buf .= $word; - if ('' !== $bufO && \strlen($buf) > $length) { + if ($bufO !== '' && \strlen($buf) > $length) { $message .= $bufO . $softBreak; $buf = $word; } @@ -1592,28 +1592,28 @@ class Email implements MessageInterface public function encodeHeader(string $str, string $position = 'text') : string { $matchcount = 0; - switch (\strtolower($position)) { + switch (strtolower($position)) { case 'phrase': - if (!\preg_match('/[\200-\377]/', $str)) { - $encoded = \addcslashes($str, "\0..\37\177\\\""); + if (!preg_match('/[\200-\377]/', $str)) { + $encoded = addcslashes($str, "\0..\37\177\\\""); - return $str === $encoded && !\preg_match('/[^A-Za-z0-9!#$%&\'*+\/=?^_`{|}~ -]/', $str) + return $str === $encoded && !preg_match('/[^A-Za-z0-9!#$%&\'*+\/=?^_`{|}~ -]/', $str) ? $encoded : "\"${encoded}\""; } - $matchcount = \preg_match_all('/[^\040\041\043-\133\135-\176]/', $str, $matches); + $matchcount = preg_match_all('/[^\040\041\043-\133\135-\176]/', $str, $matches); break; /* @noinspection PhpMissingBreakStatementInspection */ case 'comment': - $matchcount = \preg_match_all('/[()"]/', $str, $matches); + $matchcount = preg_match_all('/[()"]/', $str, $matches); case 'text': default: - $matchcount += \preg_match_all('/[\000-\010\013\014\016-\037\177-\377]/', $str, $matches); + $matchcount += preg_match_all('/[\000-\010\013\014\016-\037\177-\377]/', $str, $matches); break; } - $charset = ((bool) \preg_match('/[\x80-\xFF]/', $str)) ? $this->charset : CharsetType::ASCII; + $charset = ((bool) preg_match('/[\x80-\xFF]/', $str)) ? $this->charset : CharsetType::ASCII; // Q/B encoding adds 8 chars and the charset ("` =??[QB]??=`"). $overhead = 8 + \strlen($charset); @@ -1638,26 +1638,26 @@ class Email implements MessageInterface switch ($encoding) { case 'B': - if (\strlen($str) > \mb_strlen($str, $this->charset)) { + if (\strlen($str) > mb_strlen($str, $this->charset)) { $encoded = $this->base64EncodeWrapMB($str, "\n"); } else { - $encoded = \base64_encode($str); + $encoded = base64_encode($str); $maxLen -= $maxLen % 4; - $encoded = \trim(\chunk_split($encoded, $maxLen, "\n")); + $encoded = trim(chunk_split($encoded, $maxLen, "\n")); } - $encoded = \preg_replace('/^(.*)$/m', ' =?' . $charset . "?${encoding}?\\1?=", $encoded); + $encoded = preg_replace('/^(.*)$/m', ' =?' . $charset . "?${encoding}?\\1?=", $encoded); break; case 'Q': $encoded = $this->encodeQ($str, $position); $encoded = $this->wrapText($encoded, $maxLen, true); - $encoded = \str_replace('=' . self::$LE, "\n", \trim($encoded)); - $encoded = \preg_replace('/^(.*)$/m', ' =?' . $charset . "?${encoding}?\\1?=", $encoded); + $encoded = str_replace('=' . self::$LE, "\n", trim($encoded)); + $encoded = preg_replace('/^(.*)$/m', ' =?' . $charset . "?${encoding}?\\1?=", $encoded); break; default: return $str; } - return \trim(self::normalizeBreaks($encoded, self::$LE)); + return trim(self::normalizeBreaks($encoded, self::$LE)); } /** @@ -1673,9 +1673,9 @@ class Email implements MessageInterface private function encodeQ(string $str, string $position = 'text') : string { $pattern = ''; - $encoded = \str_replace(["\r", "\n"], '', $str); + $encoded = str_replace(["\r", "\n"], '', $str); - switch (\strtolower($position)) { + switch (strtolower($position)) { case 'phrase': $pattern = '^A-Za-z0-9!*+\/ -'; break; @@ -1688,27 +1688,27 @@ class Email implements MessageInterface break; } - if (\preg_match_all("/[{$pattern}]/", $encoded, $matches) !== false) { - return \str_replace(' ', '_', $encoded); + if (preg_match_all("/[{$pattern}]/", $encoded, $matches) !== false) { + return str_replace(' ', '_', $encoded); } $matches = []; // If the string contains an '=', make sure it's the first thing we replace // so as to avoid double-encoding - $eqkey = \array_search('=', $matches[0], true); - if (false !== $eqkey) { + $eqkey = array_search('=', $matches[0], true); + if ($eqkey !== false) { unset($matches[0][$eqkey]); - \array_unshift($matches[0], '='); + array_unshift($matches[0], '='); } - $unique = \array_unique($matches[0]); + $unique = array_unique($matches[0]); foreach ($unique as $char) { - $encoded = \str_replace($char, '=' . \sprintf('%02X', \ord($char)), $encoded); + $encoded = str_replace($char, '=' . sprintf('%02X', \ord($char)), $encoded); } // Replace spaces with _ (more readable than =20) // RFC 2047 section 4.2(2) - return \str_replace(' ', '_', $encoded); + return str_replace(' ', '_', $encoded); } /** @@ -1727,10 +1727,10 @@ class Email implements MessageInterface $end = '?='; $encoded = ''; - $mbLength = \mb_strlen($str, $this->charset); + $mbLength = mb_strlen($str, $this->charset); $length = 75 - \strlen($start) - \strlen($end); $ratio = $mbLength / \strlen($str); - $avgLength = \floor($length * $ratio * .75); + $avgLength = floor($length * $ratio * .75); $offset = 0; for ($i = 0; $i < $mbLength; $i += $offset) { @@ -1738,15 +1738,15 @@ class Email implements MessageInterface do { $offset = $avgLength - $lookBack; - $chunk = \mb_substr($str, $i, $offset, $this->charset); - $chunk = \base64_encode($chunk); + $chunk = mb_substr($str, $i, $offset, $this->charset); + $chunk = base64_encode($chunk); ++$lookBack; } while (\strlen($chunk) > $length); $encoded .= $chunk . $linebreak; } - return \substr($encoded, 0, -\strlen($linebreak)); + return substr($encoded, 0, -\strlen($linebreak)); } /** @@ -1973,10 +1973,10 @@ class Email implements MessageInterface */ public function addCustomHeader(string $name, string $value = null) : bool { - $name = \trim($name); - $value = \trim($value); + $name = trim($name); + $value = trim($value); - if (empty($name) || \strpbrk($name . $value, "\r\n") !== false) { + if (empty($name) || strpbrk($name . $value, "\r\n") !== false) { return false; } @@ -2017,54 +2017,54 @@ class Email implements MessageInterface */ public function msgHTML(string $message, string $basedir = '', \Closure $advanced = null) { - \preg_match_all('/(? 1 && \substr($basedir, -1) !== '/') { + if (\strlen($basedir) > 1 && substr($basedir, -1) !== '/') { $basedir .= '/'; } foreach ($images[2] as $imgindex => $url) { // Convert data URIs into embedded images $match = []; - if (\preg_match('#^data:(image/(?:jpe?g|gif|png));?(base64)?,(.+)#', $url, $match)) { - if (\count($match) === 4 && EncodingType::E_BASE64 === $match[2]) { - $data = \base64_decode($match[3]); - } elseif ('' === $match[2]) { - $data = \rawurldecode($match[3]); + if (preg_match('#^data:(image/(?:jpe?g|gif|png));?(base64)?,(.+)#', $url, $match)) { + if (\count($match) === 4 && $match[2] === EncodingType::E_BASE64) { + $data = base64_decode($match[3]); + } elseif ($match[2] === '') { + $data = rawurldecode($match[3]); } else { continue; } - $cid = \substr(\hash('sha256', $data), 0, 32) . '@phpoms.0'; // RFC2392 S 2 + $cid = substr(hash('sha256', $data), 0, 32) . '@phpoms.0'; // RFC2392 S 2 if (!$this->cidExists($cid)) { $this->addStringEmbeddedImage($data, $cid, 'embed' . $imgindex, EncodingType::E_BASE64, $match[1]); } - $message = \str_replace($images[0][$imgindex], $images[1][$imgindex] . '="cid:' . $cid . '"', $message); + $message = str_replace($images[0][$imgindex], $images[1][$imgindex] . '="cid:' . $cid . '"', $message); continue; } if (!empty($basedir) - && (\strpos($url, '..') === false) - && \strpos($url, 'cid:') !== 0 - && !\preg_match('#^[a-z][a-z0-9+.-]*:?//#i', $url) + && (strpos($url, '..') === false) + && strpos($url, 'cid:') !== 0 + && !preg_match('#^[a-z][a-z0-9+.-]*:?//#i', $url) ) { $filename = FileUtils::mb_pathinfo($url, \PATHINFO_BASENAME); $directory = \dirname($url); - if ('.' === $directory) { + if ($directory === '.') { $directory = ''; } // RFC2392 S 2 - $cid = \substr(\hash('sha256', $url), 0, 32) . '@phpoms.0'; - if (\strlen($basedir) > 1 && '/' !== \substr($basedir, -1)) { + $cid = substr(hash('sha256', $url), 0, 32) . '@phpoms.0'; + if (\strlen($basedir) > 1 && substr($basedir, -1) !== '/') { $basedir .= '/'; } - if (\strlen($directory) > 1 && '/' !== \substr($directory, -1)) { + if (\strlen($directory) > 1 && substr($directory, -1) !== '/') { $directory .= '/'; } @@ -2076,8 +2076,8 @@ class Email implements MessageInterface MimeType::extensionToMime((string) FileUtils::mb_pathinfo($filename, \PATHINFO_EXTENSION)) ) ) { - $message = \preg_replace( - '/' . $images[1][$imgindex] . '=["\']' . \preg_quote($url, '/') . '["\']/Ui', + $message = preg_replace( + '/' . $images[1][$imgindex] . '=["\']' . preg_quote($url, '/') . '["\']/Ui', $images[1][$imgindex] . '="cid:' . $cid . '"', $message ); @@ -2110,10 +2110,10 @@ class Email implements MessageInterface */ private static function normalizeBreaks(string $text, string $breaktype) : string { - $text = \str_replace(["\r\n", "\r"], "\n", $text); + $text = str_replace(["\r\n", "\r"], "\n", $text); if ($breaktype !== "\n") { - $text = \str_replace("\n", $breaktype, $text); + $text = str_replace("\n", $breaktype, $text); } return $text; @@ -2135,8 +2135,8 @@ class Email implements MessageInterface return $advanced($html); } - return \html_entity_decode( - \trim(\strip_tags(\preg_replace('/<(head|title|style|script)[^>]*>.*?<\/\\1>/si', '', $html))), + return html_entity_decode( + trim(strip_tags(preg_replace('/<(head|title|style|script)[^>]*>.*?<\/\\1>/si', '', $html))), \ENT_QUOTES, $this->charset ); @@ -2178,9 +2178,9 @@ class Email implements MessageInterface for ($i = 0; $i < $len; ++$i) { $ord = \ord($txt[$i]); - $line .= ((0x21 <= $ord) && ($ord <= 0x3A)) || $ord === 0x3C || ((0x3E <= $ord) && ($ord <= 0x7E)) + $line .= (($ord >= 0x21) && ($ord <= 0x3A)) || $ord === 0x3C || (($ord >= 0x3E) && ($ord <= 0x7E)) ? $txt[$i] - : '=' . \sprintf('%02X', $ord); + : '=' . sprintf('%02X', $ord); } return $line; @@ -2203,14 +2203,14 @@ class Email implements MessageInterface $privKeyStr = !empty($this->dkimPrivateKey) ? $this->dkimPrivateKey - : \file_get_contents($this->dkimPrivatePath); + : file_get_contents($this->dkimPrivatePath); $privKey = $this->dkimPass !== '' - ? \openssl_pkey_get_private($privKeyStr, $this->dkimPass) - : \openssl_pkey_get_private($privKeyStr); + ? openssl_pkey_get_private($privKeyStr, $this->dkimPass) + : openssl_pkey_get_private($privKeyStr); - if (\openssl_sign($signHeader, $signature, $privKey, 'sha256WithRSAEncryption')) { - return \base64_encode($signature); + if (openssl_sign($signHeader, $signature, $privKey, 'sha256WithRSAEncryption')) { + return base64_encode($signature); } return ''; @@ -2228,22 +2228,22 @@ class Email implements MessageInterface public function dkimHeaderC(string $signHeader) : string { $signHeader = self::normalizeBreaks($signHeader, "\r\n"); - $signHeader = \preg_replace('/\r\n[ \t]+/', ' ', $signHeader); - $lines = \explode("\r\n", $signHeader); + $signHeader = preg_replace('/\r\n[ \t]+/', ' ', $signHeader); + $lines = explode("\r\n", $signHeader); foreach ($lines as $key => $line) { - if (\strpos($line, ':') === false) { + if (strpos($line, ':') === false) { continue; } - list($heading, $value) = \explode(':', $line, 2); - $heading = \strtolower($heading); - $value = \preg_replace('/[ \t]+/', ' ', $value); + list($heading, $value) = explode(':', $line, 2); + $heading = strtolower($heading); + $value = preg_replace('/[ \t]+/', ' ', $value); - $lines[$key] = \trim($heading, " \t") . ':' . \trim($value, " \t"); + $lines[$key] = trim($heading, " \t") . ':' . trim($value, " \t"); } - return \implode("\r\n", $lines); + return implode("\r\n", $lines); } /** @@ -2263,7 +2263,7 @@ class Email implements MessageInterface $body = self::normalizeBreaks($body, "\r\n"); - return \rtrim($body, " \r\n\t") . "\r\n"; + return rtrim($body, " \r\n\t") . "\r\n"; } /** @@ -2282,7 +2282,7 @@ class Email implements MessageInterface $DKIMsignatureType = 'rsa-sha256'; $DKIMcanonicalization = 'relaxed/simple'; $DKIMquery = 'dns/txt'; - $DKIMtime = \time(); + $DKIMtime = time(); $autoSignHeaders = [ 'from', @@ -2297,11 +2297,11 @@ class Email implements MessageInterface 'x-mailer', ]; - if (\stripos($headersLine, 'Subject') === false) { + if (stripos($headersLine, 'Subject') === false) { $headersLine .= 'Subject: ' . $subject . self::$LE; } - $headerLines = \explode(self::$LE, $headersLine); + $headerLines = explode(self::$LE, $headersLine); $currentHeaderLabel = ''; $currentHeaderValue = ''; $parsedHeaders = []; @@ -2310,14 +2310,14 @@ class Email implements MessageInterface foreach ($headerLines as $headerLine) { $matches = []; - if (\preg_match('/^([^ \t]*?)(?::[ \t]*)(.*)$/', $headerLine, $matches)) { + if (preg_match('/^([^ \t]*?)(?::[ \t]*)(.*)$/', $headerLine, $matches)) { if ($currentHeaderLabel !== '') { $parsedHeaders[] = ['label' => $currentHeaderLabel, 'value' => $currentHeaderValue]; } $currentHeaderLabel = $matches[1]; $currentHeaderValue = $matches[2]; - } elseif (\preg_match('/^[ \t]+(.*)$/', $headerLine, $matches)) { + } elseif (preg_match('/^[ \t]+(.*)$/', $headerLine, $matches)) { $currentHeaderValue .= ' ' . $matches[1]; } @@ -2333,13 +2333,13 @@ class Email implements MessageInterface $headersToSign = []; foreach ($parsedHeaders as $header) { - if (\in_array(\strtolower($header['label']), $autoSignHeaders, true)) { + if (\in_array(strtolower($header['label']), $autoSignHeaders, true)) { $headersToSignKeys[] = $header['label']; $headersToSign[] = $header['label'] . ': ' . $header['value']; if ($this->dkimCopyHeader) { $copiedHeaders[] = $header['label'] . ':' - . \str_replace('|', '=7C', $this->dkimQP($header['value'])); + . str_replace('|', '=7C', $this->dkimQP($header['value'])); } continue; @@ -2353,7 +2353,7 @@ class Email implements MessageInterface if ($this->dkimCopyHeader) { $copiedHeaders[] = $header['label'] . ':' - . \str_replace('|', '=7C', $this->dkimQP($header['value'])); + . str_replace('|', '=7C', $this->dkimQP($header['value'])); } continue 2; @@ -2373,8 +2373,8 @@ class Email implements MessageInterface } $copiedHeaderFields .= \strlen($copiedHeader) > self::STD_LINE_LENGTH - 3 - ? \substr( - \chunk_split($copiedHeader, self::STD_LINE_LENGTH - 3, self::$LE . self::FWS), + ? substr( + chunk_split($copiedHeader, self::STD_LINE_LENGTH - 3, self::$LE . self::FWS), 0, -\strlen(self::$LE . self::FWS) ) @@ -2386,10 +2386,10 @@ class Email implements MessageInterface $copiedHeaderFields .= ';' . self::$LE; } - $headerKeys = ' h=' . \implode(':', $headersToSignKeys) . ';' . self::$LE; - $headerValues = \implode(self::$LE, $headersToSign); + $headerKeys = ' h=' . implode(':', $headersToSignKeys) . ';' . self::$LE; + $headerValues = implode(self::$LE, $headersToSign); $body = $this->dkimBodyC($body); - $DKIMb64 = \base64_encode(\pack('H*', \hash('sha256', $body))); + $DKIMb64 = base64_encode(pack('H*', hash('sha256', $body))); $ident = ''; if ($this->dkimIdentity !== '') { @@ -2412,7 +2412,7 @@ class Email implements MessageInterface ); $signature = $this->dkimSign($canonicalizedHeaders); - $signature = \trim(\chunk_split($signature, self::STD_LINE_LENGTH - 3, self::$LE . self::FWS)); + $signature = trim(chunk_split($signature, self::STD_LINE_LENGTH - 3, self::$LE . self::FWS)); return self::normalizeBreaks($dkimSignatureHeader . $signature, self::$LE); } diff --git a/Message/Mail/Imap.php b/Message/Mail/Imap.php index 6dd7368d3..f8d3125b6 100644 --- a/Message/Mail/Imap.php +++ b/Message/Mail/Imap.php @@ -44,7 +44,7 @@ class Imap extends MailHandler implements MailBoxInterface */ public function connectInbox() : bool { - $this->mailbox = ($tmp = \imap_open( + $this->mailbox = ($tmp = imap_open( '{' . $this->host . ':' . $this->port . '/imap' . ($this->encryption !== EncryptionType::NONE ? '/ssl' : '') @@ -55,13 +55,13 @@ class Imap extends MailHandler implements MailBoxInterface public function getBoxes() : array { - $list = \imap_list($this->mailbox, '{' . $this->host . ':' . $this->port . '}'); + $list = imap_list($this->mailbox, '{' . $this->host . ':' . $this->port . '}'); if (!\is_array($list)) { return []; } foreach ($list as $key => $value) { - $list[$key] = \imap_utf7_decode($value); + $list[$key] = imap_utf7_decode($value); } return $list; @@ -69,77 +69,77 @@ class Imap extends MailHandler implements MailBoxInterface public function renameBox(string $old, string $new) : bool { - return \imap_renamemailbox($this->mailbox, $old, \imap_utf7_encode($new)); + return imap_renamemailbox($this->mailbox, $old, imap_utf7_encode($new)); } public function deleteBox(string $box) : bool { - return \imap_deletemailbox($this->mailbox, $box); + return imap_deletemailbox($this->mailbox, $box); } public function createBox(string $box) : bool { - return \imap_createmailbox($this->mailbox, \imap_utf7_encode($box)); + return imap_createmailbox($this->mailbox, imap_utf7_encode($box)); } public function countMail(string $box) : int { if ($this->box !== $box) { - \imap_reopen($this->box, $box); + imap_reopen($this->box, $box); $this->box = $box; } - return \imap_num_msg($this->mailbox); + return imap_num_msg($this->mailbox); } public function getMailboxInfo(string $box) : object { if ($this->box !== $box) { - \imap_reopen($this->box, $box); + imap_reopen($this->box, $box); $this->box = $box; } - return \imap_status($this->mailbox); + return imap_status($this->mailbox); } public function getRecentCount(string $box) : int { if ($this->box !== $box) { - \imap_reopen($this->box, $box); + imap_reopen($this->box, $box); $this->box = $box; } - return \imap_num_recent($this->mailbox); + return imap_num_recent($this->mailbox); } public function copyMail(string | array $messages, string $box) : bool { - return \imap_mail_copy($this->mailbox, !\is_string($messages) ? \implode(',', $messages) : $messages, $box); + return imap_mail_copy($this->mailbox, !\is_string($messages) ? implode(',', $messages) : $messages, $box); } public function moveMail(string | array $messages, string $box) : bool { - return \imap_mail_copy($this->mailbox, !\is_string($messages) ? \implode(',', $messages) : $messages, $box); + return imap_mail_copy($this->mailbox, !\is_string($messages) ? implode(',', $messages) : $messages, $box); } public function deleteMail(int $msg) : bool { - return \imap_delete($this->mailbox, $msg); + return imap_delete($this->mailbox, $msg); } public function getHeaders(string $box) : array { if ($this->box !== $box) { - \imap_reopen($this->box, $box); + imap_reopen($this->box, $box); $this->box = $box; } - return \imap_headers($this->mailbox); + return imap_headers($this->mailbox); } public function getHeaderInfo(int $msg) : object { - return \imap_headerinfo($this->mailbox, $msg); + return imap_headerinfo($this->mailbox, $msg); } public function getMail(int $msg) : Email @@ -157,7 +157,7 @@ class Imap extends MailHandler implements MailBoxInterface public function inboxClose() : void { if ($this->mailbox !== null) { - \imap_close($this->mailbox); + imap_close($this->mailbox); } } } diff --git a/Message/Mail/MailHandler.php b/Message/Mail/MailHandler.php index f7d875721..755f11812 100644 --- a/Message/Mail/MailHandler.php +++ b/Message/Mail/MailHandler.php @@ -39,7 +39,7 @@ class MailHandler * @var int * @since 1.0.0 */ - const MAX_LINE_LENGTH = 998; + public const MAX_LINE_LENGTH = 998; /** * Mailer for sending message @@ -268,12 +268,12 @@ class MailHandler case SubmitType::SMTP: return; case SubmitType::SENDMAIL: - $this->mailerTool = \stripos($sendmailPath = \ini_get('sendmail_path'), 'sendmail') === false + $this->mailerTool = stripos($sendmailPath = ini_get('sendmail_path'), 'sendmail') === false ? '/usr/sbin/sendmail' : $sendmailPath; return; case SubmitType::QMAIL: - $this->mailerTool = \stripos($sendmailPath = \ini_get('sendmail_path'), 'qmail') === false + $this->mailerTool = stripos($sendmailPath = ini_get('sendmail_path'), 'qmail') === false ? '/var/qmail/bin/qmail-inject' : $sendmailPath; return; @@ -335,7 +335,7 @@ class MailHandler */ protected function sendmailSend(Email $mail) : bool { - $header = \rtrim($mail->headerMime, " \r\n\t") . self::$LE . self::$LE; + $header = rtrim($mail->headerMime, " \r\n\t") . self::$LE . self::$LE; // CVE-2016-10033, CVE-2016-10045: Don't pass -f if characters will be escaped. if (!empty($mail->sender) && StringUtils::isShellSafe($mail->sender)) { @@ -348,17 +348,17 @@ class MailHandler $mailerToolFmt = '%s -oi -t'; } - $mailerTool = \sprintf($mailerToolFmt, \escapeshellcmd($this->mailerTool), $mail->sender); + $mailerTool = sprintf($mailerToolFmt, escapeshellcmd($this->mailerTool), $mail->sender); - $con = \popen($mailerTool, 'w'); + $con = popen($mailerTool, 'w'); if ($con === false) { return false; } - \fwrite($con, $header); - \fwrite($con, $mail->bodyMime); + fwrite($con, $header); + fwrite($con, $mail->bodyMime); - $result = \pclose($con); + $result = pclose($con); return $result === 0; } @@ -374,14 +374,14 @@ class MailHandler */ protected function mailSend(Email $mail) : bool { - $header = \rtrim($mail->headerMime, " \r\n\t") . self::$LE . self::$LE; + $header = rtrim($mail->headerMime, " \r\n\t") . self::$LE . self::$LE; $toArr = []; foreach ($mail->to as $toaddr) { $toArr[] = $mail->addrFormat($toaddr); } - $to = \implode(', ', $toArr); + $to = implode(', ', $toArr); //This sets the SMTP envelope sender which gets turned into a return-path header by the receiver // CVE-2016-10033, CVE-2016-10045: Don't pass -f if characters will be escaped. @@ -390,18 +390,18 @@ class MailHandler && EmailValidator::isValid($mail->sender) && StringUtils::isShellSafe($mail->sender) ) { - $params = \sprintf('-f%s', $mail->sender); + $params = sprintf('-f%s', $mail->sender); } if (!empty($mail->sender) && EmailValidator::isValid($mail->sender)) { - $oldFrom = \ini_get('sendmail_from'); - \ini_set('sendmail_from', $mail->sender); + $oldFrom = ini_get('sendmail_from'); + ini_set('sendmail_from', $mail->sender); } $result = $this->mailPassthru($to, $mail, $header, $params); if (isset($oldFrom)) { - \ini_set('sendmail_from', $oldFrom); + ini_set('sendmail_from', $oldFrom); } return $result; @@ -422,11 +422,11 @@ class MailHandler */ private function mailPassthru(string $to, Email $mail, string $header, string $params = null) : bool { - $subject = $mail->encodeHeader(\trim(\str_replace(["\r", "\n"], '', $mail->subject))); + $subject = $mail->encodeHeader(trim(str_replace(["\r", "\n"], '', $mail->subject))); return !$this->useMailOptions || $params === null - ? \mail($to, $subject, $mail->body, $header) - : \mail($to, $subject, $mail->body, $header, $params); + ? mail($to, $subject, $mail->body, $header) + : mail($to, $subject, $mail->body, $header, $params); } /** @@ -440,7 +440,7 @@ class MailHandler */ protected function smtpSend(Email $mail) : bool { - $header = \rtrim($mail->headerMime, " \r\n\t") . self::$LE . self::$LE; + $header = rtrim($mail->headerMime, " \r\n\t") . self::$LE . self::$LE; if (!$this->smtpConnect($this->smtpOptions)) { return false; @@ -504,12 +504,12 @@ class MailHandler $this->smtp->timeout = $this->timeout; $this->smtp->doVerp = $this->useVerp; - $hosts = \explode(';', $this->host); + $hosts = explode(';', $this->host); foreach ($hosts as $hostentry) { $hostinfo = []; - if (!\preg_match( + if (!preg_match( '/^(?:(ssl|tls):\/\/)?(.+?)(?::(\d+))?$/', - \trim($hostentry), + trim($hostentry), $hostinfo ) ) { @@ -534,7 +534,7 @@ class MailHandler $prefix = 'ssl://'; $tls = false; $secure = EncryptionType::SMTPS; - } elseif ('tls' === $hostinfo[1]) { + } elseif ($hostinfo[1] === 'tls') { $tls = true; $secure = EncryptionType::TLS; } @@ -551,7 +551,7 @@ class MailHandler $port = $this->port; if (isset($hostinfo[3]) - && \is_numeric($hostinfo[3]) + && is_numeric($hostinfo[3]) && $hostinfo[3] > 0 && $hostinfo[3] < 65536 ) { $port = (int) $hostinfo[3]; @@ -561,7 +561,7 @@ class MailHandler $hello = !empty($this->helo) ? $this->helo : SystemUtils::getHostname(); $this->smtp->hello($hello); - $tls = $this->useAutoTLS && $sslExt && 'ssl' !== $secure && $this->smtp->getServerExt('STARTTLS') + $tls = $this->useAutoTLS && $sslExt && $secure !== 'ssl' && $this->smtp->getServerExt('STARTTLS') ? true : $tls; $this->smtp->hello($hello); diff --git a/Message/Mail/Pop3.php b/Message/Mail/Pop3.php index 0647de90c..558883e36 100644 --- a/Message/Mail/Pop3.php +++ b/Message/Mail/Pop3.php @@ -52,7 +52,7 @@ class Pop3 extends MailHandler implements MailBoxInterface */ public function connectInbox() : bool { - $this->mailbox = ($tmp = \imap_open( + $this->mailbox = ($tmp = imap_open( '{' . $this->host . ':' . $this->port . '/pop3' . ($this->encryption !== EncryptionType::NONE ? '/ssl' : '') @@ -63,13 +63,13 @@ class Pop3 extends MailHandler implements MailBoxInterface public function getBoxes() : array { - $list = \imap_list($this->mailbox, '{' . $this->host . ':' . $this->port . '}'); + $list = imap_list($this->mailbox, '{' . $this->host . ':' . $this->port . '}'); if (!\is_array($list)) { return []; } foreach ($list as $key => $value) { - $list[$key] = \imap_utf7_decode($value); + $list[$key] = imap_utf7_decode($value); } return $list; @@ -77,77 +77,77 @@ class Pop3 extends MailHandler implements MailBoxInterface public function renameBox(string $old, string $new) : bool { - return \imap_renamemailbox($this->mailbox, $old, \imap_utf7_encode($new)); + return imap_renamemailbox($this->mailbox, $old, imap_utf7_encode($new)); } public function deleteBox(string $box) : bool { - return \imap_deletemailbox($this->mailbox, $box); + return imap_deletemailbox($this->mailbox, $box); } public function createBox(string $box) : bool { - return \imap_createmailbox($this->mailbox, \imap_utf7_encode($box)); + return imap_createmailbox($this->mailbox, imap_utf7_encode($box)); } public function countMail(string $box) : int { if ($this->box !== $box) { - \imap_reopen($this->box, $box); + imap_reopen($this->box, $box); $this->box = $box; } - return \imap_num_msg($this->mailbox); + return imap_num_msg($this->mailbox); } public function getMailboxInfo(string $box) : object { if ($this->box !== $box) { - \imap_reopen($this->box, $box); + imap_reopen($this->box, $box); $this->box = $box; } - return \imap_status($this->mailbox); + return imap_status($this->mailbox); } public function getRecentCount(string $box) : int { if ($this->box !== $box) { - \imap_reopen($this->box, $box); + imap_reopen($this->box, $box); $this->box = $box; } - return \imap_num_recent($this->mailbox); + return imap_num_recent($this->mailbox); } public function copyMail(string | array $messages, string $box) : bool { - return \imap_mail_copy($this->mailbox, !\is_string($messages) ? \implode(',', $messages) : $messages, $box); + return imap_mail_copy($this->mailbox, !\is_string($messages) ? implode(',', $messages) : $messages, $box); } public function moveMail(string | array $messages, string $box) : bool { - return \imap_mail_copy($this->mailbox, !\is_string($messages) ? \implode(',', $messages) : $messages, $box); + return imap_mail_copy($this->mailbox, !\is_string($messages) ? implode(',', $messages) : $messages, $box); } public function deleteMail(int $msg) : bool { - return \imap_delete($this->mailbox, $msg); + return imap_delete($this->mailbox, $msg); } public function getHeaders(string $box) : array { if ($this->box !== $box) { - \imap_reopen($this->box, $box); + imap_reopen($this->box, $box); $this->box = $box; } - return \imap_headers($this->mailbox); + return imap_headers($this->mailbox); } public function getHeaderInfo(int $msg) : object { - return \imap_headerinfo($this->mailbox, $msg); + return imap_headerinfo($this->mailbox, $msg); } public function getMail(int $msg) : Email @@ -165,7 +165,7 @@ class Pop3 extends MailHandler implements MailBoxInterface public function inboxClose() : void { if ($this->mailbox !== null) { - \imap_close($this->mailbox); + imap_close($this->mailbox); } } } diff --git a/Message/Mail/Smtp.php b/Message/Mail/Smtp.php index 12b9e137f..2bd2e475f 100644 --- a/Message/Mail/Smtp.php +++ b/Message/Mail/Smtp.php @@ -34,7 +34,7 @@ class Smtp * @var int * @since 1.0.0 */ - const MAX_REPLY_LENGTH = 512; + public const MAX_REPLY_LENGTH = 512; /** * SMTP RFC standard line ending @@ -134,7 +134,7 @@ class Smtp } $this->lastReply = $this->getLines(); - $responseCode = (int) \substr($this->lastReply, 0, 3); + $responseCode = (int) substr($this->lastReply, 0, 3); if ($responseCode === 220) { return true; } @@ -171,11 +171,11 @@ class Smtp $errstr = ''; if ($streamok) { - $socketContext = \stream_context_create($options); - $connection = \stream_socket_client($host . ':' . $port, $errno, $errstr, $timeout, \STREAM_CLIENT_CONNECT, $socketContext); + $socketContext = stream_context_create($options); + $connection = stream_socket_client($host . ':' . $port, $errno, $errstr, $timeout, \STREAM_CLIENT_CONNECT, $socketContext); } else { //Fall back to fsockopen which should work in more places, but is missing some features - $connection = \fsockopen($host, $port, $errno, $errstr, $timeout); + $connection = fsockopen($host, $port, $errno, $errstr, $timeout); } if (!\is_resource($connection)) { @@ -184,13 +184,13 @@ class Smtp // SMTP server can take longer to respond, give longer timeout for first read // Windows does not have support for this timeout function - if (\strpos(\PHP_OS, 'WIN') !== 0) { - $max = (int) \ini_get('max_execution_time'); - if ($max !== 0 && $timeout > $max && \strpos(\ini_get('disable_functions'), 'set_time_limit') === false) { - \set_time_limit($timeout); + if (strpos(\PHP_OS, 'WIN') !== 0) { + $max = (int) ini_get('max_execution_time'); + if ($max !== 0 && $timeout > $max && strpos(ini_get('disable_functions'), 'set_time_limit') === false) { + set_time_limit($timeout); } - \stream_set_timeout($connection, $timeout, 0); + stream_set_timeout($connection, $timeout, 0); } return $connection === false ? null : $connection; @@ -215,7 +215,7 @@ class Smtp $crypto_method |= \STREAM_CRYPTO_METHOD_TLSv1_1_CLIENT; } - return (bool) \stream_socket_enable_crypto($this->con, true, $crypto_method); + return (bool) stream_socket_enable_crypto($this->con, true, $crypto_method); } /** @@ -282,7 +282,7 @@ class Smtp // Start authentication if (!$this->sendCommand('AUTH', 'AUTH PLAIN', 334) || !$this->sendCommand('User & Password', - \base64_encode("\0" . $username . "\0" . $password), + base64_encode("\0" . $username . "\0" . $password), 235 ) ) { @@ -292,8 +292,8 @@ class Smtp case 'LOGIN': // Start authentication if (!$this->sendCommand('AUTH', 'AUTH LOGIN', 334) - || !$this->sendCommand('Username', \base64_encode($username), 334) - || !$this->sendCommand('Password', \base64_encode($password), 235) + || !$this->sendCommand('Username', base64_encode($username), 334) + || !$this->sendCommand('Password', base64_encode($password), 235) ) { return false; } @@ -304,11 +304,11 @@ class Smtp return false; } - $challenge = \base64_decode(\substr($this->lastReply, 4)); + $challenge = base64_decode(substr($this->lastReply, 4)); $response = $username . ' ' . $this->hmac($challenge, $password); // send encoded credentials - return $this->sendCommand('Username', \base64_encode($response), 235); + return $this->sendCommand('Username', base64_encode($response), 235); case 'XOAUTH2': //The OAuth instance must be set up prior to requesting auth. if ($OAuth === null) { @@ -344,16 +344,16 @@ class Smtp // by Lance Rushing $byteLen = 64; if (\strlen($key) > $byteLen) { - $key = \pack('H*', \md5($key)); + $key = pack('H*', md5($key)); } - $key = \str_pad($key, $byteLen, \chr(0x00)); - $ipad = \str_pad('', $byteLen, \chr(0x36)); - $opad = \str_pad('', $byteLen, \chr(0x5c)); + $key = str_pad($key, $byteLen, \chr(0x00)); + $ipad = str_pad('', $byteLen, \chr(0x36)); + $opad = str_pad('', $byteLen, \chr(0x5c)); $k_ipad = $key ^ $ipad; $k_opad = $key ^ $opad; - return \md5($k_opad . \pack('H*', \md5($k_ipad . $data))); + return md5($k_opad . pack('H*', md5($k_ipad . $data))); } /** @@ -369,7 +369,7 @@ class Smtp return false; } - $status = \stream_get_meta_data($this->con); + $status = stream_get_meta_data($this->con); if ($status['eof']) { $this->close(); @@ -393,7 +393,7 @@ class Smtp $this->heloRply = ''; if (\is_resource($this->con)) { - \fclose($this->con); + fclose($this->con); $this->con = null; } } @@ -416,14 +416,14 @@ class Smtp /* The server is ready to accept data! * According to rfc821 we should not send more than 1000 characters on a single line (including the LE) */ - $lines = \explode("\n", \str_replace(["\r\n", "\r"], "\n", $msg_data)); + $lines = explode("\n", str_replace(["\r\n", "\r"], "\n", $msg_data)); /* To distinguish between a complete RFC822 message and a plain message body, we check if the first field * of the first line (':' separated) does not contain a space then it _should_ be a header and we will * process all lines before a blank line as headers. */ - $field = \substr($lines[0], 0, \strpos($lines[0], ':')); - $inHeaders = (!empty($field) && \strpos($field, ' ') === false); + $field = substr($lines[0], 0, strpos($lines[0], ':')); + $inHeaders = (!empty($field) && strpos($field, ' ') === false); foreach ($lines as $line) { $linesOut = []; @@ -432,14 +432,14 @@ class Smtp } while (isset($line[$maxLineLength])) { - $pos = \strrpos(\substr($line, 0, $maxLineLength), ' '); + $pos = strrpos(substr($line, 0, $maxLineLength), ' '); if (!$pos) { $pos = $maxLineLength - 1; - $linesOut[] = \substr($line, 0, $pos); - $line = \substr($line, $pos); + $linesOut[] = substr($line, 0, $pos); + $line = substr($line, $pos); } else { - $linesOut[] = \substr($line, 0, $pos); - $line = \substr($line, $pos + 1); + $linesOut[] = substr($line, 0, $pos); + $line = substr($line, $pos + 1); } if ($inHeaders) { @@ -484,7 +484,7 @@ class Smtp return true; } - if (\substr($this->heloRply, 0, 3) == '421') { + if (substr($this->heloRply, 0, 3) == '421') { return false; } @@ -527,22 +527,22 @@ class Smtp protected function parseHelloFields(string $type) : void { $this->serverCaps = []; - $lines = \explode("\n", $this->heloRply); + $lines = explode("\n", $this->heloRply); foreach ($lines as $n => $s) { //First 4 chars contain response code followed by - or space - $s = \trim(\substr($s, 4)); + $s = trim(substr($s, 4)); if (empty($s)) { continue; } - $fields = \explode(' ', $s); + $fields = explode(' ', $s); if (!empty($fields)) { if (!$n) { $name = $type; $fields = $fields[0]; } else { - $name = \array_shift($fields); + $name = array_shift($fields); switch ($name) { case 'SIZE': $fields = ($fields ? $fields[0] : 0); @@ -612,17 +612,17 @@ class Smtp } else { $notify = []; - if (\strpos($dsn, 'NEVER') !== false) { + if (strpos($dsn, 'NEVER') !== false) { $notify[] = 'NEVER'; } else { foreach (['SUCCESS', 'FAILURE', 'DELAY'] as $value) { - if (\strpos($dsn, $value) !== false) { + if (strpos($dsn, $value) !== false) { $notify[] = $value; } } } - $rcpt = 'RCPT TO:<' . $address . '> NOTIFY=' . \implode(',', $notify); + $rcpt = 'RCPT TO:<' . $address . '> NOTIFY=' . implode(',', $notify); } return $this->sendCommand('RCPT TO', $rcpt, [250, 251]); @@ -657,8 +657,8 @@ class Smtp return false; } - if ((\strpos($commandstring, "\n") !== false) - || (\strpos($commandstring, "\r") !== false) + if ((strpos($commandstring, "\n") !== false) + || (strpos($commandstring, "\r") !== false) ) { return false; } @@ -668,21 +668,21 @@ class Smtp $this->lastReply = $this->getLines(); $matches = []; - if (\preg_match('/^([\d]{3})[ -](?:([\d]\\.[\d]\\.[\d]{1,2}) )?/', $this->lastReply, $matches)) { + if (preg_match('/^([\d]{3})[ -](?:([\d]\\.[\d]\\.[\d]{1,2}) )?/', $this->lastReply, $matches)) { $code = (int) $matches[1]; $codeEx = \count($matches) > 2 ? $matches[2] : null; // Cut off error code from each response line - $detail = \preg_replace( + $detail = preg_replace( "/{$code}[ -]" . - ($codeEx ? \str_replace('.', '\\.', $codeEx) . ' ' : '') . '/m', + ($codeEx ? str_replace('.', '\\.', $codeEx) . ' ' : '') . '/m', '', $this->lastReply ); } else { // Fall back to simple parsing if regex fails - $code = (int) \substr($this->lastReply, 0, 3); - $detail = \substr($this->lastReply, 4); + $code = (int) substr($this->lastReply, 0, 3); + $detail = substr($this->lastReply, 4); } if (!\in_array($code, (array) $expect, true)) { @@ -746,7 +746,7 @@ class Smtp */ public function clientSend(string $data, string $command = '') : int { - $result = \fwrite($this->con, $data); + $result = fwrite($this->con, $data); return $result === false ? -1 : $result; } @@ -819,17 +819,17 @@ class Smtp $data = ''; $endTime = 0; - \stream_set_timeout($this->con, $this->timeout); + stream_set_timeout($this->con, $this->timeout); if ($this->timeLimit > 0) { - $endTime = \time() + $this->timeLimit; + $endTime = time() + $this->timeLimit; } $selR = [$this->con]; $selW = null; $tries = 0; - while (\is_resource($this->con) && !\feof($this->con)) { - $n = \stream_select($selR, $selW, $selW, $this->timeLimit); + while (\is_resource($this->con) && !feof($this->con)) { + $n = stream_select($selR, $selW, $selW, $this->timeLimit); if ($n === false) { if ($tries < 3) { ++$tries; @@ -839,7 +839,7 @@ class Smtp } } - $str = \fgets($this->con, self::MAX_REPLY_LENGTH); + $str = fgets($this->con, self::MAX_REPLY_LENGTH); $data .= $str; // If response is only 3 chars (not valid, but RFC5321 S4.2 says it must be handled), @@ -849,13 +849,13 @@ class Smtp break; } - $info = \stream_get_meta_data($this->con); + $info = stream_get_meta_data($this->con); if ($info['timed_out']) { break; } // Now check if reads took too long - if ($endTime && \time() > $endTime) { + if ($endTime && time() > $endTime) { break; } } @@ -882,8 +882,8 @@ class Smtp foreach ($patterns as $pattern) { $matches = []; - if (\preg_match($pattern, $reply, $matches)) { - $this->lastSmtpTransactionId = \trim($matches[1]); + if (preg_match($pattern, $reply, $matches)) { + $this->lastSmtpTransactionId = trim($matches[1]); break; } } diff --git a/Message/RequestAbstract.php b/Message/RequestAbstract.php index 0cd4c140d..a2f8e355f 100644 --- a/Message/RequestAbstract.php +++ b/Message/RequestAbstract.php @@ -90,7 +90,7 @@ abstract class RequestAbstract implements MessageInterface return $this->data; } - $key = \mb_strtolower($key); + $key = mb_strtolower($key); if (!isset($this->data[$key])) { return null; @@ -125,13 +125,13 @@ abstract class RequestAbstract implements MessageInterface */ public function getDataJson(string $key) : array { - $key = \mb_strtolower($key); + $key = mb_strtolower($key); if (!isset($this->data[$key])) { return []; } - $json = \json_decode($this->data[$key], true); + $json = json_decode($this->data[$key], true); return $json === false ? [] : $json ?? []; } @@ -148,20 +148,20 @@ abstract class RequestAbstract implements MessageInterface */ public function getDataList(string $key, string $delim = ',') : array { - $key = \mb_strtolower($key); + $key = mb_strtolower($key); if (!isset($this->data[$key])) { return []; } - $list = \explode($delim, $this->data[$key]); + $list = explode($delim, $this->data[$key]); if ($list === false) { return []; // @codeCoverageIgnore } foreach ($list as $i => $e) { - $list[$i] = \trim($e); + $list[$i] = trim($e); } return $list; @@ -180,7 +180,7 @@ abstract class RequestAbstract implements MessageInterface { $data = []; foreach ($this->data as $key => $value) { - if (\preg_match('/' . $regex . '/', $key) === 1) { + if (preg_match('/' . $regex . '/', $key) === 1) { $data[$key] = $value; } } @@ -216,7 +216,7 @@ abstract class RequestAbstract implements MessageInterface public function setData(string $key, mixed $value, bool $overwrite = false) : bool { if (!$this->lock) { - $key = \mb_strtolower($key); + $key = mb_strtolower($key); if ($overwrite || !isset($this->data[$key])) { $this->data[$key] = $value; diff --git a/Message/Socket/SocketHeader.php b/Message/Socket/SocketHeader.php index fcf0d2e18..8a4eca4ed 100644 --- a/Message/Socket/SocketHeader.php +++ b/Message/Socket/SocketHeader.php @@ -250,7 +250,7 @@ class SocketHeader extends HeaderAbstract implements \Serializable */ public function get(string $key = null) : array { - return $key === null ? $this->header : ($this->header[\strtolower($key)] ?? []); + return $key === null ? $this->header : ($this->header[strtolower($key)] ?? []); } /** diff --git a/Message/Socket/SocketResponse.php b/Message/Socket/SocketResponse.php index 9329b9bfb..068bbc3f4 100644 --- a/Message/Socket/SocketResponse.php +++ b/Message/Socket/SocketResponse.php @@ -70,7 +70,7 @@ final class SocketResponse extends ResponseAbstract implements RenderableInterfa */ public function getJsonData() : array { - return \json_decode($this->getRaw(), true); + return json_decode($this->getRaw(), true); } /** @@ -95,8 +95,8 @@ final class SocketResponse extends ResponseAbstract implements RenderableInterfa $types = $this->header->get('Content-Type'); foreach ($types as $type) { - if (\stripos($type, MimeType::M_JSON) !== false) { - return (string) \json_encode($this->jsonSerialize()); + if (stripos($type, MimeType::M_JSON) !== false) { + return (string) json_encode($this->jsonSerialize()); } } @@ -141,10 +141,10 @@ final class SocketResponse extends ResponseAbstract implements RenderableInterfa private function removeWhitespaceAndLineBreak(string $render) : string { $types = $this->header->get('Content-Type'); - if (\stripos($types[0], MimeType::M_HTML) !== false) { - $clean = \preg_replace('/(?s).*?<\/pre>(*SKIP)(*F)|(\s{2,}|\n|\t)/', ' ', $render); + if (stripos($types[0], MimeType::M_HTML) !== false) { + $clean = preg_replace('/(?s).*?<\/pre>(*SKIP)(*F)|(\s{2,}|\n|\t)/', ' ', $render); - return \trim($clean ?? ''); + return trim($clean ?? ''); } return $render; @@ -160,7 +160,7 @@ final class SocketResponse extends ResponseAbstract implements RenderableInterfa foreach ($this->response as $response) { if ($response instanceof View) { $result[] = $response->toArray(); - } elseif (\is_array($response) || \is_scalar($response)) { + } elseif (\is_array($response) || is_scalar($response)) { $result[] = $response; } elseif ($response instanceof \JsonSerializable) { $result[] = $response->jsonSerialize(); diff --git a/Model/Html/Meta.php b/Model/Html/Meta.php index 46c11637a..09ba2ffc3 100644 --- a/Model/Html/Meta.php +++ b/Model/Html/Meta.php @@ -229,7 +229,7 @@ final class Meta implements RenderableInterface */ public function render(...$data) : string { - return (\count($this->keywords) > 0 ? '' : '') + return (\count($this->keywords) > 0 ? '' : '') . (!empty($this->author) ? '' : '') . (!empty($this->description) ? '' : '') . (!empty($this->charset) ? '' : '') diff --git a/Model/Message/Dom.php b/Model/Message/Dom.php index b317707a7..5d69140f8 100644 --- a/Model/Message/Dom.php +++ b/Model/Message/Dom.php @@ -147,7 +147,7 @@ final class Dom implements \Serializable, ArrayableInterface */ public function unserialize($raw) : void { - $unserialized = \json_decode($raw, true); + $unserialized = json_decode($raw, true); $this->delay = $unserialized['time'] ?? 0; $this->selector = $unserialized['selector'] ?? ''; @@ -164,7 +164,7 @@ final class Dom implements \Serializable, ArrayableInterface */ public function __toString() { - return (string) \json_encode($this->toArray()); + return (string) json_encode($this->toArray()); } /** diff --git a/Model/Message/FormValidation.php b/Model/Message/FormValidation.php index d8586b696..282d50c38 100644 --- a/Model/Message/FormValidation.php +++ b/Model/Message/FormValidation.php @@ -79,7 +79,7 @@ final class FormValidation implements \JsonSerializable, \Serializable, Arrayabl */ public function unserialize($raw) : void { - $unserialized = \json_decode($raw, true); + $unserialized = json_decode($raw, true); $this->validation = $unserialized['validation'] ?? []; } @@ -93,7 +93,7 @@ final class FormValidation implements \JsonSerializable, \Serializable, Arrayabl */ public function __toString() { - return (string) \json_encode($this->toArray()); + return (string) json_encode($this->toArray()); } /** diff --git a/Model/Message/Notify.php b/Model/Message/Notify.php index a75953283..698cd182d 100644 --- a/Model/Message/Notify.php +++ b/Model/Message/Notify.php @@ -183,7 +183,7 @@ final class Notify implements \JsonSerializable, \Serializable, ArrayableInterfa */ public function unserialize($raw) : void { - $unserialized = \json_decode($raw, true); + $unserialized = json_decode($raw, true); $this->delay = $unserialized['time'] ?? 0; $this->stay = $unserialized['stay'] ?? 0; @@ -201,7 +201,7 @@ final class Notify implements \JsonSerializable, \Serializable, ArrayableInterfa */ public function __toString() { - return (string) \json_encode($this->toArray()); + return (string) json_encode($this->toArray()); } /** diff --git a/Model/Message/Redirect.php b/Model/Message/Redirect.php index 807c40ebd..b22dc3279 100644 --- a/Model/Message/Redirect.php +++ b/Model/Message/Redirect.php @@ -125,7 +125,7 @@ final class Redirect implements \JsonSerializable, \Serializable, ArrayableInter */ public function unserialize($raw) : void { - $unserialized = \json_decode($raw, true); + $unserialized = json_decode($raw, true); $this->delay = $unserialized['time'] ?? 0; $this->uri = $unserialized['uri'] ?? ''; @@ -141,7 +141,7 @@ final class Redirect implements \JsonSerializable, \Serializable, ArrayableInter */ public function __toString() { - return (string) \json_encode($this->toArray()); + return (string) json_encode($this->toArray()); } /** diff --git a/Model/Message/Reload.php b/Model/Message/Reload.php index c6cdb579d..8138b842f 100644 --- a/Model/Message/Reload.php +++ b/Model/Message/Reload.php @@ -85,7 +85,7 @@ final class Reload implements \JsonSerializable, \Serializable, ArrayableInterfa */ public function unserialize($raw) : void { - $unserialized = \json_decode($raw, true); + $unserialized = json_decode($raw, true); $this->delay = $unserialized['time'] ?? 0; } @@ -99,7 +99,7 @@ final class Reload implements \JsonSerializable, \Serializable, ArrayableInterfa */ public function __toString() { - return (string) \json_encode($this->toArray()); + return (string) json_encode($this->toArray()); } /** diff --git a/Module/InstallerAbstract.php b/Module/InstallerAbstract.php index a50a6d4e3..47706a6bd 100644 --- a/Module/InstallerAbstract.php +++ b/Module/InstallerAbstract.php @@ -68,16 +68,16 @@ abstract class InstallerAbstract protected static function createTables(DatabasePool $dbPool, ModuleInfo $info) : void { $path = static::PATH . '/Install/db.json'; - if (!\is_file($path)) { + if (!is_file($path)) { return; } - $content = \file_get_contents($path); + $content = file_get_contents($path); if ($content === false) { return; // @codeCoverageIgnore } - $definitions = \json_decode($content, true); + $definitions = json_decode($content, true); foreach ($definitions as $definition) { SchemaBuilder::createFromSchema($definition, $dbPool->get('schema'))->execute(); } @@ -95,14 +95,14 @@ abstract class InstallerAbstract */ protected static function activate(DatabasePool $dbPool, ModuleInfo $info) : void { - if (($path = \realpath(static::PATH)) === false) { + if (($path = realpath(static::PATH)) === false) { return; // @codeCoverageIgnore } - $classPath = \substr($path . '/Status', (int) \strlen((string) \realpath(__DIR__ . '/../../'))); + $classPath = substr($path . '/Status', (int) \strlen((string) realpath(__DIR__ . '/../../'))); /** @var class-string $class */ - $class = \str_replace('/', '\\', $classPath); + $class = str_replace('/', '\\', $classPath); if (!Autoloader::exists($class)) { throw new \UnexpectedValueException($class); // @codeCoverageIgnore @@ -123,14 +123,14 @@ abstract class InstallerAbstract */ public static function reInit(ModuleInfo $info, ApplicationInfo $appInfo = null) : void { - if (($path = \realpath(static::PATH)) === false) { + if (($path = realpath(static::PATH)) === false) { return; // @codeCoverageIgnore } - $classPath = \substr($path . '/Status', \strlen((string) \realpath(__DIR__ . '/../../'))); + $classPath = substr($path . '/Status', \strlen((string) realpath(__DIR__ . '/../../'))); /** @var class-string $class */ - $class = \str_replace('/', '\\', $classPath); + $class = str_replace('/', '\\', $classPath); if (!Autoloader::exists($class)) { throw new \UnexpectedValueException($class); // @codeCoverageIgnore diff --git a/Module/ModuleAbstract.php b/Module/ModuleAbstract.php index 9a32e1738..71cb667ff 100644 --- a/Module/ModuleAbstract.php +++ b/Module/ModuleAbstract.php @@ -121,7 +121,7 @@ abstract class ModuleAbstract public static function getLocalization(string $language, string $destination) : array { $lang = []; - if (\is_file($oldPath = \rtrim(static::PATH, '/') . '/Theme/' . $destination . '/Lang/' . $language . '.lang.php')) { + if (is_file($oldPath = rtrim(static::PATH, '/') . '/Theme/' . $destination . '/Lang/' . $language . '.lang.php')) { /** @noinspection PhpIncludeInspection */ return include $oldPath; } diff --git a/Module/ModuleInfo.php b/Module/ModuleInfo.php index a963c0b63..031dcc8f2 100644 --- a/Module/ModuleInfo.php +++ b/Module/ModuleInfo.php @@ -80,14 +80,14 @@ final class ModuleInfo */ public function load() : void { - if (!\is_file($this->path)) { + if (!is_file($this->path)) { throw new PathException($this->path); } - $contents = \file_get_contents($this->path); + $contents = file_get_contents($this->path); /** @var array{name:array{id:int, internal:string, external:string}, category:string, vision:string, requirements:array, creator:array{name:string, website:string}, description:string, directory:string, dependencies:array, providing:array, load:array} $info */ - $info = \json_decode($contents === false ? '[]' : $contents, true); + $info = json_decode($contents === false ? '[]' : $contents, true); $this->info = $info === false ? [] : $info; } @@ -100,11 +100,11 @@ final class ModuleInfo */ public function update() : void { - if (!\is_file($this->path)) { + if (!is_file($this->path)) { throw new PathException($this->path); } - \file_put_contents($this->path, \json_encode($this->info, \JSON_PRETTY_PRINT)); + file_put_contents($this->path, json_encode($this->info, \JSON_PRETTY_PRINT)); } /** @@ -120,7 +120,7 @@ final class ModuleInfo */ public function set(string $path, $data, string $delim = '/') : void { - if (!\is_scalar($data) && !\is_array($data) && !($data instanceof \JsonSerializable)) { + if (!is_scalar($data) && !\is_array($data) && !($data instanceof \JsonSerializable)) { throw new \InvalidArgumentException('Type of $data "' . \gettype($data) . '" is not supported.'); } diff --git a/Module/ModuleManager.php b/Module/ModuleManager.php index 7a4cf39bc..5521cf8d4 100644 --- a/Module/ModuleManager.php +++ b/Module/ModuleManager.php @@ -195,12 +195,12 @@ final class ModuleManager foreach ($active as $module) { $path = $this->modulePath . $module . '/info.json'; - if (!\is_file($path)) { + if (!is_file($path)) { continue; } - $content = \file_get_contents($path); - $json = \json_decode($content === false ? '[]' : $content, true); + $content = file_get_contents($path); + $json = json_decode($content === false ? '[]' : $content, true); $this->active[$json['name']['internal']] = $json === false ? [] : $json; } @@ -263,8 +263,8 @@ final class ModuleManager public function getAllModules() : array { if (empty($this->all)) { - \chdir($this->modulePath); - $files = \glob('*', \GLOB_ONLYDIR); + chdir($this->modulePath); + $files = glob('*', \GLOB_ONLYDIR); if ($files === false) { return $this->all; // @codeCoverageIgnore @@ -338,7 +338,7 @@ final class ModuleManager */ public function loadInfo(string $module) : ?ModuleInfo { - $path = \realpath($oldPath = $this->modulePath . $module . '/info.json'); + $path = realpath($oldPath = $this->modulePath . $module . '/info.json'); if ($path === false) { return null; } @@ -498,7 +498,7 @@ final class ModuleManager return true; } - if (!\is_file($this->modulePath . $module . '/Admin/Installer.php')) { + if (!is_file($this->modulePath . $module . '/Admin/Installer.php')) { return false; } @@ -546,7 +546,7 @@ final class ModuleManager return false; } - if (!\is_file($this->modulePath . $module . '/Admin/Uninstaller.php')) { + if (!is_file($this->modulePath . $module . '/Admin/Uninstaller.php')) { return false; } @@ -624,11 +624,11 @@ final class ModuleManager */ public function installProviding(string $from, string $for) : void { - if (!\is_file(__DIR__ . '/../..' . $from . '/Admin/Install/' . $for . '.php')) { + if (!is_file(__DIR__ . '/../..' . $from . '/Admin/Install/' . $for . '.php')) { return; } - $from = \str_replace('/', '\\', $from); + $from = str_replace('/', '\\', $from); $class = $from . '\\Admin\\Install\\' . $for; $class::install($this->modulePath, $this->app); diff --git a/Module/PackageManager.php b/Module/PackageManager.php index d0d752d79..a77926daf 100644 --- a/Module/PackageManager.php +++ b/Module/PackageManager.php @@ -87,7 +87,7 @@ final class PackageManager public function __construct(string $path, string $basePath, string $publicKey) { $this->path = $path; - $this->basePath = \rtrim($basePath, '\\/'); + $this->basePath = rtrim($basePath, '\\/'); $this->publicKey = $publicKey; } @@ -102,7 +102,7 @@ final class PackageManager */ public function extract(string $path) : void { - $this->extractPath = \rtrim($path, '\\/'); + $this->extractPath = rtrim($path, '\\/'); Zip::unpack($this->path, $this->extractPath); } @@ -117,12 +117,12 @@ final class PackageManager */ public function load() : void { - if (!\is_dir($this->extractPath)) { + if (!is_dir($this->extractPath)) { throw new PathException($this->extractPath); } - $contents = \file_get_contents($this->extractPath . '/info.json'); - $info = \json_decode($contents === false ? '[]' : $contents, true); + $contents = file_get_contents($this->extractPath . '/info.json'); + $info = json_decode($contents === false ? '[]' : $contents, true); $this->info = $info === false ? [] : $info; } @@ -135,11 +135,11 @@ final class PackageManager */ public function isValid() : bool { - if (!\is_file($this->extractPath . '/package.cert')) { + if (!is_file($this->extractPath . '/package.cert')) { return false; } - $contents = \file_get_contents($this->extractPath . '/package.cert'); + $contents = file_get_contents($this->extractPath . '/package.cert'); return $this->authenticate($contents === false ? '' : $contents, $this->hashFiles()); } @@ -153,22 +153,22 @@ final class PackageManager private function hashFiles() : string { $files = Directory::list($this->extractPath, '*', true); - $state = \sodium_crypto_generichash_init(); + $state = sodium_crypto_generichash_init(); foreach ($files as $file) { - if ($file === 'package.cert' || \is_dir($this->extractPath . '/' . $file)) { + if ($file === 'package.cert' || is_dir($this->extractPath . '/' . $file)) { continue; } - $contents = \file_get_contents($this->extractPath . '/' . $file); + $contents = file_get_contents($this->extractPath . '/' . $file); if ($contents === false) { throw new \Exception(); // @codeCoverageIgnore } - \sodium_crypto_generichash_update($state, $contents); + sodium_crypto_generichash_update($state, $contents); } - return \sodium_crypto_generichash_final($state); + return sodium_crypto_generichash_final($state); } /** @@ -188,7 +188,7 @@ final class PackageManager foreach ($this->info['update'] as $steps) { foreach ($steps as $key => $components) { - if (\method_exists($this, $key)) { + if (method_exists($this, $key)) { $this->{$key}($components); } } @@ -207,21 +207,21 @@ final class PackageManager private function download(array $components) : void { foreach ($components as $from => $to) { - $fp = \fopen($this->basePath . '/' . $to, 'w+'); - $ch = \curl_init(\str_replace(' ','%20', $from)); + $fp = fopen($this->basePath . '/' . $to, 'w+'); + $ch = curl_init(str_replace(' ','%20', $from)); if ($ch === false || $fp === false) { continue; // @codeCoverageIgnore } - \curl_setopt($ch, \CURLOPT_TIMEOUT, 50); - \curl_setopt($ch, \CURLOPT_FILE, $fp); - \curl_setopt($ch, \CURLOPT_FOLLOWLOCATION, true); + curl_setopt($ch, \CURLOPT_TIMEOUT, 50); + curl_setopt($ch, \CURLOPT_FILE, $fp); + curl_setopt($ch, \CURLOPT_FOLLOWLOCATION, true); - \curl_exec($ch); + curl_exec($ch); - \curl_close($ch); - \fclose($fp); + curl_close($ch); + fclose($fp); } } @@ -237,8 +237,8 @@ final class PackageManager private function move(array $components) : void { foreach ($components as $from => $to) { - $fromPath = StringUtils::startsWith($from, '/Package/') ? $this->extractPath . '/' . \substr($from, 9) : $this->basePath . '/' . $from; - $toPath = StringUtils::startsWith($to, '/Package/') ? $this->extractPath . '/' . \substr($to, 9) : $this->basePath . '/' . $to; + $fromPath = StringUtils::startsWith($from, '/Package/') ? $this->extractPath . '/' . substr($from, 9) : $this->basePath . '/' . $from; + $toPath = StringUtils::startsWith($to, '/Package/') ? $this->extractPath . '/' . substr($to, 9) : $this->basePath . '/' . $to; LocalStorage::move($fromPath, $toPath, true); } @@ -256,10 +256,10 @@ final class PackageManager private function copy(array $components) : void { foreach ($components as $from => $tos) { - $fromPath = StringUtils::startsWith($from, '/Package/') ? $this->extractPath . '/' . \substr($from, 9) : $this->basePath . '/' . $from; + $fromPath = StringUtils::startsWith($from, '/Package/') ? $this->extractPath . '/' . substr($from, 9) : $this->basePath . '/' . $from; foreach ($tos as $to) { - $toPath = StringUtils::startsWith($to, '/Package/') ? $this->extractPath . '/' . \substr($to, 9) : $this->basePath . '/' . $to; + $toPath = StringUtils::startsWith($to, '/Package/') ? $this->extractPath . '/' . substr($to, 9) : $this->basePath . '/' . $to; LocalStorage::copy($fromPath, $toPath, true); } @@ -278,7 +278,7 @@ final class PackageManager private function delete(array $components) : void { foreach ($components as $component) { - $path = StringUtils::startsWith($component, '/Package/') ? $this->extractPath . '/' . \substr($component, 9) : $this->basePath . '/' . $component; + $path = StringUtils::startsWith($component, '/Package/') ? $this->extractPath . '/' . substr($component, 9) : $this->basePath . '/' . $component; LocalStorage::delete($path); } } @@ -296,26 +296,26 @@ final class PackageManager { foreach ($components as $component) { $cmd = ''; - $path = StringUtils::startsWith($component, '/Package/') ? $this->extractPath . '/' . \substr($component, 9) : $this->basePath . '/' . $component; + $path = StringUtils::startsWith($component, '/Package/') ? $this->extractPath . '/' . substr($component, 9) : $this->basePath . '/' . $component; if (StringUtils::endsWith($component, '.php')) { $cmd = 'php ' . $path; - } elseif ((StringUtils::endsWith($component, '.sh') && OperatingSystem::getSystem() === SystemType::LINUX && \is_executable($path)) - || (StringUtils::endsWith($component, '.batch') && OperatingSystem::getSystem() === SystemType::WIN && \is_executable($path)) + } elseif ((StringUtils::endsWith($component, '.sh') && OperatingSystem::getSystem() === SystemType::LINUX && is_executable($path)) + || (StringUtils::endsWith($component, '.batch') && OperatingSystem::getSystem() === SystemType::WIN && is_executable($path)) ) { $cmd = $path; } if ($cmd !== '') { $pipes = []; - $resource = \proc_open($cmd, [1 => ['pipe', 'w'], 2 => ['pipe', 'w']], $pipes, $this->extractPath); + $resource = proc_open($cmd, [1 => ['pipe', 'w'], 2 => ['pipe', 'w']], $pipes, $this->extractPath); foreach ($pipes as $pipe) { - \fclose($pipe); + fclose($pipe); } if ($resource !== false) { - \proc_close($resource); + proc_close($resource); } } } @@ -347,7 +347,7 @@ final class PackageManager private function authenticate(string $signedHash, string $rawHash) : bool { try { - return \sodium_crypto_sign_verify_detached($signedHash, $rawHash, $this->publicKey); + return sodium_crypto_sign_verify_detached($signedHash, $rawHash, $this->publicKey); } catch(\Throwable $t) { return false; } diff --git a/Module/StatusAbstract.php b/Module/StatusAbstract.php index c7a5ba31f..b14497792 100644 --- a/Module/StatusAbstract.php +++ b/Module/StatusAbstract.php @@ -90,19 +90,19 @@ abstract class StatusAbstract */ protected static function installRoutesHooks(string $destRoutePath, string $srcRoutePath) : void { - if (!\is_file($srcRoutePath)) { + if (!is_file($srcRoutePath)) { return; } - if (!\is_file($destRoutePath)) { - \file_put_contents($destRoutePath, 'getName() . '/' . \basename($file->getName(), '.php')) - || ($appInfo !== null && \basename($file->getName(), '.php') !== $appInfo->getInternalName()) + if (!is_dir(__DIR__ . '/../../' . $child->getName() . '/' . basename($file->getName(), '.php')) + || ($appInfo !== null && basename($file->getName(), '.php') !== $appInfo->getInternalName()) ) { continue; } - self::installRoutesHooks(__DIR__ . '/../../' . $child->getName() . '/' . \basename($file->getName(), '.php') . '/' . $type . '.php', $file->getPath()); + self::installRoutesHooks(__DIR__ . '/../../' . $child->getName() . '/' . basename($file->getName(), '.php') . '/' . $type . '.php', $file->getPath()); } } elseif ($child instanceof File) { - if (!\is_dir(__DIR__ . '/../../' . $child->getName()) - || ($appInfo !== null && \basename($child->getName(), '.php') !== $appInfo->getInternalName()) + if (!is_dir(__DIR__ . '/../../' . $child->getName()) + || ($appInfo !== null && basename($child->getName(), '.php') !== $appInfo->getInternalName()) ) { continue; } @@ -222,17 +222,17 @@ abstract class StatusAbstract foreach ($directories as $child) { if ($child instanceof Directory) { foreach ($child as $file) { - if (!\is_dir(__DIR__ . '/../../' . $child->getName() . '/' . \basename($file->getName(), '.php')) - || ($appInfo !== null && \basename($file->getName(), '.php') !== $appInfo->getInternalName()) + if (!is_dir(__DIR__ . '/../../' . $child->getName() . '/' . basename($file->getName(), '.php')) + || ($appInfo !== null && basename($file->getName(), '.php') !== $appInfo->getInternalName()) ) { continue; } - self::uninstallRoutesHooks(__DIR__ . '/../../' . $child->getName() . '/' . \basename($file->getName(), '.php') . '/'. $type . '.php', $file->getPath()); + self::uninstallRoutesHooks(__DIR__ . '/../../' . $child->getName() . '/' . basename($file->getName(), '.php') . '/'. $type . '.php', $file->getPath()); } } elseif ($child instanceof File) { - if (!\is_dir(__DIR__ . '/../../' . $child->getName()) - || ($appInfo !== null && \basename($child->getName(), '.php') !== $appInfo->getInternalName()) + if (!is_dir(__DIR__ . '/../../' . $child->getName()) + || ($appInfo !== null && basename($child->getName(), '.php') !== $appInfo->getInternalName()) ) { continue; } @@ -256,17 +256,17 @@ abstract class StatusAbstract */ protected static function uninstallRoutesHooks(string $destRoutePath, string $srcRoutePath) : void { - if (!\is_file($destRoutePath) - || !\is_file($srcRoutePath) + if (!is_file($destRoutePath) + || !is_file($srcRoutePath) ) { return; } - if (!\is_file($destRoutePath)) { + if (!is_file($destRoutePath)) { throw new PathException($destRoutePath); // @codeCoverageIgnore } - if (!\is_writable($destRoutePath)) { + if (!is_writable($destRoutePath)) { throw new PermissionException($destRoutePath); // @codeCoverageIgnore } @@ -277,7 +277,7 @@ abstract class StatusAbstract $appRoutes = ArrayUtils::array_diff_assoc_recursive($appRoutes, $moduleRoutes); - \file_put_contents($destRoutePath, 'get('schema')); foreach ($definitions as $name => $definition) { diff --git a/Preloader.php b/Preloader.php index b31696dca..5cc31a08d 100644 --- a/Preloader.php +++ b/Preloader.php @@ -86,9 +86,9 @@ final class Preloader continue; } - if (\is_dir($include)) { + if (is_dir($include)) { $this->loadDir($include); - } elseif (\is_file($include)) { + } elseif (is_file($include)) { $this->loadFile($include); } } @@ -105,25 +105,25 @@ final class Preloader */ private function loadDir(string $path) : void { - $fh = \opendir($path); + $fh = opendir($path); if ($fh === false) { return; // @codeCoverageIgnore } - while ($file = \readdir($fh)) { + while ($file = readdir($fh)) { if (\in_array($file, $this->ignores)) { continue; } - if (\is_dir($path . '/' . $file)) { + if (is_dir($path . '/' . $file)) { $this->loadDir($path . '/' . $file); - } elseif (\is_file($path . '/' . $file)) { + } elseif (is_file($path . '/' . $file)) { $this->loadFile($path . '/' . $file); } } - \closedir($fh); + closedir($fh); } /** @@ -138,7 +138,7 @@ final class Preloader private function loadFile(string $path) : void { if (\in_array($path, $this->ignores) - || \substr($path, -\strlen('.php')) !== '.php' + || substr($path, -\strlen('.php')) !== '.php' ) { return; } diff --git a/Router/SocketRouter.php b/Router/SocketRouter.php index b8154f7b7..a7e663883 100644 --- a/Router/SocketRouter.php +++ b/Router/SocketRouter.php @@ -59,7 +59,7 @@ final class SocketRouter implements RouterInterface */ public function importFromFile(string $path) : bool { - if (!\is_file($path)) { + if (!is_file($path)) { return false; } @@ -131,7 +131,7 @@ final class SocketRouter implements RouterInterface { $bound = []; foreach ($this->routes as $route => $destination) { - if (!((bool) \preg_match('~^' . $route . '$~', $uri))) { + if (!((bool) preg_match('~^' . $route . '$~', $uri))) { continue; } @@ -144,14 +144,14 @@ final class SocketRouter implements RouterInterface ) ) ) { - return $app !== null ? $this->route('/' . \strtolower($app) . '/e403') : $this->route('/e403'); + return $app !== null ? $this->route('/' . strtolower($app) . '/e403') : $this->route('/e403'); } // if validation check is invalid if (isset($d['validation'])) { foreach ($d['validation'] as $name => $pattern) { - if (!isset($data[$name]) || \preg_match($pattern, $data[$name]) !== 1) { - return $app !== null ? $this->route('/' . \strtolower($app) . '/e403') : $this->route('/e403'); + if (!isset($data[$name]) || preg_match($pattern, $data[$name]) !== 1) { + return $app !== null ? $this->route('/' . strtolower($app) . '/e403') : $this->route('/e403'); } } } @@ -160,7 +160,7 @@ final class SocketRouter implements RouterInterface // fill data if (isset($d['pattern'])) { - \preg_match($d['pattern'], $uri, $matches); + preg_match($d['pattern'], $uri, $matches); $temp['data'] = $matches; } diff --git a/Router/WebRouter.php b/Router/WebRouter.php index 823c6129a..74e5f466e 100644 --- a/Router/WebRouter.php +++ b/Router/WebRouter.php @@ -61,7 +61,7 @@ final class WebRouter implements RouterInterface */ public function importFromFile(string $path) : bool { - if (!\is_file($path)) { + if (!is_file($path)) { return false; } @@ -144,7 +144,7 @@ final class WebRouter implements RouterInterface { $bound = []; foreach ($this->routes as $route => $destination) { - if (!((bool) \preg_match('~^' . $route . '$~', $uri))) { + if (!((bool) preg_match('~^' . $route . '$~', $uri))) { continue; } @@ -156,7 +156,7 @@ final class WebRouter implements RouterInterface // if csrf is required but not set if (isset($d['csrf']) && $d['csrf'] && $csrf === null) { return $app !== null - ? $this->route('/' . \strtolower($app) . '/e403', $csrf, $verb) + ? $this->route('/' . strtolower($app) . '/e403', $csrf, $verb) : $this->route('/e403', $csrf, $verb); } @@ -173,16 +173,16 @@ final class WebRouter implements RouterInterface ) ) { return $app !== null - ? $this->route('/' . \strtolower($app) . '/e403', $csrf, $verb) + ? $this->route('/' . strtolower($app) . '/e403', $csrf, $verb) : $this->route('/e403', $csrf, $verb); } // if validation check is invalid if (isset($d['validation'])) { foreach ($d['validation'] as $name => $validation) { - if (!isset($data[$name]) || \preg_match($validation, $data[$name]) !== 1) { + if (!isset($data[$name]) || preg_match($validation, $data[$name]) !== 1) { return $app !== null - ? $this->route('/' . \strtolower($app) . '/e403', $csrf, $verb) + ? $this->route('/' . strtolower($app) . '/e403', $csrf, $verb) : $this->route('/e403', $csrf, $verb); } } @@ -192,7 +192,7 @@ final class WebRouter implements RouterInterface // fill data if (isset($d['pattern'])) { - \preg_match($d['pattern'], $uri, $matches); + preg_match($d['pattern'], $uri, $matches); $temp['data'] = $matches; } diff --git a/Security/PhpCode.php b/Security/PhpCode.php index 5f931915a..64800976b 100644 --- a/Security/PhpCode.php +++ b/Security/PhpCode.php @@ -78,7 +78,7 @@ final class PhpCode */ public static function normalizeSource(string $source) : string { - return \str_replace(["\n", "\r\n", "\r", "\t"], ['', '', '', ' '], $source); + return str_replace(["\n", "\r\n", "\r", "\t"], ['', '', '', ' '], $source); } /** @@ -92,7 +92,7 @@ final class PhpCode */ public static function hasUnicode(string $source) : bool { - return (bool) \preg_match('/[^\x00-\x7f]/', $source); + return (bool) preg_match('/[^\x00-\x7f]/', $source); } /** @@ -106,14 +106,14 @@ final class PhpCode */ public static function isDisabled(array $functions) : bool { - $disabled = \ini_get('disable_functions'); + $disabled = ini_get('disable_functions'); if ($disabled === false) { return true; // @codeCoverageIgnore } - $disabled = \str_replace(' ', '', $disabled); - $disabled = \explode(',', $disabled); + $disabled = str_replace(' ', '', $disabled); + $disabled = explode(',', $disabled); foreach ($functions as $function) { if (!\in_array($function, $disabled)) { @@ -136,7 +136,7 @@ final class PhpCode public static function hasDeprecatedFunction(string $source) : bool { foreach (self::$deprecatedFunctions as $function) { - if (\preg_match('/' . $function . '\s*\(/', $source) === 1) { + if (preg_match('/' . $function . '\s*\(/', $source) === 1) { return true; } } @@ -156,7 +156,7 @@ final class PhpCode */ public static function validateFileIntegrity(string $source, string $hash) : bool { - return \md5_file($source) === $hash; + return md5_file($source) === $hash; } /** diff --git a/Socket/Client/Client.php b/Socket/Client/Client.php index 726dff7a5..20ca6f747 100644 --- a/Socket/Client/Client.php +++ b/Socket/Client/Client.php @@ -78,21 +78,21 @@ class Client extends SocketAbstract */ public function run() : void { - \socket_connect($this->sock, $this->ip, $this->port); + socket_connect($this->sock, $this->ip, $this->port); $errorCounter = 0; while ($this->run) { try { if (!empty($this->packets)) { - $msg = \array_shift($this->packets); + $msg = array_shift($this->packets); - \socket_write($this->sock, $msg, \strlen($msg)); + socket_write($this->sock, $msg, \strlen($msg)); } $read = [$this->sock]; - if (\socket_last_error() !== 0) { + if (socket_last_error() !== 0) { ++$errorCounter; } @@ -105,9 +105,9 @@ class Client extends SocketAbstract //} if (\count($read) > 0) { - $data = \socket_read($this->sock, 1024); + $data = socket_read($this->sock, 1024); - \var_dump($data); + var_dump($data); /* Server no data */ if ($data === false) { @@ -115,10 +115,10 @@ class Client extends SocketAbstract } /* Normalize */ - $data = \trim($data); + $data = trim($data); if (!empty($data)) { - $data = \explode(' ', $data); + $data = explode(' ', $data); $this->commands->trigger($data[0], 0, $data); } } diff --git a/Socket/Server/Server.php b/Socket/Server/Server.php index de54db000..970c9f800 100644 --- a/Socket/Server/Server.php +++ b/Socket/Server/Server.php @@ -89,10 +89,10 @@ class Server extends SocketAbstract */ public static function hasInternet() : bool { - $connected = @\fsockopen("www.google.com", 80); + $connected = @fsockopen("www.google.com", 80); if ($connected) { - \fclose($connected); + fclose($connected); return true; } else { @@ -108,7 +108,7 @@ class Server extends SocketAbstract $this->app->logger->info('Creating socket...'); parent::create($ip, $port); $this->app->logger->info('Binding socket...'); - \socket_bind($this->sock, $this->ip, $this->port); + socket_bind($this->sock, $this->ip, $this->port); } /** @@ -142,7 +142,7 @@ class Server extends SocketAbstract return true; } - if (\preg_match("/Sec-WebSocket-Version: (.*)\r\n/", $headers, $match) === false) { + if (preg_match("/Sec-WebSocket-Version: (.*)\r\n/", $headers, $match) === false) { return false; } @@ -152,31 +152,31 @@ class Server extends SocketAbstract return false; } - if (\preg_match("/GET (.*) HTTP/", $headers, $match)) { + if (preg_match("/GET (.*) HTTP/", $headers, $match)) { $root = $match[1]; } - if (\preg_match("/Host: (.*)\r\n/", $headers, $match)) { + if (preg_match("/Host: (.*)\r\n/", $headers, $match)) { $host = $match[1]; } - if (\preg_match("/Origin: (.*)\r\n/", $headers, $match)) { + if (preg_match("/Origin: (.*)\r\n/", $headers, $match)) { $origin = $match[1]; } $key = ''; - if (\preg_match("/Sec-WebSocket-Key: (.*)\r\n/", $headers, $match)) { + if (preg_match("/Sec-WebSocket-Key: (.*)\r\n/", $headers, $match)) { $key = $match[1]; } $acceptKey = $key . '258EAFA5-E914-47DA-95CA-C5AB0DC85B11'; - $acceptKey = \base64_encode(\sha1($acceptKey, true)); + $acceptKey = base64_encode(sha1($acceptKey, true)); $upgrade = "HTTP/1.1 101 Switching Protocols\r\n" . "Upgrade: websocket\r\n" . "Connection: Upgrade\r\n" . "Sec-WebSocket-Accept: ${acceptKey}" . "\r\n\r\n"; - \socket_write($client->getSocket(), $upgrade); + socket_write($client->getSocket(), $upgrade); $client->setHandshake(true); return true; @@ -188,8 +188,8 @@ class Server extends SocketAbstract public function run() : void { $this->app->logger->info('Start listening...'); - @\socket_listen($this->sock); - @\socket_set_nonblock($this->sock); + @socket_listen($this->sock); + @socket_set_nonblock($this->sock); $this->conn[] = $this->sock; $this->app->logger->info('Is running...'); @@ -199,7 +199,7 @@ class Server extends SocketAbstract $write = null; $except = null; - if (\socket_select($read, $write, $except, 0) < 1) { + if (socket_select($read, $write, $except, 0) < 1) { // error // socket_last_error(); // socket_strerror(socket_last_error()); @@ -209,17 +209,17 @@ class Server extends SocketAbstract foreach ($read as $key => $socket) { if ($this->sock === $socket) { - $newc = @\socket_accept($this->sock); + $newc = @socket_accept($this->sock); $this->connectClient($newc); } else { $client = $this->clientManager->getBySocket($socket); - $data = @\socket_read($socket, 1024, \PHP_NORMAL_READ); + $data = @socket_read($socket, 1024, \PHP_NORMAL_READ); if ($data === false) { - \socket_close($socket); + socket_close($socket); } - $data = \is_string($data) ? \trim($data) : ''; + $data = \is_string($data) ? trim($data) : ''; if (!$client->getHandshake()) { $this->app->logger->debug('Doing handshake...'); @@ -253,7 +253,7 @@ class Server extends SocketAbstract public function shutdown($request) : void { $msg = 'shutdown' . "\n"; - \socket_write($this->clientManager->get($request->header->account)->getSocket(), $msg, \strlen($msg)); + socket_write($this->clientManager->get($request->header->account)->getSocket(), $msg, \strlen($msg)); $this->run = false; } @@ -290,8 +290,8 @@ class Server extends SocketAbstract $this->app->logger->debug('Disconnecting client...'); $client->setConnected(false); $client->setHandshake(false); - \socket_shutdown($client->getSocket(), 2); - \socket_close($client->getSocket()); + socket_shutdown($client->getSocket(), 2); + socket_close($client->getSocket()); if (isset($this->conn[$client->getId()])) { unset($this->conn[$client->getId()]); @@ -314,14 +314,14 @@ class Server extends SocketAbstract { $length = \ord($payload[1]) & 127; if ($length == 126) { - $masks = \substr($payload, 4, 4); - $data = \substr($payload, 8); + $masks = substr($payload, 4, 4); + $data = substr($payload, 8); } elseif ($length == 127) { - $masks = \substr($payload, 10, 4); - $data = \substr($payload, 14); + $masks = substr($payload, 10, 4); + $data = substr($payload, 14); } else { - $masks = \substr($payload, 2, 4); - $data = \substr($payload, 6); + $masks = substr($payload, 2, 4); + $data = substr($payload, 6); } $text = ''; $dataLength = \strlen($data); diff --git a/Socket/SocketAbstract.php b/Socket/SocketAbstract.php index 688488ce6..fbf2d835d 100644 --- a/Socket/SocketAbstract.php +++ b/Socket/SocketAbstract.php @@ -63,7 +63,7 @@ abstract class SocketAbstract implements SocketInterface { $this->ip = $ip; $this->port = $port; - $this->sock = \socket_create(\AF_INET, \SOCK_STREAM, \SOL_TCP); + $this->sock = socket_create(\AF_INET, \SOCK_STREAM, \SOL_TCP); } /** @@ -82,8 +82,8 @@ abstract class SocketAbstract implements SocketInterface public function close() : void { if (isset($this->sock)) { - \socket_shutdown($this->sock, 2); - \socket_close($this->sock); + socket_shutdown($this->sock, 2); + socket_close($this->sock); $this->sock = null; } } diff --git a/Stdlib/Base/Enum.php b/Stdlib/Base/Enum.php index b3624b2db..60e88f919 100644 --- a/Stdlib/Base/Enum.php +++ b/Stdlib/Base/Enum.php @@ -53,7 +53,7 @@ abstract class Enum */ public static function getConstants() : array { - $reflect = new \ReflectionClass(\get_called_class()); + $reflect = new \ReflectionClass(static::class); return $reflect->getConstants() ?? []; } @@ -68,9 +68,9 @@ abstract class Enum public static function getRandom() : mixed { $constants = self::getConstants(); - $keys = \array_keys($constants); + $keys = array_keys($constants); - return $constants[$keys[\mt_rand(0, \count($constants) - 1)]]; + return $constants[$keys[mt_rand(0, \count($constants) - 1)]]; } /** @@ -106,7 +106,7 @@ abstract class Enum { $arr = self::getConstants(); - return \array_search($value, $arr); + return array_search($value, $arr); } /** diff --git a/Stdlib/Base/EnumArray.php b/Stdlib/Base/EnumArray.php index 6da602a97..28fc6f12e 100644 --- a/Stdlib/Base/EnumArray.php +++ b/Stdlib/Base/EnumArray.php @@ -119,8 +119,8 @@ abstract class EnumArray */ public static function getRandom() : mixed { - $keys = \array_keys(static::$constants); + $keys = array_keys(static::$constants); - return static::$constants[$keys[\mt_rand(0, \count(static::$constants) - 1)]]; + return static::$constants[$keys[mt_rand(0, \count(static::$constants) - 1)]]; } } diff --git a/Stdlib/Base/FloatInt.php b/Stdlib/Base/FloatInt.php index 797e0e513..d00dc7822 100644 --- a/Stdlib/Base/FloatInt.php +++ b/Stdlib/Base/FloatInt.php @@ -87,26 +87,26 @@ class FloatInt implements \Serializable */ public static function toInt(string $value, string $thousands = ',', string $decimal = '.') : int { - $split = \explode($decimal, $value); + $split = explode($decimal, $value); if ($split === false) { throw new \Exception('Internal explode error.'); // @codeCoverageIgnore } $left = $split[0]; - $left = \str_replace($thousands, '', $left); + $left = str_replace($thousands, '', $left); $right = ''; if (\count($split) > 1) { $right = $split[1]; } - $right = \substr($right, 0, self::MAX_DECIMALS); + $right = substr($right, 0, self::MAX_DECIMALS); if ($right === false) { throw new \Exception('Internal substr error.'); // @codeCoverageIgnore } - return ((int) $left) * 10 ** self::MAX_DECIMALS + (int) \str_pad($right, self::MAX_DECIMALS, '0'); + return ((int) $left) * 10 ** self::MAX_DECIMALS + (int) str_pad($right, self::MAX_DECIMALS, '0'); } /** @@ -159,26 +159,26 @@ class FloatInt implements \Serializable $isNegative = $this->value < 0 ? 1 : 0; $value = $this->value === 0 - ? \str_repeat('0', self::MAX_DECIMALS) - : (string) \round($this->value, -self::MAX_DECIMALS + $decimals); + ? str_repeat('0', self::MAX_DECIMALS) + : (string) round($this->value, -self::MAX_DECIMALS + $decimals); - $left = \substr($value, 0, -self::MAX_DECIMALS + $isNegative); + $left = substr($value, 0, -self::MAX_DECIMALS + $isNegative); /** @var string $left */ $left = $left === false ? '0' : $left; - $right = \substr($value, -self::MAX_DECIMALS + $isNegative); + $right = substr($value, -self::MAX_DECIMALS + $isNegative); if ($right === false) { throw new \Exception(); // @codeCoverageIgnore } if ($decimals === null) { - $decimals = \strlen(\rtrim($right, '0')); + $decimals = \strlen(rtrim($right, '0')); } return $decimals > 0 - ? \number_format((float) $left, 0, $this->decimal, $this->thousands) . $this->decimal . \substr($right, 0, $decimals) - : \str_pad($left, 1, '0'); + ? number_format((float) $left, 0, $this->decimal, $this->thousands) . $this->decimal . substr($right, 0, $decimals) + : str_pad($left, 1, '0'); } /** @@ -278,7 +278,7 @@ class FloatInt implements \Serializable */ public function abs() : self { - $this->value = \abs($this->value); + $this->value = abs($this->value); return $this; } diff --git a/Stdlib/Base/Heap.php b/Stdlib/Base/Heap.php index 0e07474b7..13d8948c9 100644 --- a/Stdlib/Base/Heap.php +++ b/Stdlib/Base/Heap.php @@ -77,7 +77,7 @@ class Heap } } - \array_splice($this->nodes, $lo, 0, [$x]); + array_splice($this->nodes, $lo, 0, [$x]); } /** @@ -104,7 +104,7 @@ class Heap */ public function pop() : mixed { - $last = \array_pop($this->nodes); + $last = array_pop($this->nodes); if (empty($this->nodes)) { return $last; } @@ -140,7 +140,7 @@ class Heap public function contains(mixed $item) : bool { foreach ($this->nodes as $key => $node) { - if (\is_scalar($item)) { + if (is_scalar($item)) { if ($node === $item) { return true; } @@ -252,9 +252,9 @@ class Heap public function getNLargest(int $n) : array { $nodes = $this->nodes; - \uasort($nodes, $this->compare); + uasort($nodes, $this->compare); - return \array_slice(\array_reverse($nodes), 0, $n); + return \array_slice(array_reverse($nodes), 0, $n); } /** @@ -269,7 +269,7 @@ class Heap public function getNSmallest(int $n) : array { $nodes = $this->nodes; - \uasort($nodes, $this->compare); + uasort($nodes, $this->compare); return \array_slice($nodes, 0, $n); } diff --git a/Stdlib/Base/Iban.php b/Stdlib/Base/Iban.php index 1da21006c..bd412264b 100644 --- a/Stdlib/Base/Iban.php +++ b/Stdlib/Base/Iban.php @@ -75,7 +75,7 @@ class Iban implements \Serializable */ public static function normalize(string $iban) : string { - return \strtoupper(\str_replace(' ', '', $iban)); + return strtoupper(str_replace(' ', '', $iban)); } /** @@ -114,15 +114,15 @@ class Iban implements \Serializable private function getSequence(string $sequence) : string { $country = $this->getCountry(); - $layout = \str_replace(' ', '', IbanEnum::getByName('C_' . $country)); - $start = \stripos($layout, $sequence); - $end = \strrpos($layout, $sequence); + $layout = str_replace(' ', '', IbanEnum::getByName('C_' . $country)); + $start = stripos($layout, $sequence); + $end = strrpos($layout, $sequence); if ($start === false || $end === false) { return ''; } - $sequence = \substr($this->iban, $start, $end - $start + 1); + $sequence = substr($this->iban, $start, $end - $start + 1); return $sequence === false ? '' : $sequence; } @@ -136,7 +136,7 @@ class Iban implements \Serializable */ public function getCountry() : string { - $country = \substr($this->iban, 0, 2); + $country = substr($this->iban, 0, 2); return $country === false ? '?' : $country; } @@ -268,7 +268,7 @@ class Iban implements \Serializable */ public function prettyPrint() : string { - return \wordwrap($this->iban, 4, ' ', true); + return wordwrap($this->iban, 4, ' ', true); } /** diff --git a/Stdlib/Base/Location.php b/Stdlib/Base/Location.php index 3bf5c7ed8..5bdbd7fcc 100644 --- a/Stdlib/Base/Location.php +++ b/Stdlib/Base/Location.php @@ -185,7 +185,7 @@ class Location implements \JsonSerializable, \Serializable */ public function serialize() : string { - return (string) \json_encode($this->jsonSerialize()); + return (string) json_encode($this->jsonSerialize()); } /** @@ -216,7 +216,7 @@ class Location implements \JsonSerializable, \Serializable */ public function unserialize($serialized) : void { - $data = \json_decode($serialized, true); + $data = json_decode($serialized, true); $this->postal = $data['postal']; $this->city = $data['city']; diff --git a/Stdlib/Base/SmartDateTime.php b/Stdlib/Base/SmartDateTime.php index bb23bc7d6..4276d1ca2 100644 --- a/Stdlib/Base/SmartDateTime.php +++ b/Stdlib/Base/SmartDateTime.php @@ -55,9 +55,9 @@ class SmartDateTime extends \DateTime */ public function __construct(string $datetime = 'now', DateTimeZone $timezone = null) { - $parsed = \str_replace( + $parsed = str_replace( ['Y', 'm', 'd'], - [\date('Y'), \date('m'), \date('d')], + [date('Y'), date('m'), date('d')], $datetime ); @@ -112,13 +112,13 @@ class SmartDateTime extends \DateTime */ public function smartModify(int $y, int $m = 0, int $d = 0, int $calendar = \CAL_GREGORIAN) : self { - $yearChange = (int) \floor(((int) $this->format('m') - 1 + $m) / 12); + $yearChange = (int) floor(((int) $this->format('m') - 1 + $m) / 12); $yearChange = ((int) $this->format('m') - 1 + $m) < 0 && ((int) $this->format('m') - 1 + $m) % 12 === 0 ? $yearChange - 1 : $yearChange; $yearNew = (int) $this->format('Y') + $y + $yearChange; $monthNew = ((int) $this->format('m') + $m) % 12; $monthNew = $monthNew === 0 ? 12 : ($monthNew < 0 ? 12 + $monthNew : $monthNew); - $dayMonthOld = \cal_days_in_month($calendar, (int) $this->format('m'), (int) $this->format('Y')); - $dayMonthNew = \cal_days_in_month($calendar, $monthNew, $yearNew); + $dayMonthOld = cal_days_in_month($calendar, (int) $this->format('m'), (int) $this->format('Y')); + $dayMonthNew = cal_days_in_month($calendar, $monthNew, $yearNew); $dayOld = (int) $this->format('d'); if ($dayOld > $dayMonthNew) { @@ -171,9 +171,9 @@ class SmartDateTime extends \DateTime */ public function getStartOfWeek() : self { - $w = (int) \strtotime('-' . \date('w', $this->getTimestamp()) .' days', $this->getTimestamp()); + $w = (int) strtotime('-' . date('w', $this->getTimestamp()) .' days', $this->getTimestamp()); - return new self(\date('Y-m-d', $w)); + return new self(date('Y-m-d', $w)); } /** @@ -185,9 +185,9 @@ class SmartDateTime extends \DateTime */ public function getEndOfWeek() : self { - $w = (int) \strtotime('+' . (6 - (int) \date('w', $this->getTimestamp())) .' days', $this->getTimestamp()); + $w = (int) strtotime('+' . (6 - (int) date('w', $this->getTimestamp())) .' days', $this->getTimestamp()); - return new self(\date('Y-m-d', $w)); + return new self(date('Y-m-d', $w)); } /** @@ -211,13 +211,13 @@ class SmartDateTime extends \DateTime */ public function getFirstDayOfMonth() : int { - $time = \mktime(0, 0, 0, (int) $this->format('m'), 1, (int) $this->format('Y')); + $time = mktime(0, 0, 0, (int) $this->format('m'), 1, (int) $this->format('Y')); if ($time === false) { return -1; // @codeCoverageIgnore } - return \getdate($time)['wday']; + return getdate($time)['wday']; } /** @@ -229,7 +229,7 @@ class SmartDateTime extends \DateTime */ public function getEndOfDay() : self { - return new self(\date('Y-m-d', $this->getTimestamp()) . ' 23:59:59'); + return new self(date('Y-m-d', $this->getTimestamp()) . ' 23:59:59'); } /** @@ -241,7 +241,7 @@ class SmartDateTime extends \DateTime */ public function getStartOfDay() : self { - return new self(\date('Y-m-d', $this->getTimestamp()) . ' 00:00:00'); + return new self(date('Y-m-d', $this->getTimestamp()) . ' 00:00:00'); } /** @@ -297,13 +297,13 @@ class SmartDateTime extends \DateTime */ public static function dayOfWeek(int $y, int $m, int $d) : int { - $time = \strtotime($d . '-' . $m . '-' . $y); + $time = strtotime($d . '-' . $m . '-' . $y); if ($time === false) { return -1; } - return (int) \date('w', $time); + return (int) date('w', $time); } /** diff --git a/Stdlib/Graph/Graph.php b/Stdlib/Graph/Graph.php index 9c356443c..efdb2719b 100644 --- a/Stdlib/Graph/Graph.php +++ b/Stdlib/Graph/Graph.php @@ -280,13 +280,13 @@ class Graph $this->bridgesDepthFirstSearch($neighbor, $visited, $discovery, $low, $parent, $index, $bridges); - $low[$id] = \min($low[$id], $low[$neighbor->getId()]); + $low[$id] = min($low[$id], $low[$neighbor->getId()]); if ($low[$neighbor->getId()] > $discovery[$id]) { $bridges[] = $edge; } } elseif (isset($parent[$id]) && !$neighbor->isEqual($parent[$id])) { - $low[$id] = \min($low[$id], $discovery[$neighbor->getId()]); + $low[$id] = min($low[$id], $discovery[$neighbor->getId()]); } } } @@ -303,7 +303,7 @@ class Graph $graph = new self(); $edges = $this->getEdges(); - \usort($edges, Edge::class . '::compare'); + usort($edges, Edge::class . '::compare'); foreach ($edges as $edge) { if ($graph->hasNode($edge->getNode1()->getId()) @@ -519,7 +519,7 @@ class Graph if (!isset($visited[$neighbor->getId()]) || !$visited[$neighbor->getId()]) { $path[] = $neighbor; $this->depthFirstTraversal($neighbor, $node2, $visited, $path, $paths); - \array_pop($path); + array_pop($path); } } @@ -553,7 +553,7 @@ class Graph $stack = [$node1]; while (!empty($stack)) { - $cNode = \array_pop($stack); + $cNode = array_pop($stack); if (isset($visited[$cNode->getId()]) && $visited[$cNode->getId()] === true) { continue; } @@ -695,10 +695,10 @@ class Graph } } - if (\array_sum($edges) > 0.0) { - \arsort($edges); + if (array_sum($edges) > 0.0) { + arsort($edges); - return $paths[\array_key_first($edges)]; + return $paths[array_key_first($edges)]; } return $paths[$mostNodes]; @@ -751,10 +751,10 @@ class Graph } } - if (\array_sum($edges) > 0.0) { - \asort($edges); + if (array_sum($edges) > 0.0) { + asort($edges); - return $paths[\array_key_first($edges)]; + return $paths[array_key_first($edges)]; } return $paths[$leastNodes]; @@ -810,7 +810,7 @@ class Graph } /** @var int $diameter */ - $diameter = \max($diameter, $this->getFloydWarshallShortestPath()); + $diameter = max($diameter, $this->getFloydWarshallShortestPath()); } } @@ -879,7 +879,7 @@ class Graph return true; } - $nodes = $this->findAllReachableNodesDFS(\reset($this->nodes)); + $nodes = $this->findAllReachableNodesDFS(reset($this->nodes)); return \count($nodes) === \count($this->nodes); } diff --git a/Stdlib/Map/MultiMap.php b/Stdlib/Map/MultiMap.php index 31919efde..5887df0be 100644 --- a/Stdlib/Map/MultiMap.php +++ b/Stdlib/Map/MultiMap.php @@ -90,7 +90,7 @@ final class MultiMap implements \Countable $keysBuild = $keys; if ($this->keyType !== KeyType::SINGLE) { - $keysBuild = [\implode(':', $keysBuild)]; + $keysBuild = [implode(':', $keysBuild)]; // prevent adding elements if keys are just ordered differently if ($this->orderType === OrderType::LOOSE) { @@ -98,7 +98,7 @@ final class MultiMap implements \Countable $keysToTest = Permutation::permut($keys, [], false); foreach ($keysToTest as $test) { - $key = \implode(':', $test); + $key = implode(':', $test); if (isset($this->keys[$key])) { if (!$overwrite) { @@ -222,14 +222,14 @@ final class MultiMap implements \Countable $keys = Permutation::permut($key, [], false); foreach ($keys as $key => $value) { - $key = \implode(':', $value); + $key = implode(':', $value); if (isset($this->keys[$key])) { return $this->values[$this->keys[$key]]; } } } else { - $key = \implode(':', $key); + $key = implode(':', $key); } } @@ -276,7 +276,7 @@ final class MultiMap implements \Countable $permutation = Permutation::permut($key, [], false); foreach ($permutation as $permut) { - if ($this->setSingle(\implode(':', $permut), $value)) { + if ($this->setSingle(implode(':', $permut), $value)) { return true; } } @@ -284,7 +284,7 @@ final class MultiMap implements \Countable return false; } - return $this->setSingle(\implode(':', $key), $value); + return $this->setSingle(implode(':', $key), $value); } /** @@ -340,7 +340,7 @@ final class MultiMap implements \Countable $key = \is_array($key) ? $key : [$key]; if ($this->orderType !== OrderType::LOOSE) { - return $this->removeSingle(\implode(':', $key)); + return $this->removeSingle(implode(':', $key)); } /** @var array $keys */ @@ -348,7 +348,7 @@ final class MultiMap implements \Countable $found = false; foreach ($keys as $key => $value) { - $allFound = $this->removeSingle(\implode(':', $value)); + $allFound = $this->removeSingle(implode(':', $value)); if ($allFound) { $found = true; diff --git a/Stdlib/Queue/PriorityQueue.php b/Stdlib/Queue/PriorityQueue.php index 7e9375fdc..f876f8405 100644 --- a/Stdlib/Queue/PriorityQueue.php +++ b/Stdlib/Queue/PriorityQueue.php @@ -83,7 +83,7 @@ class PriorityQueue implements \Countable, \Serializable public function insert(mixed $data, float $priority = 1.0) : int { do { - $key = \mt_rand(); + $key = mt_rand(); } while (isset($this->queue[$key])); if (\count($this->queue) === 0) { @@ -225,7 +225,7 @@ class PriorityQueue implements \Countable, \Serializable */ public function pop() : array { - return \array_pop($this->queue) ?? []; + return array_pop($this->queue) ?? []; } /** @@ -315,7 +315,7 @@ class PriorityQueue implements \Countable, \Serializable */ public function serialize() : string { - return (string) \json_encode($this->queue); + return (string) json_encode($this->queue); } /** @@ -329,6 +329,6 @@ class PriorityQueue implements \Countable, \Serializable */ public function unserialize($data) : void { - $this->queue = \json_decode($data, true); + $this->queue = json_decode($data, true); } } diff --git a/System/File/FileUtils.php b/System/File/FileUtils.php index bd197c59d..0a88e45c0 100644 --- a/System/File/FileUtils.php +++ b/System/File/FileUtils.php @@ -69,7 +69,7 @@ final class FileUtils */ public static function getExtensionType(string $extension) : int { - $extension = \strtolower($extension); + $extension = strtolower($extension); if (\in_array($extension, self::CODE_EXTENSION)) { return ExtensionType::CODE; @@ -109,16 +109,16 @@ final class FileUtils */ public static function absolute(string $origPath) : string { - if (\file_exists($origPath) !== false) { - $path = \realpath($origPath); + if (file_exists($origPath) !== false) { + $path = realpath($origPath); return $path === false ? '' : $path; } - $startsWithSlash = \strpos($origPath, '/') === 0 || \strpos($origPath, '\\') === 0 ? '/' : ''; + $startsWithSlash = strpos($origPath, '/') === 0 || strpos($origPath, '\\') === 0 ? '/' : ''; $path = []; - $parts = \explode('/', $origPath); + $parts = explode('/', $origPath); foreach ($parts as $part) { if (empty($part) || $part === '.') { @@ -128,13 +128,13 @@ final class FileUtils if ($part !== '..' || empty($path)) { $path[] = $part; } elseif (!empty($path)) { - \array_pop($path); + array_pop($path); } else { throw new PathException($origPath); // @codeCoverageIgnore } } - return $startsWithSlash . \implode('/', $path); + return $startsWithSlash . implode('/', $path); } /** @@ -151,14 +151,14 @@ final class FileUtils */ public static function changeFileEncoding(string $input, string $output, string $outputEncoding, string $inputEncoding = '') : void { - $content = \file_get_contents($input); + $content = file_get_contents($input); if ($content === false) { return; // @codeCoverageIgnore } - $detected = empty($inputEncoding) ? \mb_detect_encoding($content) : $inputEncoding; - \file_put_contents($output, \mb_convert_encoding($content, $outputEncoding, $detected === false ? \mb_list_encodings() : $detected)); + $detected = empty($inputEncoding) ? mb_detect_encoding($content) : $inputEncoding; + file_put_contents($output, mb_convert_encoding($content, $outputEncoding, $detected === false ? mb_list_encodings() : $detected)); } /** @@ -209,7 +209,7 @@ final class FileUtils $ret = ['dirname' => '', 'basename' => '', 'extension' => '', 'filename' => '']; $pathinfo = []; - if (\preg_match('#^(.*?)[\\\\/]*(([^/\\\\]*?)(\.([^.\\\\/]+?)|))[\\\\/.]*$#m', $path, $pathinfo)) { + if (preg_match('#^(.*?)[\\\\/]*(([^/\\\\]*?)(\.([^.\\\\/]+?)|))[\\\\/.]*$#m', $path, $pathinfo)) { if (isset($pathinfo[1])) { $ret['dirname'] = $pathinfo[1]; } @@ -253,9 +253,9 @@ final class FileUtils */ public static function isAccessible(string $path) : bool { - $readable = \is_file($path); - if (\strpos($path, '\\\\') !== 0) { - $readable = $readable && \is_readable($path); + $readable = is_file($path); + if (strpos($path, '\\\\') !== 0) { + $readable = $readable && is_readable($path); } return self::isPermittedPath($path) && $readable; @@ -272,6 +272,6 @@ final class FileUtils */ public static function isPermittedPath(string $path) : bool { - return !\preg_match('#^[a-z]+://#i', $path); + return !preg_match('#^[a-z]+://#i', $path); } } diff --git a/System/File/Ftp/Directory.php b/System/File/Ftp/Directory.php index f8b52bfe1..7aff73c91 100644 --- a/System/File/Ftp/Directory.php +++ b/System/File/Ftp/Directory.php @@ -61,16 +61,16 @@ class Directory extends FileAbstract implements DirectoryInterface */ public static function ftpConnect(HttpUri $http) : mixed { - $con = \ftp_connect($http->host, $http->port, 10); + $con = ftp_connect($http->host, $http->port, 10); if ($con === false) { return false; } - \ftp_login($con, $http->user, $http->pass); + ftp_login($con, $http->user, $http->pass); if ($http->getPath() !== '') { - @\ftp_chdir($con, $http->getPath()); + @ftp_chdir($con, $http->getPath()); } return $con; @@ -91,7 +91,7 @@ class Directory extends FileAbstract implements DirectoryInterface $this->uri = $uri; $this->con = $con ?? self::ftpConnect($uri); - $this->filter = \ltrim($filter, '\\/'); + $this->filter = ltrim($filter, '\\/'); parent::__construct($uri->getPath()); if ($initialize && self::exists($this->con, $this->path)) { @@ -114,11 +114,11 @@ class Directory extends FileAbstract implements DirectoryInterface $list = self::list($this->con, $this->path); foreach ($list as $filename) { - if (!StringUtils::endsWith(\trim($filename), '.')) { + if (!StringUtils::endsWith(trim($filename), '.')) { $uri = clone $this->uri; $uri->setPath($filename); - $file = \ftp_size($this->con, $filename) === -1 ? new self($uri, '*', false, $this->con) : new File($uri, $this->con); + $file = ftp_size($this->con, $filename) === -1 ? new self($uri, '*', false, $this->con) : new File($uri, $this->con); $this->addNode($file); } @@ -144,15 +144,15 @@ class Directory extends FileAbstract implements DirectoryInterface } $list = []; - $path = \rtrim($path, '\\/'); + $path = rtrim($path, '\\/'); $detailed = self::parseRawList($con, $path); foreach ($detailed as $key => $item) { if ($item['type'] === 'dir' && $recursive) { - $list = \array_merge($list, self::list($con, $key, $filter, $recursive)); + $list = array_merge($list, self::list($con, $key, $filter, $recursive)); } - if ($filter !== '*' && \preg_match($filter, $key) !== 1) { + if ($filter !== '*' && preg_match($filter, $key) !== 1) { continue; } @@ -189,7 +189,7 @@ class Directory extends FileAbstract implements DirectoryInterface return false; } - $parts = \explode('/', $path); + $parts = explode('/', $path); if ($parts[0] === '') { $parts[0] = '/'; } @@ -205,11 +205,11 @@ class Directory extends FileAbstract implements DirectoryInterface return false; } - \ftp_mkdir($con, $part); - \ftp_chmod($con, $permission, $part); + ftp_mkdir($con, $part); + ftp_chmod($con, $permission, $part); } - \ftp_chdir($con, $part); + ftp_chdir($con, $part); } return self::exists($con, $path); @@ -235,7 +235,7 @@ class Directory extends FileAbstract implements DirectoryInterface if ($filename['type'] === 'dir' && $recursive) { $countSize += self::size($con, $key, $recursive); } elseif ($filename['type'] === 'file') { - $countSize += \ftp_size($con, $key); + $countSize += ftp_size($con, $key); } } @@ -277,7 +277,7 @@ class Directory extends FileAbstract implements DirectoryInterface */ public static function delete($con, string $path) : bool { - $path = \rtrim($path, '\\/'); + $path = rtrim($path, '\\/'); if (!self::exists($con, $path)) { return false; @@ -293,7 +293,7 @@ class Directory extends FileAbstract implements DirectoryInterface } } - return \ftp_rmdir($con, $path); + return ftp_rmdir($con, $path); } /** @@ -322,7 +322,7 @@ class Directory extends FileAbstract implements DirectoryInterface } $changed = new \DateTime(); - $time = \ftp_mdtm($con, $path); + $time = ftp_mdtm($con, $path); $changed->setTimestamp($time === false ? 0 : $time); @@ -353,8 +353,8 @@ class Directory extends FileAbstract implements DirectoryInterface */ public static function parseRawList($con, string $path) : array { - $listData = \ftp_rawlist($con, $path); - $names = \ftp_nlist($con, $path); + $listData = ftp_rawlist($con, $path); + $names = ftp_nlist($con, $path); $data = []; if ($names === false || $listData === false) { @@ -362,7 +362,7 @@ class Directory extends FileAbstract implements DirectoryInterface } foreach ($listData as $key => $item) { - $chunks = \preg_split("/\s+/", $item); + $chunks = preg_split("/\s+/", $item); if ($chunks === false) { continue; @@ -379,7 +379,7 @@ class Directory extends FileAbstract implements DirectoryInterface $e['time'] ) = $chunks; - $e['permission'] = FileUtils::permissionToOctal(\substr($e['permission'], 1)); + $e['permission'] = FileUtils::permissionToOctal(substr($e['permission'], 1)); $e['type'] = $chunks[0][0] === 'd' ? 'dir' : 'file'; $data[$names[$key]] = $e; @@ -412,15 +412,15 @@ class Directory extends FileAbstract implements DirectoryInterface return false; } - $tempName = 'temp' . \mt_rand(); - \mkdir($tempName); + $tempName = 'temp' . mt_rand(); + mkdir($tempName); $download = self::get($con, $from, $tempName . '/' . self::name($from)); if (!$download) { return false; } - $upload = self::put($con, \realpath($tempName) . '/' . self::name($from), $to); + $upload = self::put($con, realpath($tempName) . '/' . self::name($from), $to); if (!$upload) { return false; @@ -448,8 +448,8 @@ class Directory extends FileAbstract implements DirectoryInterface return false; } - if (!\is_dir($to)) { - \mkdir($to); + if (!is_dir($to)) { + mkdir($to); } $list = self::parseRawList($con, $from); @@ -457,11 +457,11 @@ class Directory extends FileAbstract implements DirectoryInterface if ($item['type'] === 'dir') { self::get($con, $key, $to . '/' . self::name($key)); } else { - \file_put_contents($to . '/' . self::name($key), File::get($con, $key)); + file_put_contents($to . '/' . self::name($key), File::get($con, $key)); } } - return \is_dir($to); + return is_dir($to); } /** @@ -477,7 +477,7 @@ class Directory extends FileAbstract implements DirectoryInterface */ public static function put($con, string $from, string $to) : bool { - if (!\is_dir($from)) { + if (!is_dir($from)) { return false; } @@ -485,7 +485,7 @@ class Directory extends FileAbstract implements DirectoryInterface self::create($con, $to, 0755, true); } - $list = \scandir($from); + $list = scandir($from); if ($list === false) { return false; } @@ -495,12 +495,12 @@ class Directory extends FileAbstract implements DirectoryInterface continue; } - $item = $from . '/' . \ltrim($item, '/'); + $item = $from . '/' . ltrim($item, '/'); - if (\is_dir($item)) { + if (is_dir($item)) { self::put($con, $item, $to . '/' . self::name($item)); } else { - $content = \file_get_contents($item); + $content = file_get_contents($item); if ($content !== false) { File::put($con, $to . '/' . self::name($item), $content); @@ -551,7 +551,7 @@ class Directory extends FileAbstract implements DirectoryInterface */ public static function sanitize(string $path, string $replace = '', string $invalid = '/[^\w\s\d\.\-_~,;:\[\]\(\]\/]/') : string { - return \preg_replace($invalid, $replace, $path) ?? ''; + return preg_replace($invalid, $replace, $path) ?? ''; } /** @@ -559,7 +559,7 @@ class Directory extends FileAbstract implements DirectoryInterface */ public static function dirname(string $path) : string { - return \basename($path); + return basename($path); } /** @@ -575,7 +575,7 @@ class Directory extends FileAbstract implements DirectoryInterface */ public static function name(string $path) : string { - return \basename($path); + return basename($path); } /** @@ -583,7 +583,7 @@ class Directory extends FileAbstract implements DirectoryInterface */ public static function basename(string $path) : string { - return \basename($path); + return basename($path); } /** @@ -667,7 +667,7 @@ class Directory extends FileAbstract implements DirectoryInterface */ public function rewind() : void { - \reset($this->nodes); + reset($this->nodes); } /** @@ -675,7 +675,7 @@ class Directory extends FileAbstract implements DirectoryInterface */ public function current() : ContainerInterface { - $current = \current($this->nodes); + $current = current($this->nodes); if ($current instanceof self) { $current->index(); } @@ -688,7 +688,7 @@ class Directory extends FileAbstract implements DirectoryInterface */ public function key() : ?string { - return \key($this->nodes); + return key($this->nodes); } /** @@ -696,7 +696,7 @@ class Directory extends FileAbstract implements DirectoryInterface */ public function next() : void { - $next = \next($this->nodes); + $next = next($this->nodes); if ($next instanceof self) { $next->index(); } @@ -707,7 +707,7 @@ class Directory extends FileAbstract implements DirectoryInterface */ public function valid() : bool { - $key = \key($this->nodes); + $key = key($this->nodes); return ($key !== null && $key !== false); } @@ -773,7 +773,7 @@ class Directory extends FileAbstract implements DirectoryInterface public function isExisting(string $name = null) : bool { if ($name === null) { - return \is_dir($this->path); + return is_dir($this->path); } $name = isset($this->nodes[$name]) ? $name : $this->path . '/' . $name; @@ -790,7 +790,7 @@ class Directory extends FileAbstract implements DirectoryInterface $content = []; foreach ($this->nodes as $node) { - $content[] = \substr($node->getPath(), $pathLength + 1); + $content[] = substr($node->getPath(), $pathLength + 1); } return $content; @@ -812,16 +812,16 @@ class Directory extends FileAbstract implements DirectoryInterface public static function listByExtension($con, string $path, string $extension = '', string $exclude = '', bool $recursive = false) : array { $list = []; - $path = \rtrim($path, '\\/'); + $path = rtrim($path, '\\/'); - if (!\is_dir($path)) { + if (!is_dir($path)) { return $list; } $files = self::list($con, $path, empty($extension) ? '*' : '/.*\.' . $extension . '$/', $recursive); foreach ($files as $file) { - if (!empty($exclude) && \preg_match('/' . $exclude . '/', $file) === 1) { + if (!empty($exclude) && preg_match('/' . $exclude . '/', $file) === 1) { continue; } diff --git a/System/File/Ftp/File.php b/System/File/Ftp/File.php index a2341b1d3..e50940aa4 100644 --- a/System/File/Ftp/File.php +++ b/System/File/Ftp/File.php @@ -63,7 +63,7 @@ class File extends FileAbstract implements FileInterface { parent::index(); - $this->size = (int) \ftp_size($this->con, $this->path); + $this->size = (int) ftp_size($this->con, $this->path); } /** @@ -77,16 +77,16 @@ class File extends FileAbstract implements FileInterface */ public static function ftpConnect(HttpUri $http) : mixed { - $con = \ftp_connect($http->host, $http->port, 10); + $con = ftp_connect($http->host, $http->port, 10); if ($con === false) { return false; } - \ftp_login($con, $http->user, $http->pass); + ftp_login($con, $http->user, $http->pass); if ($http->getPath() !== '') { - @\ftp_chdir($con, $http->getPath()); + @ftp_chdir($con, $http->getPath()); } return $con; @@ -102,7 +102,7 @@ class File extends FileAbstract implements FileInterface } $parent = LocalDirectory::parent($path); - $list = \ftp_nlist($con, $parent === '' ? '/' : $parent); + $list = ftp_nlist($con, $parent === '' ? '/' : $parent); if ($list === false) { return false; @@ -130,22 +130,22 @@ class File extends FileAbstract implements FileInterface || (ContentPutMode::hasFlag($mode, ContentPutMode::REPLACE) && $exists) || (!$exists && ContentPutMode::hasFlag($mode, ContentPutMode::CREATE)) ) { - $tmpFile = 'file' . \mt_rand(); + $tmpFile = 'file' . mt_rand(); if (ContentPutMode::hasFlag($mode, ContentPutMode::APPEND) && $exists) { - \file_put_contents($tmpFile, self::get($con, $path) . $content); + file_put_contents($tmpFile, self::get($con, $path) . $content); } elseif (ContentPutMode::hasFlag($mode, ContentPutMode::PREPEND) && $exists) { - \file_put_contents($tmpFile, $content . self::get($con, $path)); + file_put_contents($tmpFile, $content . self::get($con, $path)); } else { if (!Directory::exists($con, \dirname($path))) { Directory::create($con, \dirname($path), 0755, true); } - \file_put_contents($tmpFile, $content); + file_put_contents($tmpFile, $content); } - \ftp_put($con, $path, $tmpFile, \FTP_BINARY); - \ftp_chmod($con, 0755, $path); - \unlink($tmpFile); + ftp_put($con, $path, $tmpFile, \FTP_BINARY); + ftp_chmod($con, 0755, $path); + unlink($tmpFile); return true; } @@ -162,15 +162,15 @@ class File extends FileAbstract implements FileInterface throw new PathException($path); } - $fp = \fopen('php://temp', 'r+'); + $fp = fopen('php://temp', 'r+'); if ($fp === false) { return ''; } $content = ''; - if (\ftp_fget($con, $fp, $path, \FTP_BINARY, 0)) { - \rewind($fp); - $content = \stream_get_contents($fp); + if (ftp_fget($con, $fp, $path, \FTP_BINARY, 0)) { + rewind($fp); + $content = stream_get_contents($fp); } return $content === false ? '' : $content; @@ -242,7 +242,7 @@ class File extends FileAbstract implements FileInterface } $changed = new \DateTime(); - $time = \ftp_mdtm($con, $path); + $time = ftp_mdtm($con, $path); $changed->setTimestamp($time === false ? 0 : $time); @@ -258,7 +258,7 @@ class File extends FileAbstract implements FileInterface return -1; } - return \ftp_size($con, $path); + return ftp_size($con, $path); } /** @@ -359,7 +359,7 @@ class File extends FileAbstract implements FileInterface return false; } - return \ftp_delete($con, $path); + return ftp_delete($con, $path); } /** @@ -557,7 +557,7 @@ class File extends FileAbstract implements FileInterface */ public function getName() : string { - return \explode('.', $this->name)[0]; + return explode('.', $this->name)[0]; } /** @@ -565,7 +565,7 @@ class File extends FileAbstract implements FileInterface */ public function getExtension() : string { - $extension = \explode('.', $this->name); + $extension = explode('.', $this->name); return $extension[1] ?? ''; } @@ -579,7 +579,7 @@ class File extends FileAbstract implements FileInterface */ public function getDirName() : string { - return \basename(\dirname($this->path)); + return basename(\dirname($this->path)); } /** diff --git a/System/File/Ftp/FileAbstract.php b/System/File/Ftp/FileAbstract.php index e74cb5458..67b3062d9 100644 --- a/System/File/Ftp/FileAbstract.php +++ b/System/File/Ftp/FileAbstract.php @@ -125,8 +125,8 @@ abstract class FileAbstract implements FtpContainerInterface */ public function __construct(string $path) { - $this->path = \rtrim($path, '/\\'); - $this->name = \basename($path); + $this->path = rtrim($path, '/\\'); + $this->name = basename($path); $this->createdAt = new \DateTimeImmutable('now'); $this->changedAt = new \DateTime('now'); @@ -161,7 +161,7 @@ abstract class FileAbstract implements FtpContainerInterface */ public function getBasename() : string { - return \basename($this->path); + return basename($this->path); } /** @@ -209,16 +209,16 @@ abstract class FileAbstract implements FtpContainerInterface */ public function index() : void { - $mtime = \ftp_mdtm($this->con, $this->path); - $ctime = \ftp_mdtm($this->con, $this->path); + $mtime = ftp_mdtm($this->con, $this->path); + $ctime = ftp_mdtm($this->con, $this->path); $this->createdAt = (new \DateTimeImmutable())->setTimestamp($mtime === false ? 0 : $mtime); $this->changedAt->setTimestamp($ctime === false ? 0 : $ctime); - $owner = \fileowner($this->path); + $owner = fileowner($this->path); $this->owner = $owner === false ? 0 : $owner; - $this->permission = (int) \substr(\sprintf('%o', \fileperms($this->path)), -4); + $this->permission = (int) substr(sprintf('%o', fileperms($this->path)), -4); $this->isInitialized = true; } diff --git a/System/File/Ftp/FtpStorage.php b/System/File/Ftp/FtpStorage.php index 1d36f0f0e..795e4267d 100644 --- a/System/File/Ftp/FtpStorage.php +++ b/System/File/Ftp/FtpStorage.php @@ -56,7 +56,7 @@ class FtpStorage extends StorageAbstract */ protected static function getClassType(string $path) : string { - return \ftp_size(self::$con, $path) === -1 && \stripos($path, '.') === false + return ftp_size(self::$con, $path) === -1 && stripos($path, '.') === false ? Directory::class : File::class; } @@ -90,7 +90,7 @@ class FtpStorage extends StorageAbstract */ public static function create(string $path) : bool { - return \stripos($path, '.') === false + return stripos($path, '.') === false ? Directory::create(self::$con, $path, 0755, true) : File::create(self::$con, $path); } diff --git a/System/File/Local/Directory.php b/System/File/Local/Directory.php index 0ab3b747a..0baed3ced 100644 --- a/System/File/Local/Directory.php +++ b/System/File/Local/Directory.php @@ -58,10 +58,10 @@ final class Directory extends FileAbstract implements DirectoryInterface */ public function __construct(string $path, string $filter = '*', bool $initialize = true) { - $this->filter = \ltrim($filter, '\\/'); + $this->filter = ltrim($filter, '\\/'); parent::__construct($path); - if ($initialize && \is_dir($this->path)) { + if ($initialize && is_dir($this->path)) { $this->index(); } } @@ -79,12 +79,12 @@ final class Directory extends FileAbstract implements DirectoryInterface */ public static function list(string $path, string $filter = '*', bool $recursive = false) : array { - if (!\is_dir($path)) { + if (!is_dir($path)) { return []; } $list = []; - $path = \rtrim($path, '\\/'); + $path = rtrim($path, '\\/'); $iterator = $recursive ? new \RecursiveIteratorIterator( @@ -101,7 +101,7 @@ final class Directory extends FileAbstract implements DirectoryInterface continue; } - $list[] = \substr(\str_replace('\\', '/', $iterator->getPathname()), \strlen($path) + 1); + $list[] = substr(str_replace('\\', '/', $iterator->getPathname()), \strlen($path) + 1); } /** @var string[] $list */ @@ -123,9 +123,9 @@ final class Directory extends FileAbstract implements DirectoryInterface public static function listByExtension(string $path, string $extension = '', string $exclude = '', bool $recursive = true) : array { $list = []; - $path = \rtrim($path, '\\/'); + $path = rtrim($path, '\\/'); - if (!\is_dir($path)) { + if (!is_dir($path)) { return $list; } @@ -140,12 +140,12 @@ final class Directory extends FileAbstract implements DirectoryInterface continue; } - $subPath = \substr($iterator->getPathname(), \strlen($path) + 1); + $subPath = substr($iterator->getPathname(), \strlen($path) + 1); if ((empty($extension) || $item->getExtension() === $extension) - && (empty($exclude) || (!(bool) \preg_match('/' . $exclude . '/', $subPath))) + && (empty($exclude) || (!(bool) preg_match('/' . $exclude . '/', $subPath))) ) { - $list[] = \str_replace('\\', '/', $subPath); + $list[] = str_replace('\\', '/', $subPath); } } @@ -163,14 +163,14 @@ final class Directory extends FileAbstract implements DirectoryInterface parent::index(); - $files = \glob($this->path . \DIRECTORY_SEPARATOR . $this->filter); + $files = glob($this->path . \DIRECTORY_SEPARATOR . $this->filter); if ($files === false) { return; } foreach ($files as $filename) { - if (!StringUtils::endsWith(\trim($filename), '.')) { - $file = \is_dir($filename) ? new self($filename, '*', false) : new File($filename); + if (!StringUtils::endsWith(trim($filename), '.')) { + $file = is_dir($filename) ? new self($filename, '*', false) : new File($filename); $this->addNode($file); } @@ -208,12 +208,12 @@ final class Directory extends FileAbstract implements DirectoryInterface */ public static function size(string $dir, bool $recursive = true) : int { - if (!\is_dir($dir) || !\is_readable($dir)) { + if (!is_dir($dir) || !is_readable($dir)) { return -1; } $countSize = 0; - $directories = \scandir($dir); + $directories = scandir($dir); if ($directories === false) { return $countSize; // @codeCoverageIgnore @@ -225,10 +225,10 @@ final class Directory extends FileAbstract implements DirectoryInterface } $path = $dir . '/' . $filename; - if (\is_dir($path) && $recursive) { + if (is_dir($path) && $recursive) { $countSize += self::size($path, $recursive); - } elseif (\is_file($path)) { - $countSize += \filesize($path); + } elseif (is_file($path)) { + $countSize += filesize($path); } } @@ -250,12 +250,12 @@ final class Directory extends FileAbstract implements DirectoryInterface */ public static function count(string $path, bool $recursive = true, array $ignore = []) : int { - if (!\is_dir($path)) { + if (!is_dir($path)) { return -1; } $size = 0; - $files = \scandir($path); + $files = scandir($path); $ignore[] = '.'; $ignore[] = '..'; @@ -267,9 +267,9 @@ final class Directory extends FileAbstract implements DirectoryInterface if (\in_array($t, $ignore)) { continue; } - if (\is_dir(\rtrim($path, '/') . '/' . $t)) { + if (is_dir(rtrim($path, '/') . '/' . $t)) { if ($recursive) { - $size += self::count(\rtrim($path, '/') . '/' . $t, true, $ignore); + $size += self::count(rtrim($path, '/') . '/' . $t, true, $ignore); } } else { ++$size; @@ -284,11 +284,11 @@ final class Directory extends FileAbstract implements DirectoryInterface */ public static function delete(string $path) : bool { - if (empty($path) || !\is_dir($path)) { + if (empty($path) || !is_dir($path)) { return false; } - $files = \scandir($path); + $files = scandir($path); if ($files === false) { return false; // @codeCoverageIgnore @@ -299,14 +299,14 @@ final class Directory extends FileAbstract implements DirectoryInterface unset($files[0]); foreach ($files as $file) { - if (\is_dir($path . '/' . $file)) { + if (is_dir($path . '/' . $file)) { self::delete($path . '/' . $file); } else { - \unlink($path . '/' . $file); + unlink($path . '/' . $file); } } - \rmdir($path); + rmdir($path); return true; } @@ -316,10 +316,10 @@ final class Directory extends FileAbstract implements DirectoryInterface */ public static function parent(string $path) : string { - $path = \explode('/', \str_replace('\\', '/', $path)); - \array_pop($path); + $path = explode('/', str_replace('\\', '/', $path)); + array_pop($path); - return \implode('/', $path); + return implode('/', $path); } /** @@ -327,11 +327,11 @@ final class Directory extends FileAbstract implements DirectoryInterface */ public static function owner(string $path) : int { - if (!\is_dir($path)) { + if (!is_dir($path)) { throw new PathException($path); } - return (int) \fileowner($path); + return (int) fileowner($path); } /** @@ -339,11 +339,11 @@ final class Directory extends FileAbstract implements DirectoryInterface */ public static function permission(string $path) : int { - if (!\is_dir($path)) { + if (!is_dir($path)) { return -1; } - return (int) \fileperms($path); + return (int) fileperms($path); } /** @@ -351,15 +351,15 @@ final class Directory extends FileAbstract implements DirectoryInterface */ public static function copy(string $from, string $to, bool $overwrite = false) : bool { - if (!\is_dir($from) - || (!$overwrite && \is_dir($to)) + if (!is_dir($from) + || (!$overwrite && is_dir($to)) ) { return false; } - if (!\is_dir($to)) { + if (!is_dir($to)) { self::create($to, 0755, true); - } elseif ($overwrite && \is_dir($to)) { + } elseif ($overwrite && is_dir($to)) { self::delete($to); self::create($to, 0755, true); } @@ -372,9 +372,9 @@ final class Directory extends FileAbstract implements DirectoryInterface $subPath = $iterator->getSubPathname(); if ($item->isDir()) { - \mkdir($to . '/' . $subPath); + mkdir($to . '/' . $subPath); } else { - \copy($from . '/' . $subPath, $to . '/' . $subPath); + copy($from . '/' . $subPath, $to . '/' . $subPath); } } @@ -386,13 +386,13 @@ final class Directory extends FileAbstract implements DirectoryInterface */ public static function move(string $from, string $to, bool $overwrite = false) : bool { - if (!\is_dir($from) - || (!$overwrite && \is_dir($to)) + if (!is_dir($from) + || (!$overwrite && is_dir($to)) ) { return false; } - if ($overwrite && \is_dir($to)) { + if ($overwrite && is_dir($to)) { self::delete($to); } @@ -400,7 +400,7 @@ final class Directory extends FileAbstract implements DirectoryInterface self::create(self::parent($to), 0755, true); } - \rename($from, $to); + rename($from, $to); return true; } @@ -410,7 +410,7 @@ final class Directory extends FileAbstract implements DirectoryInterface */ public static function exists(string $path) : bool { - return \is_dir($path); + return is_dir($path); } /** @@ -418,7 +418,7 @@ final class Directory extends FileAbstract implements DirectoryInterface */ public static function sanitize(string $path, string $replace = '', string $invalid = '/[^\w\s\d\.\-_~,;:\[\]\(\]\/]/') : string { - return \preg_replace($invalid, $replace, $path) ?? ''; + return preg_replace($invalid, $replace, $path) ?? ''; } /** @@ -447,7 +447,7 @@ final class Directory extends FileAbstract implements DirectoryInterface public function isExisting(string $name = null) : bool { if ($name === null) { - return \is_dir($this->path); + return is_dir($this->path); } $name = isset($this->nodes[$name]) ? $name : $this->path . '/' . $name; @@ -468,13 +468,13 @@ final class Directory extends FileAbstract implements DirectoryInterface */ public static function create(string $path, int $permission = 0755, bool $recursive = false) : bool { - if (!\is_dir($path)) { - if (!$recursive && !\is_dir(self::parent($path))) { + if (!is_dir($path)) { + if (!$recursive && !is_dir(self::parent($path))) { return false; } try { - \mkdir($path, $permission, $recursive); + mkdir($path, $permission, $recursive); } catch (\Throwable $t) { return false; // @codeCoverageIgnore } @@ -490,7 +490,7 @@ final class Directory extends FileAbstract implements DirectoryInterface */ public function rewind() : void { - \reset($this->nodes); + reset($this->nodes); } /** @@ -498,7 +498,7 @@ final class Directory extends FileAbstract implements DirectoryInterface */ public function current() : ContainerInterface { - $current = \current($this->nodes); + $current = current($this->nodes); if ($current instanceof self) { $current->index(); } @@ -511,7 +511,7 @@ final class Directory extends FileAbstract implements DirectoryInterface */ public function key() : ?string { - return \key($this->nodes); + return key($this->nodes); } /** @@ -519,7 +519,7 @@ final class Directory extends FileAbstract implements DirectoryInterface */ public function next() : void { - $next = \next($this->nodes); + $next = next($this->nodes); if ($next instanceof self) { $next->index(); } @@ -530,7 +530,7 @@ final class Directory extends FileAbstract implements DirectoryInterface */ public function valid() : bool { - $key = \key($this->nodes); + $key = key($this->nodes); return ($key !== null && $key !== false); } @@ -577,7 +577,7 @@ final class Directory extends FileAbstract implements DirectoryInterface */ public static function name(string $path) : string { - return \basename($path); + return basename($path); } /** @@ -585,7 +585,7 @@ final class Directory extends FileAbstract implements DirectoryInterface */ public static function dirname(string $path) : string { - return \basename($path); + return basename($path); } /** @@ -601,7 +601,7 @@ final class Directory extends FileAbstract implements DirectoryInterface */ public static function basename(string $path) : string { - return \basename($path); + return basename($path); } /** @@ -659,7 +659,7 @@ final class Directory extends FileAbstract implements DirectoryInterface $content = []; foreach ($this->nodes as $node) { - $content[] = \substr($node->getPath(), $pathLength + 1); + $content[] = substr($node->getPath(), $pathLength + 1); } return $content; diff --git a/System/File/Local/File.php b/System/File/Local/File.php index 19495f85c..4d811836f 100644 --- a/System/File/Local/File.php +++ b/System/File/Local/File.php @@ -43,7 +43,7 @@ final class File extends FileAbstract implements FileInterface parent::__construct($path); $this->count = 1; - if (\is_file($this->path)) { + if (is_file($this->path)) { $this->index(); } } @@ -55,7 +55,7 @@ final class File extends FileAbstract implements FileInterface { parent::index(); - $this->size = (int) \filesize($this->path); + $this->size = (int) filesize($this->path); } /** @@ -71,7 +71,7 @@ final class File extends FileAbstract implements FileInterface */ public static function put(string $path, string $content, int $mode = ContentPutMode::REPLACE | ContentPutMode::CREATE) : bool { - $exists = \is_file($path); + $exists = is_file($path); try { if (($exists && ContentPutMode::hasFlag($mode, ContentPutMode::APPEND)) @@ -80,15 +80,15 @@ final class File extends FileAbstract implements FileInterface || (!$exists && ContentPutMode::hasFlag($mode, ContentPutMode::CREATE)) ) { if ($exists && ContentPutMode::hasFlag($mode, ContentPutMode::APPEND)) { - \file_put_contents($path, \file_get_contents($path) . $content); + file_put_contents($path, file_get_contents($path) . $content); } elseif ($exists && ContentPutMode::hasFlag($mode, ContentPutMode::PREPEND)) { - \file_put_contents($path, $content . \file_get_contents($path)); + file_put_contents($path, $content . file_get_contents($path)); } else { if (!Directory::exists(\dirname($path))) { Directory::create(\dirname($path), 0755, true); } - \file_put_contents($path, $content); + file_put_contents($path, $content); } return true; @@ -111,11 +111,11 @@ final class File extends FileAbstract implements FileInterface */ public static function get(string $path) : string { - if (!\is_file($path)) { + if (!is_file($path)) { throw new PathException($path); } - $contents = \file_get_contents($path); + $contents = file_get_contents($path); return $contents === false ? '' : $contents; } @@ -184,7 +184,7 @@ final class File extends FileAbstract implements FileInterface */ public static function exists(string $path) : bool { - return \is_file($path); + return is_file($path); } /** @@ -200,7 +200,7 @@ final class File extends FileAbstract implements FileInterface */ public static function sanitize(string $path, string $replace = '', string $invalid = '/[^\w\s\d\.\-_~,;\/\[\]\(\]]/') : string { - return \preg_replace($invalid, $replace, $path) ?? ''; + return preg_replace($invalid, $replace, $path) ?? ''; } /** @@ -208,11 +208,11 @@ final class File extends FileAbstract implements FileInterface */ public static function size(string $path, bool $recursive = true) : int { - if (!\is_file($path)) { + if (!is_file($path)) { return -1; } - return (int) \filesize($path); + return (int) filesize($path); } /** @@ -220,11 +220,11 @@ final class File extends FileAbstract implements FileInterface */ public static function owner(string $path) : int { - if (!\is_file($path)) { + if (!is_file($path)) { throw new PathException($path); } - return (int) \fileowner($path); + return (int) fileowner($path); } /** @@ -232,11 +232,11 @@ final class File extends FileAbstract implements FileInterface */ public static function permission(string $path) : int { - if (!\is_file($path)) { + if (!is_file($path)) { return -1; } - return (int) \fileperms($path); + return (int) fileperms($path); } /** @@ -251,7 +251,7 @@ final class File extends FileAbstract implements FileInterface public static function pathInfo(string $path) : array { $temp = []; - \preg_match('#^(.*?)[\\\\/]*(([^/\\\\]*?)(\.([^.\\\\/]+?)|))[\\\\/.]*$#m', $path, $temp); + preg_match('#^(.*?)[\\\\/]*(([^/\\\\]*?)(\.([^.\\\\/]+?)|))[\\\\/.]*$#m', $path, $temp); $info = []; $info['dirname'] = $temp[1] ?? ''; @@ -273,7 +273,7 @@ final class File extends FileAbstract implements FileInterface */ public static function dirname(string $path) : string { - return \basename(\dirname($path)); + return basename(\dirname($path)); } /** @@ -295,8 +295,8 @@ final class File extends FileAbstract implements FileInterface */ public static function copy(string $from, string $to, bool $overwrite = false) : bool { - if (!\is_file($from) - || (!$overwrite && \is_file($to)) + if (!is_file($from) + || (!$overwrite && is_file($to)) ) { return false; } @@ -305,11 +305,11 @@ final class File extends FileAbstract implements FileInterface Directory::create(\dirname($to), 0755, true); } - if ($overwrite && \is_file($to)) { - \unlink($to); + if ($overwrite && is_file($to)) { + unlink($to); } - \copy($from, $to); + copy($from, $to); return true; } @@ -335,11 +335,11 @@ final class File extends FileAbstract implements FileInterface */ public static function delete(string $path) : bool { - if (!\is_file($path)) { + if (!is_file($path)) { return false; } - \unlink($path); + unlink($path); return true; } @@ -353,7 +353,7 @@ final class File extends FileAbstract implements FileInterface */ public function getDirName() : string { - return \basename(\dirname($this->path)); + return basename(\dirname($this->path)); } /** @@ -385,7 +385,7 @@ final class File extends FileAbstract implements FileInterface */ public function isExisting() : bool { - return \is_file($this->path); + return is_file($this->path); } /** @@ -393,16 +393,16 @@ final class File extends FileAbstract implements FileInterface */ public static function create(string $path) : bool { - if (!\is_file($path)) { + if (!is_file($path)) { if (!Directory::exists(\dirname($path))) { Directory::create(\dirname($path), 0755, true); } - if (!\is_writable(\dirname($path))) { + if (!is_writable(\dirname($path))) { return false; // @codeCoverageIgnore } - \touch($path); + touch($path); return true; } @@ -415,7 +415,7 @@ final class File extends FileAbstract implements FileInterface */ public function getContent() : string { - $contents = \file_get_contents($this->path); + $contents = file_get_contents($this->path); return $contents === false ? '' : $contents; } @@ -449,7 +449,7 @@ final class File extends FileAbstract implements FileInterface */ public function getName() : string { - return \explode('.', $this->name)[0]; + return explode('.', $this->name)[0]; } /** @@ -457,7 +457,7 @@ final class File extends FileAbstract implements FileInterface */ public function getExtension() : string { - $extension = \explode('.', $this->name); + $extension = explode('.', $this->name); return $extension[1] ?? ''; } @@ -519,7 +519,7 @@ final class File extends FileAbstract implements FileInterface */ public static function name(string $path) : string { - return \explode('.', \basename($path))[0]; + return explode('.', basename($path))[0]; } /** @@ -527,7 +527,7 @@ final class File extends FileAbstract implements FileInterface */ public static function basename(string $path) : string { - return \basename($path); + return basename($path); } /** @@ -541,7 +541,7 @@ final class File extends FileAbstract implements FileInterface */ public static function extension(string $path) : string { - $extension = \explode('.', \basename($path)); + $extension = explode('.', basename($path)); return $extension[1] ?? ''; } diff --git a/System/File/Local/FileAbstract.php b/System/File/Local/FileAbstract.php index b741ae46c..448b60b96 100644 --- a/System/File/Local/FileAbstract.php +++ b/System/File/Local/FileAbstract.php @@ -109,8 +109,8 @@ abstract class FileAbstract implements LocalContainerInterface */ public function __construct(string $path) { - $this->path = \rtrim($path, '/\\'); - $this->name = \basename($path); + $this->path = rtrim($path, '/\\'); + $this->name = basename($path); $this->createdAt = new \DateTimeImmutable('now'); $this->changedAt = new \DateTime('now'); @@ -121,11 +121,11 @@ abstract class FileAbstract implements LocalContainerInterface */ public static function created(string $path) : \DateTime { - if (!\file_exists($path)) { + if (!file_exists($path)) { throw new PathException($path); } - $time = \filectime($path); + $time = filectime($path); return self::createFileTime($time === false ? 0 : $time); } @@ -135,11 +135,11 @@ abstract class FileAbstract implements LocalContainerInterface */ public static function changed(string $path) : \DateTime { - if (!\file_exists($path)) { + if (!file_exists($path)) { throw new PathException($path); } - $time = \filemtime($path); + $time = filemtime($path); return self::createFileTime($time === false ? 0 : $time); } @@ -190,7 +190,7 @@ abstract class FileAbstract implements LocalContainerInterface */ public function getBasename() : string { - return \basename($this->path); + return basename($this->path); } /** @@ -238,16 +238,16 @@ abstract class FileAbstract implements LocalContainerInterface */ public function index() : void { - $mtime = \filemtime($this->path); - $ctime = \filectime($this->path); + $mtime = filemtime($this->path); + $ctime = filectime($this->path); $this->createdAt = (new \DateTimeImmutable())->setTimestamp($mtime === false ? 0 : $mtime); $this->changedAt->setTimestamp($ctime === false ? 0 : $ctime); - $owner = \fileowner($this->path); + $owner = fileowner($this->path); $this->owner = $owner === false ? 0 : $owner; - $this->permission = (int) \substr(\sprintf('%o', \fileperms($this->path)), -4); + $this->permission = (int) substr(sprintf('%o', fileperms($this->path)), -4); $this->isInitialized = true; } diff --git a/System/File/Local/LocalStorage.php b/System/File/Local/LocalStorage.php index 06ed295e7..92c34decd 100644 --- a/System/File/Local/LocalStorage.php +++ b/System/File/Local/LocalStorage.php @@ -34,7 +34,7 @@ class LocalStorage extends StorageAbstract */ protected static function getClassType(string $path) : string { - return \is_dir($path) || (!\is_file($path) && \stripos($path, '.') === false) ? Directory::class : File::class; + return is_dir($path) || (!is_file($path) && stripos($path, '.') === false) ? Directory::class : File::class; } /** @@ -42,7 +42,7 @@ class LocalStorage extends StorageAbstract */ public static function put(string $path, string $content, int $mode = 0) : bool { - if (\is_dir($path)) { + if (is_dir($path)) { throw new PathException($path); } @@ -54,7 +54,7 @@ class LocalStorage extends StorageAbstract */ public static function get(string $path) : string { - if (\is_dir($path)) { + if (is_dir($path)) { throw new PathException($path); } @@ -66,7 +66,7 @@ class LocalStorage extends StorageAbstract */ public static function list(string $path, string $filter = '*', bool $recursive = false) : array { - if (\is_file($path)) { + if (is_file($path)) { throw new PathException($path); } @@ -78,7 +78,7 @@ class LocalStorage extends StorageAbstract */ public static function create(string $path) : bool { - return \stripos($path, '.') === false + return stripos($path, '.') === false ? Directory::create($path, 0755, true) : File::create($path); } @@ -88,7 +88,7 @@ class LocalStorage extends StorageAbstract */ public static function set(string $path, string $content) : bool { - if (\is_dir($path)) { + if (is_dir($path)) { throw new PathException($path); } @@ -100,7 +100,7 @@ class LocalStorage extends StorageAbstract */ public static function append(string $path, string $content) : bool { - if (\is_dir($path)) { + if (is_dir($path)) { throw new PathException($path); } @@ -112,7 +112,7 @@ class LocalStorage extends StorageAbstract */ public static function prepend(string $path, string $content) : bool { - if (\is_dir($path)) { + if (is_dir($path)) { throw new PathException($path); } @@ -124,7 +124,7 @@ class LocalStorage extends StorageAbstract */ public static function extension(string $path) : string { - if (\is_dir($path)) { + if (is_dir($path)) { throw new PathException($path); } diff --git a/System/File/Storage.php b/System/File/Storage.php index e4d6f0c4d..f2fecb0a1 100644 --- a/System/File/Storage.php +++ b/System/File/Storage.php @@ -70,7 +70,7 @@ final class Storage } } else { $stg = $env; - $env = \ucfirst(\strtolower($env)); + $env = ucfirst(strtolower($env)); $env = __NAMESPACE__ . '\\' . $env . '\\' . $env . 'Storage'; try { diff --git a/System/MimeType.php b/System/MimeType.php index 4e063ecca..62889fb6e 100644 --- a/System/MimeType.php +++ b/System/MimeType.php @@ -2022,7 +2022,7 @@ abstract class MimeType extends Enum public static function extensionToMime(string $extension) : string { try { - return self::getByName('M_' . \strtoupper($extension)) ?? 'application/octet-stream'; + return self::getByName('M_' . strtoupper($extension)) ?? 'application/octet-stream'; } catch (\Throwable $t) { return 'application/octet-stream'; } diff --git a/System/OperatingSystem.php b/System/OperatingSystem.php index dba1348e2..969a92c30 100644 --- a/System/OperatingSystem.php +++ b/System/OperatingSystem.php @@ -43,11 +43,11 @@ final class OperatingSystem */ public static function getSystem() : int { - if (\stristr(\PHP_OS, 'DAR') !== false) { + if (stristr(\PHP_OS, 'DAR') !== false) { return SystemType::OSX; - } elseif (\stristr(\PHP_OS, 'WIN') !== false) { + } elseif (stristr(\PHP_OS, 'WIN') !== false) { return SystemType::WIN; - } elseif (\stristr(\PHP_OS, 'LINUX') !== false) { + } elseif (stristr(\PHP_OS, 'LINUX') !== false) { return SystemType::LINUX; } diff --git a/System/Search/StringSearch.php b/System/Search/StringSearch.php index 165cd9588..310d5679a 100644 --- a/System/Search/StringSearch.php +++ b/System/Search/StringSearch.php @@ -60,7 +60,7 @@ abstract class StringSearch if ($j > 0) { $i += $shift[$j - 1]; - $j = \max($j - $shift[$j - 1], 0); + $j = max($j - $shift[$j - 1], 0); } else { ++$i; $j = 0; @@ -98,7 +98,7 @@ abstract class StringSearch if ($j > 0) { $i += $shift[$j - 1]; - $j = \max($j - $shift[$j - 1], 0); + $j = max($j - $shift[$j - 1], 0); } else { ++$i; $j = 0; diff --git a/System/SystemUtils.php b/System/SystemUtils.php index c468de7ac..3d9a23323 100644 --- a/System/SystemUtils.php +++ b/System/SystemUtils.php @@ -45,27 +45,27 @@ final class SystemUtils { $mem = 0; - if (\stristr(\PHP_OS, 'WIN')) { + if (stristr(\PHP_OS, 'WIN')) { $memArr = []; - \exec('wmic memorychip get capacity', $memArr); + exec('wmic memorychip get capacity', $memArr); - $mem = \array_sum($memArr) / 1024; - } elseif (\stristr(\PHP_OS, 'LINUX')) { - $fh = \fopen('/proc/meminfo', 'r'); + $mem = array_sum($memArr) / 1024; + } elseif (stristr(\PHP_OS, 'LINUX')) { + $fh = fopen('/proc/meminfo', 'r'); if ($fh === false) { return $mem; // @codeCoverageIgnore } - while ($line = \fgets($fh)) { + while ($line = fgets($fh)) { $pieces = []; - if (\preg_match('/^MemTotal:\s+(\d+)\skB$/', $line, $pieces)) { + if (preg_match('/^MemTotal:\s+(\d+)\skB$/', $line, $pieces)) { $mem = (int) ($pieces[1] ?? 0) * 1024; break; } } - \fclose($fh); + fclose($fh); } return (int) $mem; @@ -82,17 +82,17 @@ final class SystemUtils { $memUsage = 0; - if (\stristr(\PHP_OS, 'LINUX')) { - $free = \shell_exec('free'); + if (stristr(\PHP_OS, 'LINUX')) { + $free = shell_exec('free'); if ($free === null || $free === false) { return $memUsage; // @codeCoverageIgnore } - $free = \trim($free); - $freeArr = \explode("\n", $free); - $mem = \explode(' ', $freeArr[1]); - $mem = \array_values(\array_filter($mem)); + $free = trim($free); + $freeArr = explode("\n", $free); + $mem = explode(' ', $freeArr[1]); + $mem = array_values(array_filter($mem)); $memUsage = $mem[2] / $mem[1] * 100; } @@ -110,18 +110,18 @@ final class SystemUtils { $cpuUsage = 0; - if (\stristr(\PHP_OS, 'WIN') !== false) { + if (stristr(\PHP_OS, 'WIN') !== false) { $cpuUsage = null; - \exec('wmic cpu get LoadPercentage', $cpuUsage); + exec('wmic cpu get LoadPercentage', $cpuUsage); $cpuUsage = $cpuUsage[1]; - } elseif (\stristr(\PHP_OS, 'LINUX') !== false) { - $loadavg = \sys_getloadavg(); + } elseif (stristr(\PHP_OS, 'LINUX') !== false) { + $loadavg = sys_getloadavg(); if ($loadavg === false) { return -1; } - $cpuUsage = $loadavg[0] * 100 / \exec('nproc'); + $cpuUsage = $loadavg[0] * 100 / exec('nproc'); } return (int) $cpuUsage; @@ -138,10 +138,10 @@ final class SystemUtils { if (isset($_SERVER['SERVER_NAME'])) { return $_SERVER['SERVER_NAME']; - } elseif (($result = \gethostname()) !== false) { + } elseif (($result = gethostname()) !== false) { return $result; - } elseif (\php_uname('n') !== false) { - return \php_uname('n'); + } elseif (php_uname('n') !== false) { + return php_uname('n'); } return 'localhost.localdomain'; diff --git a/UnhandledHandler.php b/UnhandledHandler.php index 7d8c49808..2ebb29334 100644 --- a/UnhandledHandler.php +++ b/UnhandledHandler.php @@ -62,13 +62,13 @@ final class UnhandledHandler { $logger = FileLogger::getInstance(__DIR__ . '/../Logs'); - if (!(\error_reporting() & $errno)) { - \error_clear_last(); + if (!(error_reporting() & $errno)) { + error_clear_last(); return false; } - \error_clear_last(); + error_clear_last(); $logger->error(FileLogger::MSG_FULL, [ 'message' => 'Undefined error', @@ -89,8 +89,8 @@ final class UnhandledHandler */ public static function shutdownHandler() : void { - $e = \error_get_last(); - \error_clear_last(); + $e = error_get_last(); + error_clear_last(); if ($e !== null) { $logger = FileLogger::getInstance(__DIR__ . '/../Logs'); diff --git a/Uri/Argument.php b/Uri/Argument.php index e5a5a230d..6344eac0b 100644 --- a/Uri/Argument.php +++ b/Uri/Argument.php @@ -177,23 +177,23 @@ final class Argument implements UriInterface */ private function setInternalPath(string $uri) : void { - $start = \stripos($uri, ':'); + $start = stripos($uri, ':'); if ($start === false) { return; } - $end = \stripos($uri, ' ', $start + 1); + $end = stripos($uri, ' ', $start + 1); if ($end === false) { $end = \strlen($uri); // @codeCoverageIgnore } - $path = $start < 8 ? \substr($uri, $start + 1, $end - $start - 1) : $uri; - $this->path = $path === false ? '' : \ltrim($path, ':'); + $path = $start < 8 ? substr($uri, $start + 1, $end - $start - 1) : $uri; + $this->path = $path === false ? '' : ltrim($path, ':'); if (StringUtils::endsWith($this->path, '.php')) { - $path = \substr($this->path, 0, -4); + $path = substr($this->path, 0, -4); if ($path === false) { throw new \Exception(); // @codeCoverageIgnore @@ -202,7 +202,7 @@ final class Argument implements UriInterface $this->path = $path; } - $this->pathElements = \explode('/', \ltrim($this->path, '/')); + $this->pathElements = explode('/', ltrim($this->path, '/')); } /** @@ -216,7 +216,7 @@ final class Argument implements UriInterface */ private function setQuery(string $uri) : void { - $result = \preg_match_all('/\?([a-zA-Z0-9]*)(=)([a-zA-Z0-9]*)/', $uri, $matches); + $result = preg_match_all('/\?([a-zA-Z0-9]*)(=)([a-zA-Z0-9]*)/', $uri, $matches); if ($result === false || empty($matches)) { return; @@ -227,7 +227,7 @@ final class Argument implements UriInterface $this->queryString .= ' ?' . $value . '=' . $matches[3][$key]; } - $this->queryString = \ltrim($this->queryString); + $this->queryString = ltrim($this->queryString); } /** @@ -241,7 +241,7 @@ final class Argument implements UriInterface */ private function setInternalFragment(string $uri) : void { - $result = \preg_match('/#([a-zA-Z0-9]*)/', $uri, $matches); + $result = preg_match('/#([a-zA-Z0-9]*)/', $uri, $matches); if ($result === 1) { $this->fragment = $matches[1] ?? ''; @@ -294,7 +294,7 @@ final class Argument implements UriInterface public function setPath(string $path) : void { $this->path = $path; - $this->pathElements = \explode('/', \ltrim($this->path, '/')); + $this->pathElements = explode('/', ltrim($this->path, '/')); } /** @@ -324,7 +324,7 @@ final class Argument implements UriInterface public function getQuery(string $key = null) : string { if ($key !== null) { - $key = \strtolower($key); + $key = strtolower($key); return $this->query[$key] ?? ''; } diff --git a/Uri/HttpUri.php b/Uri/HttpUri.php index e4cb3cd07..3350c2ca1 100644 --- a/Uri/HttpUri.php +++ b/Uri/HttpUri.php @@ -168,7 +168,7 @@ final class HttpUri implements UriInterface public function set(string $uri) : void { $this->uri = $uri; - $url = \parse_url($this->uri); + $url = parse_url($this->uri); if ($url === false) { $this->scheme = ''; @@ -194,7 +194,7 @@ final class HttpUri implements UriInterface $this->path = $url['path'] ?? ''; if (StringUtils::endsWith($this->path, '.php')) { - $path = \substr($this->path, 0, -4); + $path = substr($this->path, 0, -4); if ($path === false) { throw new \Exception(); // @codeCoverageIgnore @@ -203,17 +203,17 @@ final class HttpUri implements UriInterface $this->path = $path; } - $this->pathElements = \explode('/', \trim($this->path, '/')); + $this->pathElements = explode('/', trim($this->path, '/')); $this->queryString = $url['query'] ?? ''; if (!empty($this->queryString)) { - \parse_str($this->queryString, $this->query); + parse_str($this->queryString, $this->query); } - $this->query = \array_change_key_case($this->query, \CASE_LOWER); + $this->query = array_change_key_case($this->query, \CASE_LOWER); $this->fragment = $url['fragment'] ?? ''; - $this->fragments = \explode('&', $url['fragment'] ?? ''); + $this->fragments = explode('&', $url['fragment'] ?? ''); $this->base = $this->scheme . '://' . $this->host . ($this->port !== 80 ? ':' . $this->port : '') . $this->rootPath; } @@ -252,7 +252,7 @@ final class HttpUri implements UriInterface */ public static function isValid(string $uri) : bool { - return (bool) \filter_var($uri, \FILTER_VALIDATE_URL); + return (bool) filter_var($uri, \FILTER_VALIDATE_URL); } /** @@ -268,7 +268,7 @@ final class HttpUri implements UriInterface */ public function setRootPath(string $root) : void { - $this->rootPath = \rtrim($root, '/'); + $this->rootPath = rtrim($root, '/'); $this->base = $this->scheme . '://' . $this->host . ($this->port !== 80 ? ':' . $this->port : '') . $this->rootPath; } @@ -289,14 +289,14 @@ final class HttpUri implements UriInterface */ public function getSubdomain() : string { - $host = \explode('.', $this->host); + $host = explode('.', $this->host); $length = \count($host) - 2; if ($length < 1) { return ''; } - return \implode('.', \array_slice($host, 0, $length)); + return implode('.', \array_slice($host, 0, $length)); } /** @@ -313,7 +313,7 @@ final class HttpUri implements UriInterface public function setPath(string $path) : void { $this->path = $path; - $this->pathElements = \explode('/', \ltrim($this->path, '/')); + $this->pathElements = explode('/', ltrim($this->path, '/')); } /** @@ -343,7 +343,7 @@ final class HttpUri implements UriInterface public function getQuery(string $key = null) : string { if ($key !== null) { - $key = \strtolower($key); + $key = strtolower($key); return $this->query[$key] ?? ''; } diff --git a/Uri/UriFactory.php b/Uri/UriFactory.php index 7037bf1a0..abb869f91 100644 --- a/Uri/UriFactory.php +++ b/Uri/UriFactory.php @@ -73,7 +73,7 @@ final class UriFactory self::$uri = []; } else { foreach (self::$uri as $key => $value) { - if (\stripos($key, $identifier) === 0) { + if (stripos($key, $identifier) === 0) { unset(self::$uri[$key]); } } @@ -116,7 +116,7 @@ final class UriFactory self::setQuery('/scheme', $uri->scheme); self::setQuery('/host', $uri->host); self::setQuery('/port', (string) $uri->port); - self::setQuery('/base', \rtrim($uri->getBase(), '/')); + self::setQuery('/base', rtrim($uri->getBase(), '/')); self::setQuery('/rootPath', $uri->getRootPath()); self::setQuery('?', '?' . $uri->getQuery()); self::setQuery('%', $uri->__toString()); @@ -175,7 +175,7 @@ final class UriFactory $success = false; foreach (self::$uri as $key => $value) { - if (((bool) \preg_match('~^' . $pattern . '$~', $key))) { + if (((bool) preg_match('~^' . $pattern . '$~', $key))) { unset(self::$uri[$key]); $success = true; } @@ -198,18 +198,18 @@ final class UriFactory private static function unique(string $url) : string { // handle edge cases / normalization - $url = \str_replace( + $url = str_replace( ['=%', '=#', '=?'], ['=%25', '=%23', '=%3F'], $url ); - if (\stripos($url, '?') === false && ($pos = \stripos($url, '&')) !== false) { - $url = \substr_replace($url, '?', $pos, 1); + if (stripos($url, '?') === false && ($pos = stripos($url, '&')) !== false) { + $url = substr_replace($url, '?', $pos, 1); } /** @var array $urlStructure */ - $urlStructure = \parse_url($url); + $urlStructure = parse_url($url); if ($urlStructure === false) { return $url; // @codeCoverageIgnore } @@ -218,16 +218,16 @@ final class UriFactory $len = \strlen($urlStructure['query']); for ($i = 0; $i < $len; ++$i) { if ($urlStructure['query'][$i] === '?') { - $urlStructure['query'] = \substr_replace($urlStructure['query'], '&', $i, 1); + $urlStructure['query'] = substr_replace($urlStructure['query'], '&', $i, 1); } elseif ($urlStructure['query'][$i] === '\\') { ++$i; } } - \parse_str($urlStructure['query'], $urlStructure['query']); + parse_str($urlStructure['query'], $urlStructure['query']); foreach ($urlStructure['query'] as $para => $query) { - if ($query === '' && \stripos($url, $para . '=') !== false) { + if ($query === '' && stripos($url, $para . '=') !== false) { unset($urlStructure['query'][$para]); } } @@ -247,11 +247,11 @@ final class UriFactory . (isset($urlStructure['path']) && !empty($urlStructure['path']) ? $urlStructure['path'] : '') . (isset($urlStructure['query']) && !empty($urlStructure['query']) - ? '?' . \http_build_query($urlStructure['query']) : '') + ? '?' . http_build_query($urlStructure['query']) : '') . (isset($urlStructure['fragment']) && !empty($urlStructure['fragment']) - ? '#' . \str_replace('\#', '#', $urlStructure['fragment']) : ''); + ? '#' . str_replace('\#', '#', $urlStructure['fragment']) : ''); - return \str_replace( + return str_replace( ['%5C%7B', '%5C%7D', '%5C%3F', '%5C%23'], ['{', '}', '?', '#'], $escaped @@ -279,12 +279,12 @@ final class UriFactory */ public static function build(string $uri, array $toMatch = []) : string { - if (\stripos($uri, '{') === false) { + if (stripos($uri, '{') === false) { return $uri; } - $parsed = \preg_replace_callback('(\{[\/#\?%@\.\$][a-zA-Z0-9\-]*\})', function ($match) use ($toMatch) { - $match = \substr($match[0], 1, \strlen($match[0]) - 2); + $parsed = preg_replace_callback('(\{[\/#\?%@\.\$][a-zA-Z0-9\-]*\})', function ($match) use ($toMatch) { + $match = substr($match[0], 1, \strlen($match[0]) - 2); return $toMatch[$match] ?? self::$uri[$match] ?? ''; }, $uri); diff --git a/Uri/UriInterface.php b/Uri/UriInterface.php index 05869069f..029fbf0f8 100644 --- a/Uri/UriInterface.php +++ b/Uri/UriInterface.php @@ -17,13 +17,13 @@ namespace phpOMS\Uri; /** * Uri interface. * - * @property string $scheme Scheme - * @property string $host Host - * @property int $port Port - * @property string $fragment Fragment - * @property array $fragments Fragments - * @property string $user User - * @property string $pass Password + * @property string $scheme Scheme + * @property string $host Host + * @property int $port Port + * @property string $fragment Fragment + * @property array $fragments Fragments + * @property string $user User + * @property string $pass Password * * @package phpOMS\Uri * @license OMS License 1.0 diff --git a/Utils/ArrayUtils.php b/Utils/ArrayUtils.php index 888270108..a4d383fbe 100644 --- a/Utils/ArrayUtils.php +++ b/Utils/ArrayUtils.php @@ -47,7 +47,7 @@ final class ArrayUtils */ public static function unsetArray(string $path, array $data, string $delim = '/') : array { - $nodes = \explode($delim, \trim($path, $delim)); + $nodes = explode($delim, trim($path, $delim)); $prevEl = null; $el = &$data; $node = null; @@ -90,7 +90,7 @@ final class ArrayUtils */ public static function setArray(string $path, array $data, mixed $value, string $delim = '/', bool $overwrite = false) : array { - $pathParts = \explode($delim, \trim($path, $delim)); + $pathParts = explode($delim, trim($path, $delim)); $current = &$data; if ($pathParts === false) { @@ -106,8 +106,8 @@ final class ArrayUtils } elseif (\is_array($current) && !\is_array($value)) { $current[] = $value; } elseif (\is_array($current) && \is_array($value)) { - $current = \array_merge($current, $value); - } elseif (\is_scalar($current) && $current !== null) { + $current = array_merge($current, $value); + } elseif (is_scalar($current) && $current !== null) { $current = [$current, $value]; } else { $current = $value; @@ -131,7 +131,7 @@ final class ArrayUtils */ public static function getArray(string $path, array $data, string $delim = '/') : mixed { - $pathParts = \explode($delim, \trim($path, $delim)); + $pathParts = explode($delim, trim($path, $delim)); $current = $data; if ($pathParts === false) { @@ -235,7 +235,7 @@ final class ArrayUtils */ public static function arrayToCsv(array $data, string $delimiter = ';', string $enclosure = '"', string $escape = '\\') : string { - $outstream = \fopen('php://memory', 'r+'); + $outstream = fopen('php://memory', 'r+'); if ($outstream === false) { throw new \Exception(); // @codeCoverageIgnore @@ -243,12 +243,12 @@ final class ArrayUtils foreach ($data as $line) { /** @noinspection PhpMethodParametersCountMismatchInspection */ - \fputcsv($outstream, $line, $delimiter, $enclosure, $escape); + fputcsv($outstream, $line, $delimiter, $enclosure, $escape); } - \rewind($outstream); - $csv = \stream_get_contents($outstream); - \fclose($outstream); + rewind($outstream); + $csv = stream_get_contents($outstream); + fclose($outstream); return $csv === false ? '' : $csv; } @@ -267,11 +267,11 @@ final class ArrayUtils */ public static function getArg(string $id, array $args) : ?string { - if (($key = \array_search($id, $args)) === false || $key === \count($args) - 1) { + if (($key = array_search($id, $args)) === false || $key === \count($args) - 1) { return null; } - return \trim($args[(int) $key + 1], '" '); + return trim($args[(int) $key + 1], '" '); } /** @@ -286,7 +286,7 @@ final class ArrayUtils */ public static function hasArg(string $id, array $args) : int { - if (($key = \array_search($id, $args)) === false) { + if (($key = array_search($id, $args)) === false) { return -1; } @@ -308,13 +308,13 @@ final class ArrayUtils { // see collection collapse as alternative?! $flat = []; - $stack = \array_values($array); + $stack = array_values($array); while (!empty($stack)) { - $value = \array_shift($stack); + $value = array_shift($stack); if (\is_array($value)) { - $stack = \array_merge(\array_values($value), $stack); + $stack = array_merge(array_values($value), $stack); } else { $flat[] = $value; } @@ -338,7 +338,7 @@ final class ArrayUtils { $count = $count === 0 ? \count($array) : $start + $count; $sum = 0; - $array = \array_values($array); + $array = array_values($array); for ($i = $start; $i <= $count - 1; ++$i) { $sum += $array[$i]; @@ -358,7 +358,7 @@ final class ArrayUtils */ public static function arraySumRecursive(array $array) : mixed { - return \array_sum(self::arrayFlatten($array)); + return array_sum(self::arrayFlatten($array)); } /** @@ -375,7 +375,7 @@ final class ArrayUtils $abs = []; foreach ($values as $value) { - $abs[] = \abs($value); + $abs[] = abs($value); } return $abs; @@ -416,7 +416,7 @@ final class ArrayUtils $squared = []; foreach ($values as $value) { - $squared[] = \sqrt($value); + $squared[] = sqrt($value); } return $squared; diff --git a/Utils/Barcode/C128Abstract.php b/Utils/Barcode/C128Abstract.php index 39169ec94..85859399b 100644 --- a/Utils/Barcode/C128Abstract.php +++ b/Utils/Barcode/C128Abstract.php @@ -243,8 +243,8 @@ abstract class C128Abstract { $res = $this->get(); - \imagepng($res, $file); - \imagedestroy($res); + imagepng($res, $file); + imagedestroy($res); } /** @@ -260,8 +260,8 @@ abstract class C128Abstract { $res = $this->get(); - \imagejpeg($res, $file); - \imagedestroy($res); + imagejpeg($res, $file); + imagedestroy($res); } /** @@ -295,14 +295,14 @@ abstract class C128Abstract */ protected function generateCodeString() : string { - $keys = \array_keys(static::$CODEARRAY); - $values = \array_flip($keys); + $keys = array_keys(static::$CODEARRAY); + $values = array_flip($keys); $codeString = ''; $length = \strlen($this->content); $checksum = static::$CHECKSUM; for ($pos = 1; $pos <= $length; ++$pos) { - $activeKey = \substr($this->content, ($pos - 1), 1); + $activeKey = substr($this->content, ($pos - 1), 1); $codeString .= static::$CODEARRAY[$activeKey]; $checksum += $values[$activeKey] * $pos; } @@ -324,14 +324,14 @@ abstract class C128Abstract protected function createImage(string $codeString) : mixed { $dimensions = $this->calculateDimensions($codeString); - $image = \imagecreate($dimensions['width'], $dimensions['height']); + $image = imagecreate($dimensions['width'], $dimensions['height']); if ($image === false) { throw new \Exception(); // @codeCoverageIgnore } - $black = \imagecolorallocate($image, 0, 0, 0); - $white = \imagecolorallocate($image, 255, 255, 255); + $black = imagecolorallocate($image, 0, 0, 0); + $white = imagecolorallocate($image, 255, 255, 255); $location = 0; $length = \strlen($codeString); @@ -339,13 +339,13 @@ abstract class C128Abstract throw new \Exception(); // @codeCoverageIgnore } - \imagefill($image, 0, 0, $white); + imagefill($image, 0, 0, $white); for ($position = 1; $position <= $length; ++$position) { - $cur_size = $location + (int) (\substr($codeString, ($position - 1), 1)); + $cur_size = $location + (int) (substr($codeString, ($position - 1), 1)); if ($this->orientation === OrientationType::HORIZONTAL) { - \imagefilledrectangle( + imagefilledrectangle( $image, $location + $this->margin, 0 + $this->margin, @@ -354,7 +354,7 @@ abstract class C128Abstract ($position % 2 == 0 ? $white : $black) ); } else { - \imagefilledrectangle( + imagefilledrectangle( $image, 0 + $this->margin, $location + $this->margin, @@ -385,7 +385,7 @@ abstract class C128Abstract $length = \strlen($codeString); for ($i = 1; $i <= $length; ++$i) { - $codeLength = $codeLength + (int) (\substr($codeString, ($i - 1), 1)); + $codeLength = $codeLength + (int) (substr($codeString, ($i - 1), 1)); } return $codeLength; diff --git a/Utils/Barcode/C128a.php b/Utils/Barcode/C128a.php index fe79c273c..0c0cf33f2 100644 --- a/Utils/Barcode/C128a.php +++ b/Utils/Barcode/C128a.php @@ -85,6 +85,6 @@ class C128a extends C128Abstract */ public function setContent(string $content) : void { - parent::setContent(\strtoupper($content)); + parent::setContent(strtoupper($content)); } } diff --git a/Utils/Barcode/C128c.php b/Utils/Barcode/C128c.php index b0f808974..3b1051f71 100644 --- a/Utils/Barcode/C128c.php +++ b/Utils/Barcode/C128c.php @@ -84,8 +84,8 @@ class C128c extends C128Abstract */ protected function generateCodeString() : string { - $keys = \array_keys(self::$CODEARRAY); - $values = \array_flip($keys); + $keys = array_keys(self::$CODEARRAY); + $values = array_flip($keys); $codeString = ''; $length = \strlen($this->content); $checksum = self::$CHECKSUM; @@ -93,9 +93,9 @@ class C128c extends C128Abstract for ($pos = 1; $pos <= $length; $pos += 2) { if ($pos + 1 <= $length) { - $activeKey = \substr($this->content, ($pos - 1), 2); + $activeKey = substr($this->content, ($pos - 1), 2); } else { - $activeKey = \substr($this->content, ($pos - 1), 1) . '0'; + $activeKey = substr($this->content, ($pos - 1), 1) . '0'; } $codeString .= self::$CODEARRAY[$activeKey]; diff --git a/Utils/Barcode/C25.php b/Utils/Barcode/C25.php index 399d391fe..a3622dce6 100644 --- a/Utils/Barcode/C25.php +++ b/Utils/Barcode/C25.php @@ -75,7 +75,7 @@ class C25 extends C128Abstract */ public function setContent(string $content) : void { - if (!\ctype_digit($content)) { + if (!ctype_digit($content)) { throw new \InvalidArgumentException($content); } @@ -94,7 +94,7 @@ class C25 extends C128Abstract for ($posX = 1; $posX <= $length; ++$posX) { for ($posY = 0; $posY < $arrayLength; ++$posY) { - if (\substr($this->content, ($posX - 1), 1) == self::$CODEARRAY[$posY]) { + if (substr($this->content, ($posX - 1), 1) == self::$CODEARRAY[$posY]) { $temp[$posX] = self::$CODEARRAY2[$posY]; } } @@ -102,8 +102,8 @@ class C25 extends C128Abstract for ($posX = 1; $posX <= $length; $posX += 2) { if (isset($temp[$posX], $temp[($posX + 1)])) { - $temp1 = \explode('-', $temp[$posX]); - $temp2 = \explode('-', $temp[($posX + 1)]); + $temp1 = explode('-', $temp[$posX]); + $temp2 = explode('-', $temp[($posX + 1)]); $count = \count($temp1); for ($posY = 0; $posY < $count; ++$posY) { diff --git a/Utils/Barcode/C39.php b/Utils/Barcode/C39.php index c18ebb032..be3ea5366 100644 --- a/Utils/Barcode/C39.php +++ b/Utils/Barcode/C39.php @@ -66,7 +66,7 @@ class C39 extends C128Abstract */ public function setContent(string $content) : void { - parent::setContent(\strtoupper($content)); + parent::setContent(strtoupper($content)); } /** @@ -78,7 +78,7 @@ class C39 extends C128Abstract $length = \strlen($this->content); for ($X = 1; $X <= $length; ++$X) { - $codeString .= self::$CODEARRAY[\substr($this->content, ($X - 1), 1)] . '1'; + $codeString .= self::$CODEARRAY[substr($this->content, ($X - 1), 1)] . '1'; } return $codeString; diff --git a/Utils/Barcode/Codebar.php b/Utils/Barcode/Codebar.php index dd49436b5..a7aca8ef2 100644 --- a/Utils/Barcode/Codebar.php +++ b/Utils/Barcode/Codebar.php @@ -67,7 +67,7 @@ class Codebar extends C128Abstract */ public function setContent(string $content) : void { - parent::setContent(\strtoupper($content)); + parent::setContent(strtoupper($content)); } /** @@ -81,7 +81,7 @@ class Codebar extends C128Abstract for ($posX = 1; $posX <= $length; ++$posX) { for ($posY = 0; $posY < $lenCodearr; ++$posY) { - if (\substr($this->content, ($posX - 1), 1) == self::$CODEARRAY[$posY]) { + if (substr($this->content, ($posX - 1), 1) == self::$CODEARRAY[$posY]) { $codeString .= self::$CODEARRAY2[$posY] . '1'; } } diff --git a/Utils/Compression/LZW.php b/Utils/Compression/LZW.php index dc9af7ee7..a15af98fb 100644 --- a/Utils/Compression/LZW.php +++ b/Utils/Compression/LZW.php @@ -56,7 +56,7 @@ class LZW implements CompressionInterface $result[] = $dictionary[$w]; } - return \implode(',', $result); + return implode(',', $result); } /** @@ -64,7 +64,7 @@ class LZW implements CompressionInterface */ public function decompress(string $compressed) : string { - $compressed = \explode(',', $compressed); + $compressed = explode(',', $compressed); $dictionary = []; $entry = ''; $dictSize = 256; diff --git a/Utils/Converter/Currency.php b/Utils/Converter/Currency.php index c89a37ad8..35bf5ca0c 100644 --- a/Utils/Converter/Currency.php +++ b/Utils/Converter/Currency.php @@ -77,7 +77,7 @@ final class Currency public static function fromEurTo(float $value, string $to) : float { $currencies = self::getEcbEuroRates(); - $to = \strtoupper($to); + $to = strtoupper($to); if (!isset($currencies[$to])) { throw new \InvalidArgumentException('Currency doesn\'t exists'); @@ -115,7 +115,7 @@ final class Currency self::$ecbCurrencies = []; foreach ($node as $key => $value) { - self::$ecbCurrencies[\strtoupper((string) $value->attributes()['currency'])] = (float) $value->attributes()['rate']; + self::$ecbCurrencies[strtoupper((string) $value->attributes()['currency'])] = (float) $value->attributes()['rate']; } } catch (\Throwable $t) { self::$ecbCurrencies = []; // @codeCoverageIgnore @@ -139,7 +139,7 @@ final class Currency public static function fromToEur(float $value, string $from) : float { $currencies = self::getEcbEuroRates(); - $from = \strtoupper($from); + $from = strtoupper($from); if (!isset($currencies[$from])) { throw new \InvalidArgumentException('Currency doesn\'t exists'); @@ -164,8 +164,8 @@ final class Currency public static function convertCurrency(float $value, string $from, string $to) : float { $currencies = self::getEcbEuroRates(); - $from = \strtoupper($from); - $to = \strtoupper($to); + $from = strtoupper($from); + $to = strtoupper($to); if ((!isset($currencies[$from]) && $from !== ISO4217CharEnum::_EUR) || (!isset($currencies[$to]) && $to !== ISO4217CharEnum::_EUR)) { throw new \InvalidArgumentException('Currency doesn\'t exists'); diff --git a/Utils/Converter/File.php b/Utils/Converter/File.php index 291b6942b..f52089313 100644 --- a/Utils/Converter/File.php +++ b/Utils/Converter/File.php @@ -50,12 +50,12 @@ final class File if ($bytes < 1000) { return $bytes . 'b'; } elseif ($bytes < 1000000) { - return \rtrim(\rtrim(\number_format($bytes / 1000, 1, $decimal, $thousands), '0'), $decimal) . 'kb'; + return rtrim(rtrim(number_format($bytes / 1000, 1, $decimal, $thousands), '0'), $decimal) . 'kb'; } elseif ($bytes < 1000000000) { - return \rtrim(\rtrim(\number_format($bytes / 1000000, 1, $decimal, $thousands), '0'), $decimal) . 'mb'; + return rtrim(rtrim(number_format($bytes / 1000000, 1, $decimal, $thousands), '0'), $decimal) . 'mb'; } - return \rtrim(\rtrim(\number_format($bytes / 1000000000, 1, $decimal, $thousands), '0'), $decimal) . 'gb'; + return rtrim(rtrim(number_format($bytes / 1000000000, 1, $decimal, $thousands), '0'), $decimal) . 'gb'; } /** @@ -72,11 +72,11 @@ final class File public static function kilobyteSizeToString(int $kilobytes, string $decimal = '.', string $thousands = ',') : string { if ($kilobytes < 1000) { - return \rtrim(\rtrim(\number_format($kilobytes, 1, $decimal, $thousands), '0'), $decimal) . 'kb'; + return rtrim(rtrim(number_format($kilobytes, 1, $decimal, $thousands), '0'), $decimal) . 'kb'; } elseif ($kilobytes < 1000000) { - return \rtrim(\rtrim(\number_format($kilobytes / 1000, 1, $decimal, $thousands), '0'), $decimal) . 'mb'; + return rtrim(rtrim(number_format($kilobytes / 1000, 1, $decimal, $thousands), '0'), $decimal) . 'mb'; } - return \rtrim(\rtrim(\number_format($kilobytes / 1000000, 1, $decimal, $thousands), '0'), $decimal) . 'gb'; + return rtrim(rtrim(number_format($kilobytes / 1000000, 1, $decimal, $thousands), '0'), $decimal) . 'gb'; } } diff --git a/Utils/Converter/Ip.php b/Utils/Converter/Ip.php index 1508210ee..7b2332772 100644 --- a/Utils/Converter/Ip.php +++ b/Utils/Converter/Ip.php @@ -47,7 +47,7 @@ final class Ip */ public static function ip2Float(string $ip) : float { - $split = \explode('.', $ip); + $split = explode('.', $ip); return ((int) $split[0] ?? 0) * (256 ** 3) + ((int) $split[1] ?? 0) * (256 ** 2) diff --git a/Utils/Converter/Numeric.php b/Utils/Converter/Numeric.php index a569ece83..c69510179 100644 --- a/Utils/Converter/Numeric.php +++ b/Utils/Converter/Numeric.php @@ -65,9 +65,9 @@ final class Numeric return $numberInput; } - $fromBase = \str_split($fromBaseInput, 1); - $toBase = \str_split($toBaseInput, 1); - $number = \str_split($numberInput, 1); + $fromBase = str_split($fromBaseInput, 1); + $toBase = str_split($toBaseInput, 1); + $number = str_split($numberInput, 1); $fromLen = \strlen($fromBaseInput); $toLen = \strlen($toBaseInput); $numberLen = \strlen($numberInput); @@ -77,11 +77,11 @@ final class Numeric $newOutput = '0'; for ($i = 1; $i <= $numberLen; ++$i) { - $newOutput = \bcadd( + $newOutput = bcadd( $newOutput, - \bcmul( - (string) \array_search($number[$i - 1], $fromBase), - \bcpow((string) $fromLen, (string) ($numberLen - $i)) + bcmul( + (string) array_search($number[$i - 1], $fromBase), + bcpow((string) $fromLen, (string) ($numberLen - $i)) ) ); } @@ -96,8 +96,8 @@ final class Numeric } while ($base10 !== '0') { - $newOutput = $toBase[(int) \bcmod((string) $base10, (string) $toLen)] . $newOutput; - $base10 = \bcdiv((string) $base10, (string) $toLen, 0); + $newOutput = $toBase[(int) bcmod((string) $base10, (string) $toLen)] . $newOutput; + $base10 = bcdiv((string) $base10, (string) $toLen, 0); } return $newOutput; @@ -145,9 +145,9 @@ final class Numeric $result = 0; foreach (self::ROMANS as $key => $value) { - while (\strpos($roman, $key) === 0) { + while (strpos($roman, $key) === 0) { $result += $value; - $temp = \substr($roman, \strlen($key)); + $temp = substr($roman, \strlen($key)); if ($temp !== false) { $roman = $temp; @@ -174,8 +174,8 @@ final class Numeric $alpha = ''; for ($i = 1; $number >= 0 && $i < 10; ++$i) { - $alpha = \chr(0x41 + (int) ($number % \pow(26, $i) / \pow(26, $i - 1))) . $alpha; - $number -= \pow(26, $i); + $alpha = \chr(0x41 + (int) ($number % pow(26, $i) / pow(26, $i - 1))) . $alpha; + $number -= pow(26, $i); } return $alpha; @@ -196,7 +196,7 @@ final class Numeric $length = \strlen($alpha); for ($i = 0; $i < $length; ++$i) { - $numeric += \pow(26, $i) * (\ord($alpha[$length - $i - 1]) - 0x40); + $numeric += pow(26, $i) * (\ord($alpha[$length - $i - 1]) - 0x40); } return (int) $numeric - 1; diff --git a/Utils/Encoding/Huffman/Dictionary.php b/Utils/Encoding/Huffman/Dictionary.php index 504500c29..00f659bf2 100644 --- a/Utils/Encoding/Huffman/Dictionary.php +++ b/Utils/Encoding/Huffman/Dictionary.php @@ -80,17 +80,17 @@ final class Dictionary /** @var array> $count */ $count = []; while (isset($source[0])) { - $count[] = [\substr_count($source, $source[0]), $source[0]]; - $source = \str_replace($source[0], '', $source); + $count[] = [substr_count($source, $source[0]), $source[0]]; + $source = str_replace($source[0], '', $source); } - \sort($count); + sort($count); while (\count($count) > 1) { - $row1 = \array_shift($count); - $row2 = \array_shift($count); + $row1 = array_shift($count); + $row2 = array_shift($count); $count[] = [$row1[0] + $row2[0], [$row1, $row2]]; - \sort($count); + sort($count); } $this->fill(\is_array($count[0][1]) ? $count[0][1] : $count); @@ -145,7 +145,7 @@ final class Dictionary throw new \InvalidArgumentException('Character already exists'); } - if (\strlen(\str_replace('0', '', \str_replace('1', '', $value))) !== 0) { + if (\strlen(str_replace('0', '', str_replace('1', '', $value))) !== 0) { throw new \InvalidArgumentException('Bad formatting.'); } @@ -203,11 +203,11 @@ final class Dictionary } for ($i = $this->min; $i <= $this->max; ++$i) { - $needle = \substr($value, 0, $i); + $needle = substr($value, 0, $i); foreach ($this->dictionary as $key => $val) { if ($needle === $val) { - $value = \substr($value, $i); + $value = substr($value, $i); return $key; } diff --git a/Utils/Encoding/Huffman/Huffman.php b/Utils/Encoding/Huffman/Huffman.php index c81b04111..bce7f540d 100644 --- a/Utils/Encoding/Huffman/Huffman.php +++ b/Utils/Encoding/Huffman/Huffman.php @@ -82,7 +82,7 @@ final class Huffman $binary .= $this->dictionary->get($source[$i]); } - $splittedBinaryString = \str_split('1' . $binary . '1', 8); + $splittedBinaryString = str_split('1' . $binary . '1', 8); $binary = ''; if ($splittedBinaryString === false) { @@ -94,7 +94,7 @@ final class Huffman $c .= '0'; } - $binary .= \chr((int) \bindec($c)); + $binary .= \chr((int) bindec($c)); } return $binary; @@ -120,33 +120,33 @@ final class Huffman $source = ''; for ($i = 0; $i < $rawLenght; ++$i) { - $decbin = \decbin(\ord($raw[$i])); + $decbin = decbin(\ord($raw[$i])); while (\strlen($decbin) < 8) { $decbin = '0' . $decbin; } if ($i === 0) { - $pos = \strpos($decbin, '1'); + $pos = strpos($decbin, '1'); if ($pos === false) { throw new \Exception(); // @codeCoverageIgnore } - $decbin = \substr($decbin, $pos + 1); + $decbin = substr($decbin, $pos + 1); if ($decbin === false) { throw new \Exception(); // @codeCoverageIgnore } } if ($i + 1 === $rawLenght) { - $pos = \strrpos($decbin, '1'); + $pos = strrpos($decbin, '1'); if ($pos === false) { throw new \Exception(); // @codeCoverageIgnore } - $decbin = \substr($decbin, 0, $pos); + $decbin = substr($decbin, 0, $pos); if ($decbin === false) { throw new \Exception(); // @codeCoverageIgnore } diff --git a/Utils/Git/Git.php b/Utils/Git/Git.php index 68fadfb14..80f0d7376 100644 --- a/Utils/Git/Git.php +++ b/Utils/Git/Git.php @@ -45,16 +45,16 @@ class Git public static function test() : bool { $pipes = []; - $resource = \proc_open(\escapeshellarg(self::getBin()), [1 => ['pipe', 'w'], 2 => ['pipe', 'w']], $pipes); + $resource = proc_open(escapeshellarg(self::getBin()), [1 => ['pipe', 'w'], 2 => ['pipe', 'w']], $pipes); - $stdout = \stream_get_contents($pipes[1]); - $stderr = \stream_get_contents($pipes[2]); + $stdout = stream_get_contents($pipes[1]); + $stderr = stream_get_contents($pipes[2]); foreach ($pipes as $pipe) { - \fclose($pipe); + fclose($pipe); } - return $resource !== false && \proc_close($resource) !== 127; + return $resource !== false && proc_close($resource) !== 127; } /** @@ -82,10 +82,10 @@ class Git */ public static function setBin(string $path) : void { - if (\realpath($path) === false) { + if (realpath($path) === false) { throw new PathException($path); } - self::$bin = \realpath($path); + self::$bin = realpath($path); } } diff --git a/Utils/Git/Repository.php b/Utils/Git/Repository.php index c0f5bede2..a0b2511eb 100644 --- a/Utils/Git/Repository.php +++ b/Utils/Git/Repository.php @@ -69,7 +69,7 @@ class Repository */ public function __construct(string $path = '') { - if (\is_dir($path)) { + if (is_dir($path)) { $this->setPath($path); } @@ -89,16 +89,16 @@ class Repository */ private function setPath(string $path) : void { - if (!\is_dir($path) || \realpath($path) === false) { + if (!is_dir($path) || realpath($path) === false) { throw new PathException($path); } - $this->path = \realpath($path); + $this->path = realpath($path); - if (\is_dir($this->path . '/.git') && \is_dir($this->path . '/.git')) { + if (is_dir($this->path . '/.git') && is_dir($this->path . '/.git')) { $this->bare = false; - } elseif (\is_file($this->path . '/config')) { // Is this a bare repo? - $parseIni = \parse_ini_file($this->path . '/config'); + } elseif (is_file($this->path . '/config')) { // Is this a bare repo? + $parseIni = parse_ini_file($this->path . '/config'); if ($parseIni !== false && $parseIni['bare']) { $this->bare = true; @@ -128,15 +128,15 @@ class Repository public function getActiveBranch() : Branch { $branches = $this->getBranches(); - $active = \preg_grep('/^\*/', $branches); + $active = preg_grep('/^\*/', $branches); if (!\is_array($active)) { return new Branch(); } - \reset($active); + reset($active); - return new Branch(\current($active)); + return new Branch(current($active)); } /** @@ -152,7 +152,7 @@ class Repository $result = []; foreach ($branches as $key => $branch) { - $branch = \trim($branch, '* '); + $branch = trim($branch, '* '); if ($branch !== '') { $result[] = $branch; @@ -175,14 +175,14 @@ class Repository */ private function run(string $cmd) : array { - if (\strtolower((string) \substr(\PHP_OS, 0, 3)) == 'win') { - $cmd = 'cd ' . \escapeshellarg(\dirname(Git::getBin())) - . ' && ' . \basename(Git::getBin()) - . ' -C ' . \escapeshellarg($this->path) . ' ' + if (strtolower((string) substr(\PHP_OS, 0, 3)) == 'win') { + $cmd = 'cd ' . escapeshellarg(\dirname(Git::getBin())) + . ' && ' . basename(Git::getBin()) + . ' -C ' . escapeshellarg($this->path) . ' ' . $cmd; } else { - $cmd = \escapeshellarg(Git::getBin()) - . ' -C ' . \escapeshellarg($this->path) . ' ' + $cmd = escapeshellarg(Git::getBin()) + . ' -C ' . escapeshellarg($this->path) . ' ' . $cmd; } @@ -192,26 +192,26 @@ class Repository 2 => ['pipe', 'w'], ]; - $resource = \proc_open($cmd, $desc, $pipes, $this->path, null); + $resource = proc_open($cmd, $desc, $pipes, $this->path, null); if ($resource === false) { throw new \Exception(); } - $stdout = \stream_get_contents($pipes[1]); - $stderr = \stream_get_contents($pipes[2]); + $stdout = stream_get_contents($pipes[1]); + $stderr = stream_get_contents($pipes[2]); foreach ($pipes as $pipe) { - \fclose($pipe); + fclose($pipe); } - $status = \proc_close($resource); + $status = proc_close($resource); if ($status == -1) { throw new \Exception((string) $stderr); } - return $this->parseLines(\trim($stdout === false ? '' : $stdout)); + return $this->parseLines(trim($stdout === false ? '' : $stdout)); } /** @@ -225,7 +225,7 @@ class Repository */ private function parseLines(string $lines) : array { - $lineArray = \preg_split('/\r\n|\n|\r/', $lines); + $lineArray = preg_split('/\r\n|\n|\r/', $lines); $lines = []; if ($lineArray === false) { @@ -233,7 +233,7 @@ class Repository } foreach ($lineArray as $key => $line) { - $temp = \preg_replace('/\s+/', ' ', \trim($line, ' ')); + $temp = preg_replace('/\s+/', ' ', trim($line, ' ')); if (!empty($temp)) { $lines[] = $temp; @@ -256,12 +256,12 @@ class Repository */ public function create(string $source = null) : void { - if (!\is_dir($this->path) || \is_dir($this->path . '/.git')) { + if (!is_dir($this->path) || is_dir($this->path . '/.git')) { throw new \Exception('Already repository'); } if ($source !== null) { - \stripos($source, '//') !== false ? $this->cloneRemote($source) : $this->cloneFrom($source); + stripos($source, '//') !== false ? $this->cloneRemote($source) : $this->cloneFrom($source); return; } @@ -278,7 +278,7 @@ class Repository */ public function status() : string { - return \implode("\n", $this->run('status')); + return implode("\n", $this->run('status')); } /** @@ -296,7 +296,7 @@ class Repository { $files = $this->parseFileList($files); - return \implode("\n", $this->run('add ' . $files . ' -v')); + return implode("\n", $this->run('add ' . $files . ' -v')); } /** @@ -313,7 +313,7 @@ class Repository { $files = $this->parseFileList($files); - return \implode("\n", $this->run('rm ' . ($cached ? '--cached ' : '') . $files)); + return implode("\n", $this->run('rm ' . ($cached ? '--cached ' : '') . $files)); } /** @@ -330,7 +330,7 @@ class Repository private function parseFileList(string | array $files) : string { if (\is_array($files)) { - return '"' . \implode('" "', $files) . '"'; + return '"' . implode('" "', $files) . '"'; } return $files; @@ -348,7 +348,7 @@ class Repository */ public function commit(Commit $commit, bool $all = true) : string { - return \implode("\n", $this->run('commit ' . ($all ? '-av' : '-v') . ' -m ' . \escapeshellarg($commit->getMessage()))); + return implode("\n", $this->run('commit ' . ($all ? '-av' : '-v') . ' -m ' . escapeshellarg($commit->getMessage()))); } /** @@ -364,11 +364,11 @@ class Repository */ public function cloneTo(string $target) : string { - if (!\is_dir($target)) { + if (!is_dir($target)) { throw new PathException($target); } - return \implode("\n", $this->run('clone --local ' . $this->path . ' ' . $target)); + return implode("\n", $this->run('clone --local ' . $this->path . ' ' . $target)); } /** @@ -384,11 +384,11 @@ class Repository */ public function cloneFrom(string $source) : string { - if (!\is_dir($source)) { + if (!is_dir($source)) { throw new PathException($source); } - return \implode("\n", $this->run('clone --local ' . $source . ' ' . $this->path)); + return implode("\n", $this->run('clone --local ' . $source . ' ' . $this->path)); } /** @@ -402,7 +402,7 @@ class Repository */ public function cloneRemote(string $source) : string { - return \implode("\n", $this->run('clone ' . $source . ' ' . $this->path)); + return implode("\n", $this->run('clone ' . $source . ' ' . $this->path)); } /** @@ -417,7 +417,7 @@ class Repository */ public function clean(bool $dirs = false, bool $force = false) : string { - return \implode("\n", $this->run('clean' . ($force ? ' -f' : '') . ($dirs ? ' -d' : ''))); + return implode("\n", $this->run('clean' . ($force ? ' -f' : '') . ($dirs ? ' -d' : ''))); } /** @@ -432,7 +432,7 @@ class Repository */ public function createBranch(Branch $branch, bool $force = false) : string { - return \implode("\n", $this->run('branch ' . ($force ? '-D' : '-d') . ' ' . $branch->name)); + return implode("\n", $this->run('branch ' . ($force ? '-D' : '-d') . ' ' . $branch->name)); } /** @@ -446,8 +446,8 @@ class Repository { if (empty($this->name)) { $path = $this->getDirectoryPath(); - $path = \str_replace('\\', '/', $path); - $path = \explode('/', $path); + $path = str_replace('\\', '/', $path); + $path = explode('/', $path); $this->name = $path[\count($path) - ($this->bare ? 1 : 2)]; } @@ -479,7 +479,7 @@ class Repository $result = []; foreach ($branches as $key => $branch) { - $branch = \trim($branch, '* '); + $branch = trim($branch, '* '); if ($branch !== '') { $result[] = $branch; @@ -500,7 +500,7 @@ class Repository */ public function checkout(Branch $branch) : string { - $result = \implode("\n", $this->run('checkout ' . $branch->name)); + $result = implode("\n", $this->run('checkout ' . $branch->name)); $this->branch = $branch; return $result; @@ -517,7 +517,7 @@ class Repository */ public function merge(Branch $branch) : string { - return \implode("\n", $this->run('merge ' . $branch->name . ' --no-ff')); + return implode("\n", $this->run('merge ' . $branch->name . ' --no-ff')); } /** @@ -529,7 +529,7 @@ class Repository */ public function fetch() : string { - return \implode("\n", $this->run('fetch')); + return implode("\n", $this->run('fetch')); } /** @@ -543,7 +543,7 @@ class Repository */ public function createTag(Tag $tag) : string { - return \implode("\n", $this->run('tag -a ' . $tag->getName() . ' -m ' . \escapeshellarg($tag->getMessage()))); + return implode("\n", $this->run('tag -a ' . $tag->getName() . ' -m ' . escapeshellarg($tag->getMessage()))); } /** @@ -580,9 +580,9 @@ class Repository */ public function push(string $remote, Branch $branch) : string { - $remote = \escapeshellarg($remote); + $remote = escapeshellarg($remote); - return \implode("\n", $this->run('push --tags ' . $remote . ' ' . $branch->name)); + return implode("\n", $this->run('push --tags ' . $remote . ' ' . $branch->name)); } /** @@ -597,9 +597,9 @@ class Repository */ public function pull(string $remote, Branch $branch) : string { - $remote = \escapeshellarg($remote); + $remote = escapeshellarg($remote); - return \implode("\n", $this->run('pull ' . $remote . ' ' . $branch->name)); + return implode("\n", $this->run('pull ' . $remote . ' ' . $branch->name)); } /** @@ -613,7 +613,7 @@ class Repository */ public function setDescription(string $description) : void { - \file_put_contents($this->getDirectoryPath(), $description); + file_put_contents($this->getDirectoryPath(), $description); } /** @@ -625,7 +625,7 @@ class Repository */ public function getDescription() : string { - return (string) \file_get_contents($this->getDirectoryPath() . '/description'); + return (string) file_get_contents($this->getDirectoryPath() . '/description'); } /** @@ -665,22 +665,22 @@ class Repository continue; } - if (!\is_dir($path = $this->getDirectoryPath() . ($this->bare ? '/' : '/../') . $line)) { + if (!is_dir($path = $this->getDirectoryPath() . ($this->bare ? '/' : '/../') . $line)) { return 0; } - $fh = \fopen($path, 'r'); + $fh = fopen($path, 'r'); if (!$fh) { return 0; } - while (!\feof($fh)) { - \fgets($fh); + while (!feof($fh)) { + fgets($fh); ++$loc; } - \fclose($fh); + fclose($fh); } return $loc; @@ -710,9 +710,9 @@ class Repository $contributors = []; foreach ($lines as $line) { - \preg_match('/^[0-9]*/', $line, $matches); + preg_match('/^[0-9]*/', $line, $matches); - $author = \substr($line, \strlen($matches[0]) + 1); + $author = substr($line, \strlen($matches[0]) + 1); $contributor = new Author($author === false ? '' : $author); $contributor->setCommitCount($this->getCommitsCount($start, $end)[$contributor->name]); @@ -750,9 +750,9 @@ class Repository $commits = []; foreach ($lines as $line) { - \preg_match('/^[0-9]*/', $line, $matches); + preg_match('/^[0-9]*/', $line, $matches); - $temp = \substr($line, \strlen($matches[0]) + 1); + $temp = substr($line, \strlen($matches[0]) + 1); if ($temp !== false) { $commits[$temp] = (int) $matches[0]; } @@ -784,14 +784,14 @@ class Repository $addremove = ['added' => 0, 'removed' => 0]; $lines = $this->run( - 'log --author=' . \escapeshellarg($author->name) + 'log --author=' . escapeshellarg($author->name) . ' --since="' . $start->format('Y-m-d') . '" --before="' . $end->format('Y-m-d') . '" --pretty=tformat: --numstat' ); foreach ($lines as $line) { - $nums = \explode(' ', $line); + $nums = explode(' ', $line); $addremove['added'] += $nums[0]; $addremove['removed'] += $nums[1]; @@ -809,7 +809,7 @@ class Repository */ public function getRemote() : string { - return \implode("\n", $this->run('config --get remote.origin.url')); + return implode("\n", $this->run('config --get remote.origin.url')); } /** @@ -836,7 +836,7 @@ class Repository if ($author === null) { $author = ''; } else { - $author = ' --author=' . \escapeshellarg($author->name) . ''; + $author = ' --author=' . escapeshellarg($author->name) . ''; } $lines = $this->run( @@ -848,7 +848,7 @@ class Repository $commits = []; for ($i = 0; $i < $count; ++$i) { - $match = \preg_match('/[0-9ABCDEFabcdef]{40}/', $lines[$i], $matches); + $match = preg_match('/[0-9ABCDEFabcdef]{40}/', $lines[$i], $matches); if ($match !== false && $match !== 0) { $commit = $this->getCommit($matches[0]); @@ -872,14 +872,14 @@ class Repository */ public function getCommit(string $commit) : Commit { - $lines = $this->run('show --name-only ' . \escapeshellarg($commit)); + $lines = $this->run('show --name-only ' . escapeshellarg($commit)); $count = \count($lines); if (empty($lines)) { return new NullCommit(); } - \preg_match('/[0-9ABCDEFabcdef]{40}/', $lines[0], $matches); + preg_match('/[0-9ABCDEFabcdef]{40}/', $lines[0], $matches); if (!isset($matches[0]) || \strlen($matches[0]) !== 40) { throw new \Exception('Invalid commit id'); @@ -889,21 +889,21 @@ class Repository return new Commit(); } - $author = \explode(':', $lines[1] ?? ''); + $author = explode(':', $lines[1] ?? ''); if (\count($author) < 2) { $author = ['none', 'none']; } else { - $author = \explode('<', \trim($author[1] ?? '')); + $author = explode('<', trim($author[1] ?? '')); } - $date = \substr($lines[2] ?? '', 6); + $date = substr($lines[2] ?? '', 6); if ($date === false) { $date = 'now'; } $commit = new Commit($matches[0]); - $commit->setAuthor(new Author(\trim($author[0] ?? ''), \rtrim($author[1] ?? '', '>'))); - $commit->setDate(new \DateTime(\trim($date ?? 'now'))); + $commit->setAuthor(new Author(trim($author[0] ?? ''), rtrim($author[1] ?? '', '>'))); + $commit->setDate(new \DateTime(trim($date ?? 'now'))); $commit->setMessage($lines[3]); $commit->setTag(new Tag()); $commit->setRepository($this); @@ -935,7 +935,7 @@ class Repository return new NullCommit(); } - \preg_match('/[0-9ABCDEFabcdef]{40}/', $lines[0], $matches); + preg_match('/[0-9ABCDEFabcdef]{40}/', $lines[0], $matches); if (!isset($matches[0]) || \strlen($matches[0]) !== 40) { throw new \Exception('Invalid commit id'); diff --git a/Utils/IO/Csv/CsvSettings.php b/Utils/IO/Csv/CsvSettings.php index a8b664426..f5a7246c8 100644 --- a/Utils/IO/Csv/CsvSettings.php +++ b/Utils/IO/Csv/CsvSettings.php @@ -39,7 +39,7 @@ class CsvSettings { $results = []; $i = 0; - $line = \fgets($file); + $line = fgets($file); if ($line === false) { return ';'; // @codeCoverageIgnore @@ -50,7 +50,7 @@ class CsvSettings foreach ($delimiters as $delimiter) { $regExp = '/[' . $delimiter . ']/'; - $fields = \preg_split($regExp, $line); + $fields = preg_split($regExp, $line); if ($fields === false) { return ';'; // @codeCoverageIgnore @@ -65,12 +65,12 @@ class CsvSettings } } - $line = \fgets($file); + $line = fgets($file); } - \rewind($file); + rewind($file); - $results = \array_keys($results, \max($results)); + $results = array_keys($results, max($results)); return $results[0]; } @@ -89,14 +89,14 @@ class CsvSettings public static function getStringDelimiter(string $content, int $checkLines = 2, array $delimiters = [',', "\t", ';', '|', ':']) : string { $results = []; - $lines = \explode("\n", $content); + $lines = explode("\n", $content); $i = 0; do { $line = $lines[$i]; foreach ($delimiters as $delimiter) { $regExp = '/[' . $delimiter . ']/'; - $fields = \preg_split($regExp, $line); + $fields = preg_split($regExp, $line); if ($fields === false) { return ';'; // @codeCoverageIgnore @@ -114,7 +114,7 @@ class CsvSettings ++$i; } while ($i < $checkLines); - $results = \array_keys($results, \max($results)); + $results = array_keys($results, max($results)); return $results[0]; } diff --git a/Utils/IO/Spreadsheet/SpreadsheetDatabaseMapper.php b/Utils/IO/Spreadsheet/SpreadsheetDatabaseMapper.php index 44fc9a4c9..6d0134cad 100644 --- a/Utils/IO/Spreadsheet/SpreadsheetDatabaseMapper.php +++ b/Utils/IO/Spreadsheet/SpreadsheetDatabaseMapper.php @@ -143,7 +143,7 @@ class SpreadsheetDatabaseMapper implements IODatabaseMapper } $colCount = \count($results[0]); - $columns = \array_keys($results[0]); + $columns = array_keys($results[0]); // set column titles for ($i = 1; $i <= $colCount; ++$i) { diff --git a/Utils/IO/Zip/Gz.php b/Utils/IO/Zip/Gz.php index 79e6b5ba3..30b0d0f59 100644 --- a/Utils/IO/Zip/Gz.php +++ b/Utils/IO/Zip/Gz.php @@ -31,29 +31,29 @@ class Gz implements ArchiveInterface */ public static function pack(string | array $source, string $destination, bool $overwrite = false) : bool { - $destination = \str_replace('\\', '/', $destination); + $destination = str_replace('\\', '/', $destination); if ($destination === false || \is_array($source) - || (!$overwrite && \is_file($destination)) - || !\is_file($source) + || (!$overwrite && is_file($destination)) + || !is_file($source) ) { return false; } - $gz = \gzopen($destination, 'w'); - $src = \fopen($source, 'r'); + $gz = gzopen($destination, 'w'); + $src = fopen($source, 'r'); if ($gz === false || $src === false) { return false; // @codeCoverageIgnore } - while (!\feof($src)) { - $read = \fread($src, 4096); - \gzwrite($gz, $read === false ? '' : $read); + while (!feof($src)) { + $read = fread($src, 4096); + gzwrite($gz, $read === false ? '' : $read); } - \fclose($src); + fclose($src); - return \gzclose($gz); + return gzclose($gz); } /** @@ -61,23 +61,23 @@ class Gz implements ArchiveInterface */ public static function unpack(string $source, string $destination) : bool { - $destination = \str_replace('\\', '/', $destination); - if (\is_file($destination) || !\is_file($source)) { + $destination = str_replace('\\', '/', $destination); + if (is_file($destination) || !is_file($source)) { return false; } - $gz = \gzopen($source, 'r'); - $dest = \fopen($destination, 'w'); + $gz = gzopen($source, 'r'); + $dest = fopen($destination, 'w'); if ($gz === false || $dest === false) { return false; // @codeCoverageIgnore } - while (!\gzeof($gz) && ($read = \gzread($gz, 4096)) !== false) { - \fwrite($dest, $read); + while (!gzeof($gz) && ($read = gzread($gz, 4096)) !== false) { + fwrite($dest, $read); } - \fclose($dest); + fclose($dest); - return \gzclose($gz); + return gzclose($gz); } } diff --git a/Utils/IO/Zip/Tar.php b/Utils/IO/Zip/Tar.php index 6f3654d06..51482042e 100644 --- a/Utils/IO/Zip/Tar.php +++ b/Utils/IO/Zip/Tar.php @@ -34,9 +34,9 @@ class Tar implements ArchiveInterface */ public static function pack(string | array $sources, string $destination, bool $overwrite = false) : bool { - $destination = FileUtils::absolute(\str_replace('\\', '/', $destination)); - if ((!$overwrite && \is_file($destination)) - || \is_dir($destination) + $destination = FileUtils::absolute(str_replace('\\', '/', $destination)); + if ((!$overwrite && is_file($destination)) + || is_dir($destination) ) { return false; } @@ -55,36 +55,36 @@ class Tar implements ArchiveInterface $source = $relative; } - $source = FileUtils::absolute(\str_replace('\\', '/', $source)); - $relative = \str_replace('\\', '/', $relative); + $source = FileUtils::absolute(str_replace('\\', '/', $source)); + $relative = str_replace('\\', '/', $relative); - if (\is_dir($source)) { + if (is_dir($source)) { $files = new \RecursiveIteratorIterator( new \RecursiveDirectoryIterator($source, \FilesystemIterator::CURRENT_AS_PATHNAME), \RecursiveIteratorIterator::SELF_FIRST ); foreach ($files as $file) { - $file = \str_replace('\\', '/', $file); + $file = str_replace('\\', '/', $file); /* Ignore . and .. */ - if (($pos = \mb_strrpos($file, '/')) === false - || \in_array(\mb_substr($file, $pos + 1), ['.', '..']) + if (($pos = mb_strrpos($file, '/')) === false + || \in_array(mb_substr($file, $pos + 1), ['.', '..']) ) { continue; } - $absolute = \realpath($file); - $absolute = \str_replace('\\', '/', (string) $absolute); - $dir = \ltrim(\rtrim($relative, '/\\') . '/' . \ltrim(\str_replace($source . '/', '', $absolute), '/\\'), '/\\'); + $absolute = realpath($file); + $absolute = str_replace('\\', '/', (string) $absolute); + $dir = ltrim(rtrim($relative, '/\\') . '/' . ltrim(str_replace($source . '/', '', $absolute), '/\\'), '/\\'); - if (\is_dir($absolute)) { + if (is_dir($absolute)) { $tar->addEmptyDir($dir . '/'); - } elseif (\is_file($absolute)) { + } elseif (is_file($absolute)) { $tar->addFile($absolute, $dir); } } - } elseif (\is_file($source)) { + } elseif (is_file($source)) { $tar->addFile($source, $relative); } else { continue; @@ -99,17 +99,17 @@ class Tar implements ArchiveInterface */ public static function unpack(string $source, string $destination) : bool { - if (!\is_file($source)) { + if (!is_file($source)) { return false; } - if (!\is_dir($destination)) { + if (!is_dir($destination)) { Directory::create($destination, recursive: true); } try { - $destination = \str_replace('\\', '/', $destination); - $destination = \rtrim($destination, '/'); + $destination = str_replace('\\', '/', $destination); + $destination = rtrim($destination, '/'); $tar = new \PharData($source); $tar->extractTo($destination . '/'); diff --git a/Utils/IO/Zip/TarGz.php b/Utils/IO/Zip/TarGz.php index 8d74486e8..127067bff 100644 --- a/Utils/IO/Zip/TarGz.php +++ b/Utils/IO/Zip/TarGz.php @@ -33,8 +33,8 @@ class TarGz implements ArchiveInterface */ public static function pack(string | array $source, string $destination, bool $overwrite = false) : bool { - $destination = \str_replace('\\', '/', $destination); - if (!$overwrite && \is_file($destination)) { + $destination = str_replace('\\', '/', $destination); + if (!$overwrite && is_file($destination)) { return false; } @@ -45,7 +45,7 @@ class TarGz implements ArchiveInterface $pack = Gz::pack($destination . '.tmp', $destination, $overwrite); if ($pack) { - \unlink($destination . '.tmp'); + unlink($destination . '.tmp'); } return $pack; @@ -56,8 +56,8 @@ class TarGz implements ArchiveInterface */ public static function unpack(string $source, string $destination) : bool { - $destination = \str_replace('\\', '/', $destination); - if (!\is_dir($destination) || !\is_file($source)) { + $destination = str_replace('\\', '/', $destination); + if (!is_dir($destination) || !is_file($source)) { return false; } @@ -66,7 +66,7 @@ class TarGz implements ArchiveInterface } $unpacked = Tar::unpack($destination . '/' . File::name($source) . '.tmp', $destination); - \unlink($destination . '/' . File::name($source) . '.tmp'); + unlink($destination . '/' . File::name($source) . '.tmp'); return $unpacked; } diff --git a/Utils/IO/Zip/Zip.php b/Utils/IO/Zip/Zip.php index 699b60103..fa68bc755 100644 --- a/Utils/IO/Zip/Zip.php +++ b/Utils/IO/Zip/Zip.php @@ -34,9 +34,9 @@ class Zip implements ArchiveInterface */ public static function pack(string | array $sources, string $destination, bool $overwrite = false) : bool { - $destination = FileUtils::absolute(\str_replace('\\', '/', $destination)); - if ((!$overwrite && \is_file($destination)) - || \is_dir($destination) + $destination = FileUtils::absolute(str_replace('\\', '/', $destination)); + if ((!$overwrite && is_file($destination)) + || is_dir($destination) ) { return false; } @@ -58,36 +58,36 @@ class Zip implements ArchiveInterface $source = $relative; } - $source = FileUtils::absolute(\str_replace('\\', '/', $source)); - $relative = \str_replace('\\', '/', $relative); + $source = FileUtils::absolute(str_replace('\\', '/', $source)); + $relative = str_replace('\\', '/', $relative); - if (\is_dir($source)) { + if (is_dir($source)) { $files = new \RecursiveIteratorIterator( new \RecursiveDirectoryIterator($source, \FilesystemIterator::CURRENT_AS_PATHNAME), \RecursiveIteratorIterator::SELF_FIRST ); foreach ($files as $file) { - $file = \str_replace('\\', '/', $file); + $file = str_replace('\\', '/', $file); /* Ignore . and .. */ - if (($pos = \mb_strrpos($file, '/')) === false - || \in_array(\mb_substr($file, $pos + 1), ['.', '..']) + if (($pos = mb_strrpos($file, '/')) === false + || \in_array(mb_substr($file, $pos + 1), ['.', '..']) ) { continue; } - $absolute = \realpath($file); - $absolute = \str_replace('\\', '/', (string) $absolute); - $dir = \ltrim(\rtrim($relative, '/\\') . '/' . \ltrim(\str_replace($source . '/', '', $absolute), '/\\'), '/\\'); + $absolute = realpath($file); + $absolute = str_replace('\\', '/', (string) $absolute); + $dir = ltrim(rtrim($relative, '/\\') . '/' . ltrim(str_replace($source . '/', '', $absolute), '/\\'), '/\\'); - if (\is_dir($absolute)) { + if (is_dir($absolute)) { $zip->addEmptyDir($dir . '/'); - } elseif (\is_file($absolute)) { + } elseif (is_file($absolute)) { $zip->addFile($absolute, $dir); } } - } elseif (\is_file($source)) { + } elseif (is_file($source)) { $zip->addFile($source, $relative); } else { continue; @@ -102,16 +102,16 @@ class Zip implements ArchiveInterface */ public static function unpack(string $source, string $destination) : bool { - if (!\is_file($source)) { + if (!is_file($source)) { return false; } - if (!\is_dir($destination)) { + if (!is_dir($destination)) { Directory::create($destination, recursive: true); } - $destination = \str_replace('\\', '/', $destination); - $destination = \rtrim($destination, '/'); + $destination = str_replace('\\', '/', $destination); + $destination = rtrim($destination, '/'); try { $zip = new \ZipArchive(); diff --git a/Utils/ImageUtils.php b/Utils/ImageUtils.php index 968fc6f26..08d6d079b 100644 --- a/Utils/ImageUtils.php +++ b/Utils/ImageUtils.php @@ -47,9 +47,9 @@ final class ImageUtils */ public static function decodeBase64Image(string $img) : string { - $img = \str_replace('data:image/png;base64,', '', $img); - $img = \str_replace(' ', '+', $img); + $img = str_replace('data:image/png;base64,', '', $img); + $img = str_replace(' ', '+', $img); - return (string) \base64_decode($img); + return (string) base64_decode($img); } } diff --git a/Utils/MbStringUtils.php b/Utils/MbStringUtils.php index e3c05db0d..9e47d2443 100644 --- a/Utils/MbStringUtils.php +++ b/Utils/MbStringUtils.php @@ -59,7 +59,7 @@ final class MbStringUtils public static function mb_contains(string $haystack, array $needles) : bool { foreach ($needles as $needle) { - if (\mb_strpos($haystack, $needle) !== false) { + if (mb_strpos($haystack, $needle) !== false) { return true; } } @@ -87,7 +87,7 @@ final class MbStringUtils } foreach ($needles as $needle) { - if ($needle === '' || \mb_strrpos($haystack, $needle, -\mb_strlen($haystack)) !== false) { + if ($needle === '' || mb_strrpos($haystack, $needle, -mb_strlen($haystack)) !== false) { return true; } } @@ -119,7 +119,7 @@ final class MbStringUtils } foreach ($needles as $needle) { - if ($needle === '' || (($temp = \mb_strlen($haystack) - \mb_strlen($needle)) >= 0 && \mb_strpos($haystack, $needle, $temp) !== false)) { + if ($needle === '' || (($temp = mb_strlen($haystack) - mb_strlen($needle)) >= 0 && mb_strpos($haystack, $needle, $temp) !== false)) { return true; } } @@ -138,11 +138,11 @@ final class MbStringUtils */ public static function mb_ucfirst(string $string) : string { - $strlen = \mb_strlen($string); - $firstChar = \mb_substr($string, 0, 1); - $then = \mb_substr($string, 1, $strlen - 1); + $strlen = mb_strlen($string); + $firstChar = mb_substr($string, 0, 1); + $then = mb_substr($string, 1, $strlen - 1); - return \mb_strtoupper($firstChar) . $then; + return mb_strtoupper($firstChar) . $then; } /** @@ -156,11 +156,11 @@ final class MbStringUtils */ public static function mb_lcfirst(string $string) : string { - $strlen = \mb_strlen($string); - $firstChar = \mb_substr($string, 0, 1); - $then = \mb_substr($string, 1, $strlen - 1); + $strlen = mb_strlen($string); + $firstChar = mb_substr($string, 0, 1); + $then = mb_substr($string, 1, $strlen - 1); - return \mb_strtolower($firstChar) . $then; + return mb_strtolower($firstChar) . $then; } /** @@ -176,11 +176,11 @@ final class MbStringUtils public static function mb_trim(string $string, string $charlist = ' ') : string { if ($charlist === ' ') { - return \trim($string); + return trim($string); } else { - $charlist = \str_replace('/', '\/', \preg_quote($charlist)); + $charlist = str_replace('/', '\/', preg_quote($charlist)); - return \preg_replace('/(^[' . $charlist . ']+)|([ ' . $charlist . ']+$)/us', '', $string) ?? ''; + return preg_replace('/(^[' . $charlist . ']+)|([ ' . $charlist . ']+$)/us', '', $string) ?? ''; } } @@ -197,11 +197,11 @@ final class MbStringUtils public static function mb_rtrim(string $string, string $charlist = ' ') : string { if ($charlist === ' ') { - return \rtrim($string); + return rtrim($string); } else { - $charlist = \str_replace('/', '\/', \preg_quote($charlist)); + $charlist = str_replace('/', '\/', preg_quote($charlist)); - return \preg_replace('/([' . $charlist . ']+$)/us', '', $string) ?? ''; + return preg_replace('/([' . $charlist . ']+$)/us', '', $string) ?? ''; } } @@ -218,11 +218,11 @@ final class MbStringUtils public static function mb_ltrim(string $string, string $charlist = ' ') : string { if ($charlist === ' ') { - return \ltrim($string); + return ltrim($string); } else { - $charlist = \str_replace('/', '\/', \preg_quote($charlist)); + $charlist = str_replace('/', '\/', preg_quote($charlist)); - return \preg_replace('/(^[' . $charlist . ']+)/us', '', $string) ?? ''; + return preg_replace('/(^[' . $charlist . ']+)/us', '', $string) ?? ''; } } @@ -238,12 +238,12 @@ final class MbStringUtils public static function mb_entropy(string $value) : float { $entropy = 0.0; - $size = \mb_strlen($value); + $size = mb_strlen($value); $countChars = self::mb_count_chars($value); foreach ($countChars as $v) { $p = $v / $size; - $entropy -= $p * \log($p) / \log(2); + $entropy -= $p * log($p) / log(2); } return $entropy; @@ -260,11 +260,11 @@ final class MbStringUtils */ public static function mb_count_chars(string $input) : array { - $l = \mb_strlen($input, 'UTF-8'); + $l = mb_strlen($input, 'UTF-8'); $unique = []; for ($i = 0; $i < $l; ++$i) { - $char = \mb_substr($input, $i, 1, 'UTF-8'); + $char = mb_substr($input, $i, 1, 'UTF-8'); if (!\array_key_exists($char, $unique)) { $unique[$char] = 0; @@ -291,15 +291,15 @@ final class MbStringUtils $reset = 3; do { - $lastChunk = \substr($text, $length - $reset, $reset); - $encodedPos = \strpos($lastChunk, '='); + $lastChunk = substr($text, $length - $reset, $reset); + $encodedPos = strpos($lastChunk, '='); if ($encodedPos === false) { break; // @codeCoverageIgnore } - $hex = \substr($text, $length - $reset + $encodedPos + 1, 2); - $dec = \hexdec($hex); + $hex = substr($text, $length - $reset + $encodedPos + 1, 2); + $dec = hexdec($hex); if ($dec < 128) { if ($encodedPos > 0) { @@ -330,6 +330,6 @@ final class MbStringUtils */ public static function hasMultiBytes(string $text, string $charset = CharsetType::UTF_8) : bool { - return \strlen($text) > \mb_strlen($text, $charset); + return \strlen($text) > mb_strlen($text, $charset); } } diff --git a/Utils/Parser/Markdown/Markdown.php b/Utils/Parser/Markdown/Markdown.php index 8d214f6d4..1ea4f3ebc 100644 --- a/Utils/Parser/Markdown/Markdown.php +++ b/Utils/Parser/Markdown/Markdown.php @@ -228,12 +228,12 @@ class Markdown { self::$definitionData = []; - $text = \str_replace(["\r\n", "\r"], "\n", $text); - $text = \trim($text, "\n"); - $lines = \explode("\n", $text); + $text = str_replace(["\r\n", "\r"], "\n", $text); + $text = trim($text, "\n"); + $lines = explode("\n", $text); $markup = self::lines($lines); - return \trim($markup, "\n"); + return trim($markup, "\n"); } /** @@ -250,7 +250,7 @@ class Markdown $currentBlock = null; foreach ($lines as $line) { - if (\rtrim($line) === '') { + if (rtrim($line) === '') { if (isset($currentBlock)) { $currentBlock['interrupted'] = true; } @@ -258,16 +258,16 @@ class Markdown continue; } - if (\strpos($line, "\t") !== false) { - $parts = \explode("\t", $line); + if (strpos($line, "\t") !== false) { + $parts = explode("\t", $line); $line = $parts[0]; unset($parts[0]); foreach ($parts as $part) { - $shortage = 4 - \mb_strlen($line, 'utf-8') % 4; + $shortage = 4 - mb_strlen($line, 'utf-8') % 4; - $line .= \str_repeat(' ', $shortage); + $line .= str_repeat(' ', $shortage); $line .= $part; } } @@ -277,7 +277,7 @@ class Markdown ++$indent; } - $text = $indent > 0 ? \substr($line, $indent) : $line; + $text = $indent > 0 ? substr($line, $indent) : $line; $lineArray = ['body' => $line, 'indent' => $indent, 'text' => $text]; if (isset($currentBlock['continuable'])) { @@ -380,7 +380,7 @@ class Markdown 'handler' => 'element', 'text' => [ 'name' => 'code', - 'text' => \substr($lineArray['body'], 4), + 'text' => substr($lineArray['body'], 4), ], ], ]; @@ -409,7 +409,7 @@ class Markdown } $block['element']['text']['text'] .= "\n"; - $block['element']['text']['text'] .= \substr($lineArray['body'], 4); + $block['element']['text']['text'] .= substr($lineArray['body'], 4); return $block; } @@ -439,7 +439,7 @@ class Markdown */ protected static function blockFencedCode(array $lineArray) : ?array { - if (!\preg_match('/^[' . $lineArray['text'][0] . ']{3,}[ ]*([^`]+)?[ ]*$/', $lineArray['text'], $matches)) { + if (!preg_match('/^[' . $lineArray['text'][0] . ']{3,}[ ]*([^`]+)?[ ]*$/', $lineArray['text'], $matches)) { return null; } @@ -486,8 +486,8 @@ class Markdown unset($block['interrupted']); } - if (\preg_match('/^' . $block['char'] . '{3,}[ ]*$/', $lineArray['text'])) { - $block['element']['text']['text'] = \substr($block['element']['text']['text'], 1); + if (preg_match('/^' . $block['char'] . '{3,}[ ]*$/', $lineArray['text'])) { + $block['element']['text']['text'] = substr($block['element']['text']['text'], 1); $block['complete'] = true; return $block; @@ -538,8 +538,8 @@ class Markdown return [ 'element' => [ - 'name' => 'h' . \min(6, $level), - 'text' => \trim($lineArray['text'], '# '), + 'name' => 'h' . min(6, $level), + 'text' => trim($lineArray['text'], '# '), 'handler' => 'line', ], ]; @@ -558,7 +558,7 @@ class Markdown { list($name, $pattern) = $lineArray['text'][0] <= '-' ? ['ul', '[*+-]'] : ['ol', '[0-9]+[.]']; - if (!\preg_match('/^(' . $pattern . '[ ]+)(.*)/', $lineArray['text'], $matches)) { + if (!preg_match('/^(' . $pattern . '[ ]+)(.*)/', $lineArray['text'], $matches)) { return null; } @@ -572,7 +572,7 @@ class Markdown ]; if ($name === 'ol') { - $listStart = \stristr($matches[0], '.', true); + $listStart = stristr($matches[0], '.', true); if ($listStart !== '1') { $block['element']['attributes'] = ['start' => $listStart]; @@ -604,7 +604,7 @@ class Markdown */ protected static function blockListContinue(array $lineArray, array $block) : ?array { - if ($block['indent'] === $lineArray['indent'] && \preg_match('/^' . $block['pattern'] . '(?:[ ]+(.*)|$)/', $lineArray['text'], $matches)) { + if ($block['indent'] === $lineArray['indent'] && preg_match('/^' . $block['pattern'] . '(?:[ ]+(.*)|$)/', $lineArray['text'], $matches)) { if (isset($block['interrupted'])) { $block['li']['text'][] = ''; @@ -631,14 +631,14 @@ class Markdown } if (!isset($block['interrupted'])) { - $block['li']['text'][] = \preg_replace('/^[ ]{0,4}/', '', $lineArray['body']); + $block['li']['text'][] = preg_replace('/^[ ]{0,4}/', '', $lineArray['body']); return $block; } if ($lineArray['indent'] > 0) { $block['li']['text'][] = ''; - $block['li']['text'][] = \preg_replace('/^[ ]{0,4}/', '', $lineArray['body']); + $block['li']['text'][] = preg_replace('/^[ ]{0,4}/', '', $lineArray['body']); unset($block['interrupted']); @@ -659,7 +659,7 @@ class Markdown */ protected static function blockQuote(array $lineArray) : ?array { - if (!\preg_match('/^>[ ]?(.*)/', $lineArray['text'], $matches)) { + if (!preg_match('/^>[ ]?(.*)/', $lineArray['text'], $matches)) { return null; } @@ -684,7 +684,7 @@ class Markdown */ protected static function blockQuoteContinue(array $lineArray, array $block) : ?array { - if ($lineArray['text'][0] === '>' && \preg_match('/^>[ ]?(.*)/', $lineArray['text'], $matches)) { + if ($lineArray['text'][0] === '>' && preg_match('/^>[ ]?(.*)/', $lineArray['text'], $matches)) { if (isset($block['interrupted'])) { $block['element']['text'][] = ''; @@ -716,7 +716,7 @@ class Markdown */ protected static function blockRule(array $lineArray) : ?array { - if (!\preg_match('/^([' . $lineArray['text'][0] . '])([ ]*\1){2,}[ ]*$/', $lineArray['text'])) { + if (!preg_match('/^([' . $lineArray['text'][0] . '])([ ]*\1){2,}[ ]*$/', $lineArray['text'])) { return null; } @@ -743,7 +743,7 @@ class Markdown return null; } - if (\rtrim($lineArray['text'], $lineArray['text'][0]) !== '') { + if (rtrim($lineArray['text'], $lineArray['text'][0]) !== '') { return null; } @@ -763,7 +763,7 @@ class Markdown */ protected static function blockReference(array $lineArray) : ?array { - if (!\preg_match('/^\[(.+?)\]:[ ]*?(?:[ ]+["\'(](.+)["\')])?[ ]*$/', $lineArray['text'], $matches)) { + if (!preg_match('/^\[(.+?)\]:[ ]*?(?:[ ]+["\'(](.+)["\')])?[ ]*$/', $lineArray['text'], $matches)) { return null; } @@ -772,7 +772,7 @@ class Markdown 'title' => $matches[3] ?? null, ]; - self::$definitionData['Reference'][\strtolower($matches[1])] = $data; + self::$definitionData['Reference'][strtolower($matches[1])] = $data; return ['hidden' => true]; } @@ -793,15 +793,15 @@ class Markdown return null; } - if (\strpos($block['element']['text'], '|') !== false && \rtrim($lineArray['text'], ' -:|') === '') { + if (strpos($block['element']['text'], '|') !== false && rtrim($lineArray['text'], ' -:|') === '') { $alignments = []; $divider = $lineArray['text']; - $divider = \trim($divider); - $divider = \trim($divider, '|'); - $dividerCells = \explode('|', $divider); + $divider = trim($divider); + $divider = trim($divider, '|'); + $dividerCells = explode('|', $divider); foreach ($dividerCells as $dividerCell) { - $dividerCell = \trim($dividerCell); + $dividerCell = trim($dividerCell); if ($dividerCell === '') { continue; @@ -813,7 +813,7 @@ class Markdown $alignment = 'left'; } - if (\substr($dividerCell, -1) === ':') { + if (substr($dividerCell, -1) === ':') { $alignment = $alignment === 'left' ? 'center' : 'right'; } @@ -822,14 +822,14 @@ class Markdown $headerElements = []; $header = $block['element']['text']; - $header = \trim($header); - $header = \trim($header, '|'); - $headerCells = \explode('|', $header); + $header = trim($header); + $header = trim($header, '|'); + $headerCells = explode('|', $header); foreach ($headerCells as $index => $headerCell) { $headerElement = [ 'name' => 'th', - 'text' => \trim($headerCell), + 'text' => trim($headerCell), 'handler' => 'line', ]; @@ -890,19 +890,19 @@ class Markdown return null; } - if ($lineArray['text'][0] === '|' || \strpos($lineArray['text'], '|')) { + if ($lineArray['text'][0] === '|' || strpos($lineArray['text'], '|')) { $elements = []; $row = $lineArray['text']; - $row = \trim($row); - $row = \trim($row, '|'); + $row = trim($row); + $row = trim($row, '|'); - \preg_match_all('/(?:(\\\\[|])|[^|`]|`[^`]+`|`)+/', $row, $matches); + preg_match_all('/(?:(\\\\[|])|[^|`]|`[^`]+`|`)+/', $row, $matches); foreach ($matches[0] as $index => $cell) { $element = [ 'name' => 'td', 'handler' => 'line', - 'text' => \trim($cell), + 'text' => trim($cell), ]; if (isset($block['alignments'][$index])) { @@ -957,9 +957,9 @@ class Markdown { $markup = ''; - while ($excerpt = \strpbrk($text, self::$inlineMarkerList)) { + while ($excerpt = strpbrk($text, self::$inlineMarkerList)) { $marker = $excerpt[0]; - $markerPosition = \strpos($text, $marker); + $markerPosition = strpos($text, $marker); $excerptArray = ['text' => $excerpt, 'context' => $text]; foreach (self::$inlineTypes[$marker] as $inlineType) { @@ -977,17 +977,17 @@ class Markdown $inline['position'] = $markerPosition; } - $unmarkedText = (string) \substr($text, 0, $inline['position']); + $unmarkedText = (string) substr($text, 0, $inline['position']); $markup .= self::unmarkedText($unmarkedText); $markup .= isset($inline['markup']) ? $inline['markup'] : self::element($inline['element']); - $text = (string) \substr($text, $inline['position'] + $inline['extent']); + $text = (string) substr($text, $inline['position'] + $inline['extent']); continue 2; } - $unmarkedText = (string) \substr($text, 0, $markerPosition + 1); + $unmarkedText = (string) substr($text, 0, $markerPosition + 1); $markup .= self::unmarkedText($unmarkedText); - $text = (string) \substr($text, $markerPosition + 1); + $text = (string) substr($text, $markerPosition + 1); } $markup .= self::unmarkedText($text); @@ -1008,7 +1008,7 @@ class Markdown { $marker = $excerpt['text'][0]; - if (!\preg_match('/^(' . $marker . '+)[ ]*(.+?)[ ]*(? \strlen($matches[0]), 'element' => [ 'name' => 'code', - 'text' => \preg_replace("/[ ]*\n/", ' ', $matches[2]), + 'text' => preg_replace("/[ ]*\n/", ' ', $matches[2]), ], ]; } @@ -1032,7 +1032,7 @@ class Markdown */ protected static function inlineEmailTag(array $excerpt) : ?array { - if (\strpos($excerpt['text'], '>') === false || !\preg_match('/^<((mailto:)?\S+?@\S+?)>/i', $excerpt['text'], $matches)) { + if (strpos($excerpt['text'], '>') === false || !preg_match('/^<((mailto:)?\S+?@\S+?)>/i', $excerpt['text'], $matches)) { return null; } @@ -1071,11 +1071,11 @@ class Markdown $marker = $excerpt['text'][0]; - if ($excerpt['text'][1] === $marker && isset(self::$strongRegex[$marker]) && \preg_match(self::$strongRegex[$marker], $excerpt['text'], $matches)) { + if ($excerpt['text'][1] === $marker && isset(self::$strongRegex[$marker]) && preg_match(self::$strongRegex[$marker], $excerpt['text'], $matches)) { $emphasis = 'strong'; - } elseif ($excerpt['text'][1] === $marker && isset(self::$underlineRegex[$marker]) && \preg_match(self::$underlineRegex[$marker], $excerpt['text'], $matches)) { + } elseif ($excerpt['text'][1] === $marker && isset(self::$underlineRegex[$marker]) && preg_match(self::$underlineRegex[$marker], $excerpt['text'], $matches)) { $emphasis = 'u'; - } elseif (\preg_match(self::$emRegex[$marker], $excerpt['text'], $matches)) { + } elseif (preg_match(self::$emRegex[$marker], $excerpt['text'], $matches)) { $emphasis = 'em'; } else { return null; @@ -1127,7 +1127,7 @@ class Markdown return null; } - $excerpt['text'] = \substr($excerpt['text'], 1); + $excerpt['text'] = substr($excerpt['text'], 1); $link = self::inlineLink($excerpt); if ($link === null) { @@ -1176,30 +1176,30 @@ class Markdown $extent = 0; $remainder = $excerpt['text']; - if (!\preg_match('/\[((?:[^][]++|(?R))*+)\]/', $remainder, $matches)) { + if (!preg_match('/\[((?:[^][]++|(?R))*+)\]/', $remainder, $matches)) { return null; } $element['text'] = $matches[1]; $extent += \strlen($matches[0]); - $remainder = (string) \substr($remainder, $extent); + $remainder = (string) substr($remainder, $extent); - if (\preg_match('/^[(]\s*+((?:[^ ()]++|[(][^ )]+[)])++)(?:[ ]+("[^"]*"|\'[^\']*\'))?\s*[)]/', $remainder, $matches)) { + if (preg_match('/^[(]\s*+((?:[^ ()]++|[(][^ )]+[)])++)(?:[ ]+("[^"]*"|\'[^\']*\'))?\s*[)]/', $remainder, $matches)) { $element['attributes']['href'] = UriFactory::build($matches[1]); if (isset($matches[2])) { - $element['attributes']['title'] = (string) \substr($matches[2], 1, - 1); + $element['attributes']['title'] = (string) substr($matches[2], 1, - 1); } $extent += \strlen($matches[0]); } else { - if (\preg_match('/^\s*\[(.*?)\]/', $remainder, $matches)) { + if (preg_match('/^\s*\[(.*?)\]/', $remainder, $matches)) { $definition = \strlen($matches[1]) ? $matches[1] : $element['text']; - $definition = \strtolower($definition); + $definition = strtolower($definition); $extent += \strlen($matches[0]); } else { - $definition = \strtolower($element['text']); + $definition = strtolower($element['text']); } if (!isset(self::$definitionData['Reference'][$definition])) { @@ -1229,7 +1229,7 @@ class Markdown */ protected static function inlineSpecialCharacter(array $excerpt) : ?array { - if ($excerpt['text'][0] === '&' && !\preg_match('/^&#?\w+;/', $excerpt['text'])) { + if ($excerpt['text'][0] === '&' && !preg_match('/^&#?\w+;/', $excerpt['text'])) { return [ 'markup' => '&', 'extent' => 1, @@ -1261,7 +1261,7 @@ class Markdown return null; } - if ($excerpt['text'][1] !== '~' || !\preg_match('/^~~(?=\S)(.+?)(?<=\S)~~/', $excerpt['text'], $matches)) { + if ($excerpt['text'][1] !== '~' || !preg_match('/^~~(?=\S)(.+?)(?<=\S)~~/', $excerpt['text'], $matches)) { return null; } @@ -1290,7 +1290,7 @@ class Markdown return null; } - if (!\preg_match('/\bhttps?:[\/]{2}[^\s<]+\b\/*/ui', $excerpt['context'], $matches, \PREG_OFFSET_CAPTURE)) { + if (!preg_match('/\bhttps?:[\/]{2}[^\s<]+\b\/*/ui', $excerpt['context'], $matches, \PREG_OFFSET_CAPTURE)) { return null; } @@ -1318,7 +1318,7 @@ class Markdown */ protected static function inlineUrlTag(array $excerpt) : ?array { - if (\strpos($excerpt['text'], '>') === false || !\preg_match('/^<(\w+:\/{2}[^ >]+)>/i', $excerpt['text'], $matches)) { + if (strpos($excerpt['text'], '>') === false || !preg_match('/^<(\w+:\/{2}[^ >]+)>/i', $excerpt['text'], $matches)) { return null; } @@ -1345,8 +1345,8 @@ class Markdown */ protected static function unmarkedText(string $text) : string { - $text = \preg_replace('/(?:[ ][ ]+|[ ]*\\\\)\n/', "
\n", $text); - $text = \str_replace(" \n", "\n", $text); + $text = preg_replace('/(?:[ ][ ]+|[ ]*\\\\)\n/', "
\n", $text); + $text = str_replace(" \n", "\n", $text); return $text; } @@ -1420,13 +1420,13 @@ class Markdown protected static function li(array $lines) : string { $markup = self::lines($lines); - $trimmedMarkup = \trim($markup); + $trimmedMarkup = trim($markup); - if (!\in_array('', $lines) && \substr($trimmedMarkup, 0, 3) === '

') { + if (!\in_array('', $lines) && substr($trimmedMarkup, 0, 3) === '

') { $markup = $trimmedMarkup; - $markup = (string) \substr($markup, 3); - $position = \strpos($markup, '

'); - $markup = \substr_replace($markup, '', $position, 4); + $markup = (string) substr($markup, 3); + $position = strpos($markup, '

'); + $markup = substr_replace($markup, '', $position, 4); } return $markup; @@ -1454,7 +1454,7 @@ class Markdown if (!empty($element['attributes'])) { foreach ($element['attributes'] as $att => $val) { - if (!\preg_match('/^[a-zA-Z0-9][a-zA-Z0-9-_]*+$/', $att)) { + if (!preg_match('/^[a-zA-Z0-9][a-zA-Z0-9-_]*+$/', $att)) { unset($element['attributes'][$att]); } elseif (self::striAtStart($att, 'on')) { unset($element['attributes'][$att]); @@ -1483,7 +1483,7 @@ class Markdown } } - $element['attributes'][$attribute] = \str_replace(':', '%3A', $element['attributes'][$attribute]); + $element['attributes'][$attribute] = str_replace(':', '%3A', $element['attributes'][$attribute]); return $element; } @@ -1500,7 +1500,7 @@ class Markdown */ protected static function escape(string $text, bool $allowQuotes = false) : string { - return \htmlspecialchars($text, $allowQuotes ? \ENT_NOQUOTES : \ENT_QUOTES, 'UTF-8'); + return htmlspecialchars($text, $allowQuotes ? \ENT_NOQUOTES : \ENT_QUOTES, 'UTF-8'); } /** @@ -1521,6 +1521,6 @@ class Markdown return false; } - return \strtolower((string) \substr($string, 0, $length)) === \strtolower($needle); + return strtolower((string) substr($string, 0, $length)) === strtolower($needle); } } diff --git a/Utils/Parser/Php/ArrayParser.php b/Utils/Parser/Php/ArrayParser.php index 0f6567c96..c8bdc496e 100644 --- a/Utils/Parser/Php/ArrayParser.php +++ b/Utils/Parser/Php/ArrayParser.php @@ -42,13 +42,13 @@ class ArrayParser foreach ($arr as $key => $val) { if (\is_string($key)) { - $key = '\'' . \str_replace('\'', '\\\'', $key) . '\''; + $key = '\'' . str_replace('\'', '\\\'', $key) . '\''; } - $stringify .= \str_repeat(' ', $depth * 4) . $key . ' => ' . self::parseVariable($val, $depth + 1) . ',' . "\n"; + $stringify .= str_repeat(' ', $depth * 4) . $key . ' => ' . self::parseVariable($val, $depth + 1) . ',' . "\n"; } - return $stringify . \str_repeat(' ', ($depth - 1) * 4) . ']'; + return $stringify . str_repeat(' ', ($depth - 1) * 4) . ']'; } /** @@ -68,14 +68,14 @@ class ArrayParser if (\is_array($value)) { return self::serializeArray($value, $depth); } elseif (\is_string($value)) { - return '\'' . \str_replace('\'', '\\\'', $value) . '\''; + return '\'' . str_replace('\'', '\\\'', $value) . '\''; } elseif (\is_bool($value)) { return $value ? 'true' : 'false'; } elseif ($value === null) { return 'null'; } elseif (\is_float($value)) { - return \rtrim(\rtrim(\number_format($value, 5, '.', ''), '0'), '.'); - } elseif (\is_scalar($value)) { + return rtrim(rtrim(number_format($value, 5, '.', ''), '0'), '.'); + } elseif (is_scalar($value)) { return (string) $value; } elseif ($value instanceof \Serializable) { return self::parseVariable($value->serialize()); diff --git a/Utils/Permutation.php b/Utils/Permutation.php index ea5bc4d0a..bedf788a1 100644 --- a/Utils/Permutation.php +++ b/Utils/Permutation.php @@ -49,7 +49,7 @@ final class Permutation $permutations = []; if (empty($toPermute)) { - $permutations[] = $concat ? \implode('', $result) : $result; + $permutations[] = $concat ? implode('', $result) : $result; } else { foreach ($toPermute as $key => $val) { $newArr = $toPermute; @@ -58,7 +58,7 @@ final class Permutation unset($newArr[$key]); - $permutations = \array_merge($permutations, self::permut($newArr, $newres, $concat)); + $permutations = array_merge($permutations, self::permut($newArr, $newres, $concat)); } } @@ -77,7 +77,7 @@ final class Permutation */ public static function isPermutation(string $a, string $b) : bool { - return \count_chars($a, 1) === \count_chars($b, 1); + return count_chars($a, 1) === count_chars($b, 1); } /** @@ -92,9 +92,9 @@ final class Permutation */ public static function isPalindrome(string $a, string $filter = 'a-zA-Z0-9') : bool { - $a = \strtolower(\preg_replace('/[^' . $filter . ']/', '', $a) ?? ''); + $a = strtolower(preg_replace('/[^' . $filter . ']/', '', $a) ?? ''); - return $a === \strrev($a); + return $a === strrev($a); } /** diff --git a/Utils/RnG/ArrayRandomize.php b/Utils/RnG/ArrayRandomize.php index 6b7e500eb..de259c6ce 100644 --- a/Utils/RnG/ArrayRandomize.php +++ b/Utils/RnG/ArrayRandomize.php @@ -38,9 +38,9 @@ class ArrayRandomize $shuffled = []; while (!empty($arr)) { - $rnd = (int) \array_rand($arr); + $rnd = (int) array_rand($arr); $shuffled[] = $arr[$rnd] ?? null; - \array_splice($arr, $rnd, 1); + array_splice($arr, $rnd, 1); } return $shuffled; @@ -60,7 +60,7 @@ class ArrayRandomize $shuffled = []; for ($i = \count($arr) - 1; $i > 0; --$i) { - $rnd = \mt_rand(0, $i); + $rnd = mt_rand(0, $i); $shuffled[$i] = $arr[$rnd]; $shuffled[$rnd] = $arr[$i]; } diff --git a/Utils/RnG/DateTime.php b/Utils/RnG/DateTime.php index 7f0a4a795..1f03bdb00 100644 --- a/Utils/RnG/DateTime.php +++ b/Utils/RnG/DateTime.php @@ -38,6 +38,6 @@ class DateTime { $rng = new \DateTime(); - return $rng->setTimestamp(\mt_rand($start->getTimestamp(), $end->getTimestamp())); + return $rng->setTimestamp(mt_rand($start->getTimestamp(), $end->getTimestamp())); } } diff --git a/Utils/RnG/Email.php b/Utils/RnG/Email.php index 257606bf1..13f3d9f5b 100644 --- a/Utils/RnG/Email.php +++ b/Utils/RnG/Email.php @@ -35,8 +35,8 @@ class Email { $count = \count(Text::LOREM_IPSUM) - 1; - return Text::LOREM_IPSUM[\mt_rand(0, $count)] - . '@' . Text::LOREM_IPSUM[\mt_rand(0, $count)] + return Text::LOREM_IPSUM[mt_rand(0, $count)] + . '@' . Text::LOREM_IPSUM[mt_rand(0, $count)] . '.com'; } } diff --git a/Utils/RnG/File.php b/Utils/RnG/File.php index dd9f24a67..c948c7d7d 100644 --- a/Utils/RnG/File.php +++ b/Utils/RnG/File.php @@ -59,8 +59,8 @@ class File $source = self::$extensions; } - $key = \mt_rand(0, \count($source) - 1); + $key = mt_rand(0, \count($source) - 1); - return $source[$key][\mt_rand(0, \count($source[$key]) - 1)]; + return $source[$key][mt_rand(0, \count($source[$key]) - 1)]; } } diff --git a/Utils/RnG/Name.php b/Utils/RnG/Name.php index 4eb5f83aa..7f9b916b4 100644 --- a/Utils/RnG/Name.php +++ b/Utils/RnG/Name.php @@ -493,8 +493,8 @@ class Name */ public static function generateName(array $type, string $origin = 'western') : string { - $rndType = \mt_rand(0, \count($type) - 1); + $rndType = mt_rand(0, \count($type) - 1); - return self::$names[$origin][$type[$rndType]][\mt_rand(0, \count(self::$names[$origin][$type[$rndType]]) - 1)]; + return self::$names[$origin][$type[$rndType]][mt_rand(0, \count(self::$names[$origin][$type[$rndType]]) - 1)]; } } diff --git a/Utils/RnG/Phone.php b/Utils/RnG/Phone.php index 0f311d1e5..ef6e5353e 100644 --- a/Utils/RnG/Phone.php +++ b/Utils/RnG/Phone.php @@ -50,17 +50,17 @@ class Phone $countries = ['de' => 49, 'us' => 1]; } - $numberString = \str_replace( + $numberString = str_replace( '$1', - (string) $countries[\array_keys($countries)[\mt_rand(0, \count($countries) - 1)]], + (string) $countries[array_keys($countries)[mt_rand(0, \count($countries) - 1)]], $numberString ); } - $numberParts = \substr_count($struct, '$'); + $numberParts = substr_count($struct, '$'); for ($i = ($isInt ? 2 : 1); $i <= $numberParts; ++$i) { - $numberString = \str_replace( + $numberString = str_replace( '$' . $i, StringUtils::generateString( $size[$i - 1][0] ?? 0, diff --git a/Utils/RnG/StringUtils.php b/Utils/RnG/StringUtils.php index 71a601d9a..32e8118aa 100644 --- a/Utils/RnG/StringUtils.php +++ b/Utils/RnG/StringUtils.php @@ -39,12 +39,12 @@ class StringUtils string $charset = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ' ) : string { - $length = \mt_rand($min, $max); + $length = mt_rand($min, $max); $charactersLength = \strlen($charset); $randomString = ''; for ($i = 0; $i < $length; ++$i) { - $randomString .= $charset[\mt_rand(0, $charactersLength - 1)]; + $randomString .= $charset[mt_rand(0, $charactersLength - 1)]; } return $randomString; diff --git a/Utils/RnG/Text.php b/Utils/RnG/Text.php index 0e8674155..87640a40e 100644 --- a/Utils/RnG/Text.php +++ b/Utils/RnG/Text.php @@ -108,8 +108,8 @@ class Text } $punctuation = $this->generatePunctuation($length); - $punctuationCount = \array_count_values( - \array_map( + $punctuationCount = array_count_values( + array_map( function ($item) { return $item[1]; }, @@ -136,16 +136,16 @@ class Text for ($i = 0; $i < $length + 1; ++$i) { $newSentence = false; - $lastChar = \substr($text, -1); + $lastChar = substr($text, -1); if ($lastChar === '.' || $lastChar === '!' || $lastChar === '?' || !$lastChar) { $newSentence = true; } - $word = $words[\mt_rand(0, $wordCount - 1)] ?? ''; + $word = $words[mt_rand(0, $wordCount - 1)] ?? ''; if ($newSentence) { - $word = \ucfirst($word); + $word = ucfirst($word); ++$sentenceCount; /** @noinspection PhpUndefinedVariableInspection */ @@ -169,7 +169,7 @@ class Text } } - $text = \ltrim($text); + $text = ltrim($text); if ($this->hasParagraphs) { $text = '

' . $text . '

'; @@ -199,24 +199,24 @@ class Text $punctuation = []; for ($i = 0; $i < $length;) { - $sentenceLength = \mt_rand($minSentences, $maxSentences); + $sentenceLength = mt_rand($minSentences, $maxSentences); if ($i + $sentenceLength > $length || $length - ($i + $sentenceLength) < $minSentences) { $sentenceLength = $length - $i; } /* Handle comma */ - $commaHere = (\mt_rand(0, 100) <= $probComma * 100 && $sentenceLength >= 2 * $minCommaSpacing ? true : false); + $commaHere = (mt_rand(0, 100) <= $probComma * 100 && $sentenceLength >= 2 * $minCommaSpacing ? true : false); $posComma = []; if ($commaHere) { - $posComma[] = \mt_rand($minCommaSpacing, $sentenceLength - $minCommaSpacing); + $posComma[] = mt_rand($minCommaSpacing, $sentenceLength - $minCommaSpacing); $punctuation[] = [$i + $posComma[0], ',']; - $commaHere = (\mt_rand(0, 100) <= $probComma * 100 && $posComma[0] + $minCommaSpacing * 2 < $sentenceLength ? true : false); + $commaHere = (mt_rand(0, 100) <= $probComma * 100 && $sentenceLength > $posComma[0] + $minCommaSpacing * 2 ? true : false); if ($commaHere) { - $posComma[] = \mt_rand($posComma[0] + $minCommaSpacing, $sentenceLength - $minCommaSpacing); + $posComma[] = mt_rand($posComma[0] + $minCommaSpacing, $sentenceLength - $minCommaSpacing); $punctuation[] = [$i + $posComma[1], ',']; } } @@ -224,14 +224,14 @@ class Text $i += $sentenceLength; /* Handle sentence ending */ - $isDot = (\mt_rand(0, 100) <= $probDot * 100 ? true : false); + $isDot = (mt_rand(0, 100) <= $probDot * 100 ? true : false); if ($isDot) { $punctuation[] = [$i, '.']; continue; } - $isEx = (\mt_rand(0, 100) <= $probExc * 100 ? true : false); + $isEx = (mt_rand(0, 100) <= $probExc * 100 ? true : false); if ($isEx) { $punctuation[] = [$i, '!']; @@ -261,7 +261,7 @@ class Text $paragraph = []; for ($i = 0; $i < $length;) { - $paragraphLength = \mt_rand($minSentence, $maxSentence); + $paragraphLength = mt_rand($minSentence, $maxSentence); if ($i + $paragraphLength > $length || $length - ($i + $paragraphLength) < $minSentence) { $paragraphLength = $length - $i; @@ -292,9 +292,9 @@ class Text $formatting = []; for ($i = 0; $i < $length; ++$i) { - $isCursive = (\mt_rand(0, 1000) <= 1000 * $probCursive ? true : false); - $isBold = (\mt_rand(0, 1000) <= 1000 * $probBold ? true : false); - $isUline = (\mt_rand(0, 1000) <= 1000 * $probUline ? true : false); + $isCursive = (mt_rand(0, 1000) <= 1000 * $probCursive ? true : false); + $isBold = (mt_rand(0, 1000) <= 1000 * $probBold ? true : false); + $isUline = (mt_rand(0, 1000) <= 1000 * $probUline ? true : false); if ($isUline) { $formatting[$i] = 'u'; diff --git a/Utils/StringCompare.php b/Utils/StringCompare.php index a695faee1..2f123a2f4 100644 --- a/Utils/StringCompare.php +++ b/Utils/StringCompare.php @@ -105,7 +105,7 @@ final class StringCompare return $s2Size === 0 ? 1.0 : 0.0; } - $mDistance = (int) (\max($s1Size, $s2Size) / 2 - 1); + $mDistance = (int) (max($s1Size, $s2Size) / 2 - 1); $matches = 0; $transpositions = 0.0; @@ -114,8 +114,8 @@ final class StringCompare $s2Matches = []; for ($i = 0; $i < $s1Size; ++$i) { - $start = \max(0, $i - $mDistance); - $end = \min($i + $mDistance + 1, $s2Size); + $start = max(0, $i - $mDistance); + $end = min($i + $mDistance + 1, $s2Size); for ($j = $start; $j < $end; ++$j) { if (isset($s2Matches[$j])) { @@ -175,8 +175,8 @@ final class StringCompare */ public static function valueWords(string $s1, string $s2) : int { - $words1 = \preg_split('/[ _-]/', $s1); - $words2 = \preg_split('/[ _-]/', $s2); + $words1 = preg_split('/[ _-]/', $s1); + $words2 = preg_split('/[ _-]/', $s2); $total = 0; if ($words1 === false || $words2 === false) { @@ -187,7 +187,7 @@ final class StringCompare $best = \strlen($s2); foreach ($words2 as $word2) { - $wordDist = \levenshtein($word1, $word2); + $wordDist = levenshtein($word1, $word2); if ($wordDist < $best) { $best = $wordDist; @@ -216,7 +216,7 @@ final class StringCompare */ public static function valuePhrase(string $s1, string $s2) : int { - return \levenshtein($s1, $s2); + return levenshtein($s1, $s2); } /** @@ -231,7 +231,7 @@ final class StringCompare */ public static function valueLength(string $s1, string $s2) : int { - return \abs(\strlen($s1) - \strlen($s2)); + return abs(\strlen($s1) - \strlen($s2)); } /** @@ -260,8 +260,8 @@ final class StringCompare $wordValue = self::valueWords($s1, $s2); $lengthValue = self::valueLength($s1, $s2); - return \min($phraseValue * $phraseWeight, $wordValue * $wordWeight) * $minWeight - + \max($phraseValue * $phraseWeight, $wordValue * $wordWeight) * $maxWeight + return min($phraseValue * $phraseWeight, $wordValue * $wordWeight) * $minWeight + + max($phraseValue * $phraseWeight, $wordValue * $wordWeight) * $maxWeight + $lengthValue * $lengthWeight; } } diff --git a/Utils/StringUtils.php b/Utils/StringUtils.php index 358336c02..496ad5401 100644 --- a/Utils/StringUtils.php +++ b/Utils/StringUtils.php @@ -59,7 +59,7 @@ final class StringUtils public static function contains(string $haystack, array $needles) : bool { foreach ($needles as $needle) { - if (\strpos($haystack, $needle) !== false) { + if (strpos($haystack, $needle) !== false) { return true; } } @@ -89,7 +89,7 @@ final class StringUtils } foreach ($needles as $needle) { - if ($needle === '' || (($temp = \strlen($haystack) - \strlen($needle)) >= 0 && \strpos($haystack, $needle, $temp) !== false)) { + if ($needle === '' || (($temp = \strlen($haystack) - \strlen($needle)) >= 0 && strpos($haystack, $needle, $temp) !== false)) { return true; } } @@ -121,7 +121,7 @@ final class StringUtils } foreach ($needles as $needle) { - if ($needle === '' || \strrpos($haystack, $needle, -\strlen($haystack)) !== false) { + if ($needle === '' || strrpos($haystack, $needle, -\strlen($haystack)) !== false) { return true; } } @@ -173,12 +173,12 @@ final class StringUtils $size = \strlen($value); /** @var array $countChars */ - $countChars = \count_chars($value, 1); + $countChars = count_chars($value, 1); /** @var int $v */ foreach ($countChars as $v) { $p = $v / $size; - $entropy -= $p * \log($p) / \log(2); + $entropy -= $p * log($p) / log(2); } return $entropy; @@ -197,7 +197,7 @@ final class StringUtils public static function stringify(mixed $element, mixed $option = null) : ?string { if ($element instanceof \JsonSerializable || \is_array($element)) { - $encoded = \json_encode($element, $option !== null ? $option : 0); + $encoded = json_encode($element, $option !== null ? $option : 0); return $encoded ? $encoded : null; } elseif ($element instanceof \Serializable) { @@ -214,7 +214,7 @@ final class StringUtils return $element->format('Y-m-d H:i:s'); } elseif ($element instanceof RenderableInterface) { return $element->render(); - } elseif (\method_exists($element, '__toString')) { + } elseif (method_exists($element, '__toString')) { return $element->__toString(); } @@ -234,8 +234,8 @@ final class StringUtils */ public static function createDiffMarkup(string $old, string $new, string $delim = '') : string { - $splitOld = !empty($delim) ? \explode($delim, $old) : \str_split($old); - $splitNew = !empty($delim) ? \explode($delim, $new) : \str_split($new); + $splitOld = !empty($delim) ? explode($delim, $old) : str_split($old); + $splitNew = !empty($delim) ? explode($delim, $new) : str_split($new); if ($splitOld === false || (empty($old) && !empty($new)) @@ -265,19 +265,19 @@ final class StringUtils if ($mc !== $pmc) { switch ($pmc) { case -1: - $result = (!empty($delim) ? \rtrim($result, $delim) : $result) . '' . $delim; + $result = (!empty($delim) ? rtrim($result, $delim) : $result) . '' . $delim; break; case 1: - $result = (!empty($delim) ? \rtrim($result, $delim) : $result) . '' . $delim; + $result = (!empty($delim) ? rtrim($result, $delim) : $result) . '' . $delim; break; } switch ($mc) { case -1: - $result = (!empty($delim) && ($pmc === 1 || $pmc === -1) ? \rtrim($result, $delim) : $result) . ''; + $result = (!empty($delim) && ($pmc === 1 || $pmc === -1) ? rtrim($result, $delim) : $result) . ''; break; case 1: - $result = (!empty($delim) && ($pmc === 1 || $pmc === -1) ? \rtrim($result, $delim) : $result) . ''; + $result = (!empty($delim) && ($pmc === 1 || $pmc === -1) ? rtrim($result, $delim) : $result) . ''; break; } } @@ -286,7 +286,7 @@ final class StringUtils $pmc = $mc; } - $result = (!empty($delim) ? \rtrim($result, $delim) : $result); + $result = (!empty($delim) ? rtrim($result, $delim) : $result); switch ($pmc) { case -1: @@ -297,7 +297,7 @@ final class StringUtils break; } - return \str_replace(['', ''], ['', ''], $result); + return str_replace(['', ''], ['', ''], $result); } /** @@ -341,7 +341,7 @@ final class StringUtils } else { $a1 = $dm[$i - 1][$j]; $a2 = $dm[$i][$j - 1]; - $dm[$i][$j] = \max($a1, $a2); + $dm[$i][$j] = max($a1, $a2); } } } @@ -371,8 +371,8 @@ final class StringUtils --$j; } - $diffValues = \array_reverse($diffValues); - $diffMask = \array_reverse($diffMask); + $diffValues = array_reverse($diffValues); + $diffMask = array_reverse($diffMask); return ['values' => $diffValues, 'mask' => $diffMask]; } @@ -411,8 +411,8 @@ final class StringUtils */ public static function isShellSafe(string $string) { - if (\escapeshellcmd($string) !== $string - || !\in_array(\escapeshellarg($string), ["'${string}'", "\"${string}\""]) + if (escapeshellcmd($string) !== $string + || !\in_array(escapeshellarg($string), ["'${string}'", "\"${string}\""]) ) { return false; } @@ -422,7 +422,7 @@ final class StringUtils for ($i = 0; $i < $length; ++$i) { $c = $string[$i]; - if (!\ctype_alnum($c) && \strpos('@_-.', $c) === false) { + if (!ctype_alnum($c) && strpos('@_-.', $c) === false) { return false; } } diff --git a/Utils/TaskSchedule/Cron.php b/Utils/TaskSchedule/Cron.php index 6475aae2c..33f5d565b 100644 --- a/Utils/TaskSchedule/Cron.php +++ b/Utils/TaskSchedule/Cron.php @@ -31,9 +31,9 @@ class Cron extends SchedulerAbstract public function create(TaskAbstract $task) : void { $this->run('-l > ' . __DIR__ . '/tmpcron.tmp'); - \file_put_contents(__DIR__ . '/tmpcron.tmp', $task->__toString() . "\n", \FILE_APPEND); + file_put_contents(__DIR__ . '/tmpcron.tmp', $task->__toString() . "\n", \FILE_APPEND); $this->run(__DIR__ . '/tmpcron.tmp'); - \unlink(__DIR__ . '/tmpcron.tmp'); + unlink(__DIR__ . '/tmpcron.tmp'); } /** @@ -44,26 +44,26 @@ class Cron extends SchedulerAbstract $this->run('-l > ' . __DIR__ . '/tmpcron.tmp'); $new = ''; - $fp = \fopen(__DIR__ . '/tmpcron.tmp', 'r+'); + $fp = fopen(__DIR__ . '/tmpcron.tmp', 'r+'); if ($fp) { - $line = \fgets($fp); + $line = fgets($fp); while ($line !== false) { - if ($line[0] !== '#' && \stripos($line, 'name="' . $task->getId()) !== false) { + if ($line[0] !== '#' && stripos($line, 'name="' . $task->getId()) !== false) { $new .= $task->__toString() . "\n"; } else { $new .= $line; } - $line = \fgets($fp); + $line = fgets($fp); } - \fclose($fp); - \file_put_contents(__DIR__ . '/tmpcron.tmp', $new); + fclose($fp); + file_put_contents(__DIR__ . '/tmpcron.tmp', $new); } $this->run(__DIR__ . '/tmpcron.tmp'); - \unlink(__DIR__ . '/tmpcron.tmp'); + unlink(__DIR__ . '/tmpcron.tmp'); } /** @@ -82,26 +82,26 @@ class Cron extends SchedulerAbstract $this->run('-l > ' . __DIR__ . '/tmpcron.tmp'); $new = ''; - $fp = \fopen(__DIR__ . '/tmpcron.tmp', 'r+'); + $fp = fopen(__DIR__ . '/tmpcron.tmp', 'r+'); if ($fp) { - $line = \fgets($fp); + $line = fgets($fp); while ($line !== false) { - if ($line[0] !== '#' && \stripos($line, 'name="' . $name) !== false) { - $line = \fgets($fp); + if ($line[0] !== '#' && stripos($line, 'name="' . $name) !== false) { + $line = fgets($fp); continue; } $new .= $line; - $line = \fgets($fp); + $line = fgets($fp); } - \fclose($fp); - \file_put_contents(__DIR__ . '/tmpcron.tmp', $new); + fclose($fp); + file_put_contents(__DIR__ . '/tmpcron.tmp', $new); } $this->run(__DIR__ . '/tmpcron.tmp'); - \unlink(__DIR__ . '/tmpcron.tmp'); + unlink(__DIR__ . '/tmpcron.tmp'); } /** @@ -112,32 +112,32 @@ class Cron extends SchedulerAbstract $this->run('-l > ' . __DIR__ . '/tmpcron.tmp'); $jobs = []; - $fp = \fopen(__DIR__ . '/tmpcron.tmp', 'r+'); + $fp = fopen(__DIR__ . '/tmpcron.tmp', 'r+'); if ($fp) { - $line = \fgets($fp); + $line = fgets($fp); while ($line !== false) { if ($line[0] !== '#') { $elements = []; - $namePos = \stripos($line, 'name="'); - $nameEndPos = \stripos($line, '"', $namePos + 7); + $namePos = stripos($line, 'name="'); + $nameEndPos = stripos($line, '"', $namePos + 7); if ($namePos !== false && $nameEndPos !== false) { - $elements[] = \substr($line, $namePos + 6, $nameEndPos - 1); + $elements[] = substr($line, $namePos + 6, $nameEndPos - 1); } - $elements = \array_merge($elements, \explode(' ', $line)); + $elements = array_merge($elements, explode(' ', $line)); $jobs[] = CronJob::createWith($elements); } - $line = \fgets($fp); + $line = fgets($fp); } - \fclose($fp); + fclose($fp); } $this->run(__DIR__ . '/tmpcron.tmp'); - \unlink(__DIR__ . '/tmpcron.tmp'); + unlink(__DIR__ . '/tmpcron.tmp'); return $jobs; } @@ -150,26 +150,26 @@ class Cron extends SchedulerAbstract $this->run('-l > ' . __DIR__ . '/tmpcron.tmp'); $jobs = []; - $fp = \fopen(__DIR__ . '/tmpcron.tmp', 'r+'); + $fp = fopen(__DIR__ . '/tmpcron.tmp', 'r+'); if ($fp) { - $line = \fgets($fp); + $line = fgets($fp); while ($line !== false) { - if ($line[0] !== '#' && \stripos($line, '# name="' . $name) !== false) { + if ($line[0] !== '#' && stripos($line, '# name="' . $name) !== false) { $elements = []; $elements[] = $name; - $elements = \array_merge($elements, \explode(' ', $line)); + $elements = array_merge($elements, explode(' ', $line)); $jobs[] = CronJob::createWith($elements); } - $line = \fgets($fp); + $line = fgets($fp); } - \fclose($fp); + fclose($fp); } $this->run(__DIR__ . '/tmpcron.tmp'); - \unlink(__DIR__ . '/tmpcron.tmp'); + unlink(__DIR__ . '/tmpcron.tmp'); return $jobs; } diff --git a/Utils/TaskSchedule/CronJob.php b/Utils/TaskSchedule/CronJob.php index 39657be78..a9975309b 100644 --- a/Utils/TaskSchedule/CronJob.php +++ b/Utils/TaskSchedule/CronJob.php @@ -37,8 +37,8 @@ class CronJob extends TaskAbstract */ public static function createWith(array $jobData) : TaskAbstract { - $interval = \array_splice($jobData, 1, 5); - $job = new self($jobData[0], $jobData[1], \implode(' ', $interval)); + $interval = array_splice($jobData, 1, 5); + $job = new self($jobData[0], $jobData[1], implode(' ', $interval)); return $job; } diff --git a/Utils/TaskSchedule/Interval.php b/Utils/TaskSchedule/Interval.php index 65d968d8a..04e69e547 100644 --- a/Utils/TaskSchedule/Interval.php +++ b/Utils/TaskSchedule/Interval.php @@ -526,7 +526,7 @@ class Interval implements \Serializable */ public function serialize() : string { - $serialized = \json_encode([ + $serialized = json_encode([ 'start' => $this->start->format('Y-m-d H:i:s'), 'end' => $this->end === null ? null : $this->end->format('Y-m-d H:i:s'), 'maxDuration' => $this->maxDuration, @@ -551,7 +551,7 @@ class Interval implements \Serializable */ public function unserialize($serialized) : void { - $data = \json_decode($serialized, true); + $data = json_decode($serialized, true); $this->start = new \DateTime($data['start']); $this->end = $data['end'] === null ? null : new \DateTime($data['end']); diff --git a/Utils/TaskSchedule/SchedulerAbstract.php b/Utils/TaskSchedule/SchedulerAbstract.php index 9e5323be8..0d1f7d502 100644 --- a/Utils/TaskSchedule/SchedulerAbstract.php +++ b/Utils/TaskSchedule/SchedulerAbstract.php @@ -60,11 +60,11 @@ abstract class SchedulerAbstract */ public static function setBin(string $path) : void { - if (\realpath($path) === false) { + if (realpath($path) === false) { throw new PathException($path); } - self::$bin = \realpath($path); + self::$bin = realpath($path); } /** @@ -90,7 +90,7 @@ abstract class SchedulerAbstract ]; foreach ($paths as $path) { - if (\is_file($path)) { + if (is_file($path)) { self::setBin($path); return true; @@ -113,7 +113,7 @@ abstract class SchedulerAbstract */ protected function run(string $cmd) : string { - $cmd = 'cd ' . \escapeshellarg(\dirname(self::$bin)) . ' && ' . \basename(self::$bin) . ' ' . $cmd; + $cmd = 'cd ' . escapeshellarg(\dirname(self::$bin)) . ' && ' . basename(self::$bin) . ' ' . $cmd; $pipes = []; $desc = [ @@ -121,25 +121,25 @@ abstract class SchedulerAbstract 2 => ['pipe', 'w'], ]; - $resource = \proc_open($cmd, $desc, $pipes, __DIR__, null); + $resource = proc_open($cmd, $desc, $pipes, __DIR__, null); if ($resource === false) { return ''; } - $stdout = \stream_get_contents($pipes[1]); - $stderr = \stream_get_contents($pipes[2]); + $stdout = stream_get_contents($pipes[1]); + $stderr = stream_get_contents($pipes[2]); foreach ($pipes as $pipe) { - \fclose($pipe); + fclose($pipe); } - $status = \proc_close($resource); + $status = proc_close($resource); if ($status === -1) { throw new \Exception((string) $stderr); } - return $stdout === false ? '' : \trim($stdout); + return $stdout === false ? '' : trim($stdout); } /** @@ -197,7 +197,7 @@ abstract class SchedulerAbstract */ protected function normalize(string $raw) : string { - return \str_replace("\r\n", "\n", $raw); + return str_replace("\r\n", "\n", $raw); } /** diff --git a/Utils/TaskSchedule/TaskScheduler.php b/Utils/TaskSchedule/TaskScheduler.php index 68e3f6fc4..0f162a904 100644 --- a/Utils/TaskSchedule/TaskScheduler.php +++ b/Utils/TaskSchedule/TaskScheduler.php @@ -62,12 +62,12 @@ class TaskScheduler extends SchedulerAbstract */ public function getAll() : array { - $lines = \explode("\n", $this->normalize($this->run('/query /v /fo CSV'))); + $lines = explode("\n", $this->normalize($this->run('/query /v /fo CSV'))); unset($lines[0]); $jobs = []; foreach ($lines as $line) { - $jobs[] = Schedule::createWith(\str_getcsv($line)); + $jobs[] = Schedule::createWith(str_getcsv($line)); } return $jobs; @@ -79,22 +79,22 @@ class TaskScheduler extends SchedulerAbstract public function getAllByName(string $name, bool $exact = true) : array { if ($exact) { - $lines = \explode("\n", $this->normalize($this->run('/query /v /fo CSV /tn ' . \escapeshellarg($name)))); + $lines = explode("\n", $this->normalize($this->run('/query /v /fo CSV /tn ' . escapeshellarg($name)))); unset($lines[0]); $jobs = []; foreach ($lines as $line) { - $jobs[] = Schedule::createWith(\str_getcsv($line)); + $jobs[] = Schedule::createWith(str_getcsv($line)); } } else { - $lines = \explode("\n", $this->normalize($this->run('/query /v /fo CSV'))); + $lines = explode("\n", $this->normalize($this->run('/query /v /fo CSV'))); unset($lines[0]); $jobs = []; foreach ($lines as $key => $line) { - $line = \str_getcsv($line); + $line = str_getcsv($line); - if (\stripos($line[1], $name) !== false) { + if (stripos($line[1], $name) !== false) { $jobs[] = Schedule::createWith($line); } } diff --git a/Validation/Base/DateTime.php b/Validation/Base/DateTime.php index 7f977011c..df456bd76 100644 --- a/Validation/Base/DateTime.php +++ b/Validation/Base/DateTime.php @@ -31,6 +31,6 @@ abstract class DateTime extends ValidatorAbstract */ public static function isValid(mixed $value, array $constraints = null) : bool { - return (bool) \strtotime($value); + return (bool) strtotime($value); } } diff --git a/Validation/Base/Json.php b/Validation/Base/Json.php index cceb2f53c..f34080257 100644 --- a/Validation/Base/Json.php +++ b/Validation/Base/Json.php @@ -32,9 +32,9 @@ abstract class Json extends ValidatorAbstract */ public static function isValid(mixed $value, array $constraints = null) : bool { - \json_decode($value); + json_decode($value); - return \json_last_error() == \JSON_ERROR_NONE; + return json_last_error() == \JSON_ERROR_NONE; } /** @@ -113,7 +113,7 @@ abstract class Json extends ValidatorAbstract { $completePaths = []; foreach ($template as $key => $value) { - $key = \str_replace('/0', '/.*', $key); + $key = str_replace('/0', '/.*', $key); $completePaths[$key] = $value; } @@ -122,7 +122,7 @@ abstract class Json extends ValidatorAbstract foreach ($completePaths as $tPath => $tValue) { if ($tPath === $sPath - || \preg_match('~' . \str_replace('/', '\\/', $tPath) . '~', $sPath) === 1 + || preg_match('~' . str_replace('/', '\\/', $tPath) . '~', $sPath) === 1 ) { $hasDefinition = true; break; @@ -151,9 +151,9 @@ abstract class Json extends ValidatorAbstract { $completePaths = []; foreach ($template as $key => $value) { - $key = \str_replace('/0', '/.*', $key); + $key = str_replace('/0', '/.*', $key); - if (\stripos($key, '/.*') !== false) { + if (stripos($key, '/.*') !== false) { continue; } @@ -165,7 +165,7 @@ abstract class Json extends ValidatorAbstract foreach ($source as $sPath => $sValue) { if ($tPath === $sPath - || \preg_match('~' . \str_replace('/', '\\/', $tPath) . '~', $sPath) === 1 + || preg_match('~' . str_replace('/', '\\/', $tPath) . '~', $sPath) === 1 ) { unset($completePaths[$tPath]); break; @@ -190,7 +190,7 @@ abstract class Json extends ValidatorAbstract { $validPaths = []; foreach ($template as $key => $value) { - $key = \str_replace('/0', '/\d*', $key); + $key = str_replace('/0', '/\d*', $key); $validPaths[$key] = $value; } @@ -200,13 +200,13 @@ abstract class Json extends ValidatorAbstract foreach ($validPaths as $tPath => $tValue) { if ($tPath === $sPath - || \preg_match('~' . \str_replace('/', '\\/', $tPath) . '~', $sPath) === 1 + || preg_match('~' . str_replace('/', '\\/', $tPath) . '~', $sPath) === 1 ) { $pathFound = true; $sValue = StringUtils::stringify($sValue); if (($tValue === $sValue - || \preg_match('~' . ((string) $tValue) . '~', (string) $sValue) === 1) + || preg_match('~' . ((string) $tValue) . '~', (string) $sValue) === 1) ) { $isValidValue = true; break; diff --git a/Validation/Finance/BIC.php b/Validation/Finance/BIC.php index cafc3e17e..90961d14c 100644 --- a/Validation/Finance/BIC.php +++ b/Validation/Finance/BIC.php @@ -31,6 +31,6 @@ final class BIC extends ValidatorAbstract */ public static function isValid(mixed $value, array $constraints = null) : bool { - return (bool) \preg_match('/^[a-z]{6}[0-9a-z]{2}([0-9a-z]{3})?\z/i', $value); + return (bool) preg_match('/^[a-z]{6}[0-9a-z]{2}([0-9a-z]{3})?\z/i', $value); } } diff --git a/Validation/Finance/CreditCard.php b/Validation/Finance/CreditCard.php index 3f3f6e66b..831cc53ae 100644 --- a/Validation/Finance/CreditCard.php +++ b/Validation/Finance/CreditCard.php @@ -35,7 +35,7 @@ final class CreditCard extends ValidatorAbstract return false; } - $value = \preg_replace('/\D/', '', $value) ?? ''; + $value = preg_replace('/\D/', '', $value) ?? ''; // Set the string length and parity $numberLength = \strlen($value); diff --git a/Validation/Finance/Iban.php b/Validation/Finance/Iban.php index d408481c8..6c033ee88 100644 --- a/Validation/Finance/Iban.php +++ b/Validation/Finance/Iban.php @@ -31,14 +31,14 @@ final class Iban extends ValidatorAbstract */ public static function isValid(mixed $value, array $constraints = null) : bool { - $value = \str_replace(' ', '', \strtolower($value)); + $value = str_replace(' ', '', strtolower($value)); - $temp = \substr($value, 0, 2); + $temp = substr($value, 0, 2); if ($temp === false) { return false; // @codeCoverageIgnore } - $enumName = 'C_' . \strtoupper($temp); + $enumName = 'C_' . strtoupper($temp); if (!IbanEnum::isValidName($enumName)) { self::$error = IbanErrorType::INVALID_COUNTRY; @@ -46,7 +46,7 @@ final class Iban extends ValidatorAbstract return false; } - $layout = \str_replace(' ', '', IbanEnum::getByName($enumName)); + $layout = str_replace(' ', '', IbanEnum::getByName($enumName)); if (\strlen($value) !== \strlen($layout)) { self::$error = IbanErrorType::INVALID_LENGTH; @@ -87,12 +87,12 @@ final class Iban extends ValidatorAbstract */ private static function validateZeros(string $iban, string $layout) : bool { - if (\strpos($layout, '0') === false) { + if (strpos($layout, '0') === false) { return true; } $lastPos = 0; - while (($lastPos = \strpos($layout, '0', $lastPos)) !== false) { + while (($lastPos = strpos($layout, '0', $lastPos)) !== false) { if ($iban[$lastPos] !== '0') { return false; } @@ -115,13 +115,13 @@ final class Iban extends ValidatorAbstract */ private static function validateNumeric(string $iban, string $layout) : bool { - if (\strpos($layout, 'n') === false) { + if (strpos($layout, 'n') === false) { return true; } $lastPos = 0; - while (($lastPos = \strpos($layout, 'n', $lastPos)) !== false) { - if (!\is_numeric($iban[$lastPos])) { + while (($lastPos = strpos($layout, 'n', $lastPos)) !== false) { + if (!is_numeric($iban[$lastPos])) { return false; } @@ -145,18 +145,18 @@ final class Iban extends ValidatorAbstract $chars = ['a' => 10, 'b' => 11, 'c' => 12, 'd' => 13, 'e' => 14, 'f' => 15, 'g' => 16, 'h' => 17, 'i' => 18, 'j' => 19, 'k' => 20, 'l' => 21, 'm' => 22, 'n' => 23, 'o' => 24, 'p' => 25, 'q' => 26, 'r' => 27, 's' => 28, 't' => 29, 'u' => 30, 'v' => 31, 'w' => 32, 'x' => 33, 'y' => 34, 'z' => 35,]; - $moved = \substr($iban, 4) . \substr($iban, 0, 4); - $movedArray = (array) \str_split($moved); + $moved = substr($iban, 4) . substr($iban, 0, 4); + $movedArray = (array) str_split($moved); $new = ''; foreach ($movedArray as $key => $value) { - if (!\is_numeric($movedArray[$key])) { + if (!is_numeric($movedArray[$key])) { $movedArray[$key] = $chars[$movedArray[$key]]; } $new .= $movedArray[$key]; } - return \bcmod($new, '97') == 1; + return bcmod($new, '97') == 1; } } diff --git a/Validation/Network/Email.php b/Validation/Network/Email.php index 16552bbac..05855af6f 100644 --- a/Validation/Network/Email.php +++ b/Validation/Network/Email.php @@ -41,7 +41,7 @@ abstract class Email extends ValidatorAbstract */ public static function isValid(mixed $value, array $constraints = null) : bool { - if (\filter_var($value, \FILTER_VALIDATE_EMAIL) === false) { + if (filter_var($value, \FILTER_VALIDATE_EMAIL) === false) { self::$msg = 'Invalid Email by filter_var standards'; self::$error = 1; diff --git a/Validation/Network/Hostname.php b/Validation/Network/Hostname.php index 54aa86a7c..4f8e8947e 100644 --- a/Validation/Network/Hostname.php +++ b/Validation/Network/Hostname.php @@ -47,14 +47,14 @@ abstract class Hostname extends ValidatorAbstract if (empty($value) || \strlen($value) > 256 - || !\preg_match('/^([a-zA-Z\d.-]*|\[[a-fA-F\d:]+])$/', $value) + || !preg_match('/^([a-zA-Z\d.-]*|\[[a-fA-F\d:]+])$/', $value) ) { return false; - } elseif (\strlen($value) > 2 && \substr($value, 0, 1) === '[' && \substr($value, -1, 1) === ']') { - return \filter_var(\substr($value, 1, -1), \FILTER_VALIDATE_IP, \FILTER_FLAG_IPV6) !== false; - } elseif (\is_numeric(\str_replace('.', '', $value))) { - return \filter_var($value, \FILTER_VALIDATE_IP, \FILTER_FLAG_IPV4) !== false; - } elseif (\filter_var('http://' . $value, \FILTER_VALIDATE_URL) !== false) { + } elseif (\strlen($value) > 2 && substr($value, 0, 1) === '[' && substr($value, -1, 1) === ']') { + return filter_var(substr($value, 1, -1), \FILTER_VALIDATE_IP, \FILTER_FLAG_IPV6) !== false; + } elseif (is_numeric(str_replace('.', '', $value))) { + return filter_var($value, \FILTER_VALIDATE_IP, \FILTER_FLAG_IPV4) !== false; + } elseif (filter_var('http://' . $value, \FILTER_VALIDATE_URL) !== false) { return true; } diff --git a/Validation/Network/Ip.php b/Validation/Network/Ip.php index a56cca870..dc447c0b8 100644 --- a/Validation/Network/Ip.php +++ b/Validation/Network/Ip.php @@ -41,7 +41,7 @@ abstract class Ip extends ValidatorAbstract */ public static function isValid(mixed $value, array $constraints = null) : bool { - return \filter_var($value, \FILTER_VALIDATE_IP) !== false; + return filter_var($value, \FILTER_VALIDATE_IP) !== false; } /** @@ -55,7 +55,7 @@ abstract class Ip extends ValidatorAbstract */ public static function isValidIpv6(mixed $value) : bool { - return \filter_var($value, \FILTER_VALIDATE_IP, \FILTER_FLAG_IPV6) !== false; + return filter_var($value, \FILTER_VALIDATE_IP, \FILTER_FLAG_IPV6) !== false; } /** @@ -69,6 +69,6 @@ abstract class Ip extends ValidatorAbstract */ public static function isValidIpv4(mixed $value) : bool { - return \filter_var($value, \FILTER_VALIDATE_IP, \FILTER_FLAG_IPV4) !== false; + return filter_var($value, \FILTER_VALIDATE_IP, \FILTER_FLAG_IPV4) !== false; } } diff --git a/Validation/Validator.php b/Validation/Validator.php index fb8979e7d..611f5f30f 100644 --- a/Validation/Validator.php +++ b/Validation/Validator.php @@ -45,7 +45,7 @@ final class Validator extends ValidatorAbstract } foreach ($constraints as $test => $settings) { - $callback = StringUtils::endsWith($test, 'Not') ? \substr($test, 0, -3) : (string) $test; + $callback = StringUtils::endsWith($test, 'Not') ? substr($test, 0, -3) : (string) $test; if (!\is_callable($callback)) { throw new \BadFunctionCallException(); @@ -79,7 +79,7 @@ final class Validator extends ValidatorAbstract } foreach ($constraint as $key => $value) { - if (!\is_a($var, $value)) { + if (!is_a($var, $value)) { return false; } } @@ -121,7 +121,7 @@ final class Validator extends ValidatorAbstract */ public static function contains(string $var, string | array $substr) : bool { - return \is_string($substr) ? \strpos($var, $substr) !== false : StringUtils::contains($var, $substr); + return \is_string($substr) ? strpos($var, $substr) !== false : StringUtils::contains($var, $substr); } /** @@ -136,7 +136,7 @@ final class Validator extends ValidatorAbstract */ public static function matches(string $var, string $pattern) : bool { - return (\preg_match($pattern, $var) === 1 ? true : false); + return (preg_match($pattern, $var) === 1 ? true : false); } /** diff --git a/Version/Version.php b/Version/Version.php index 61f0f1f18..f84ffa5d6 100644 --- a/Version/Version.php +++ b/Version/Version.php @@ -48,6 +48,6 @@ final class Version */ public static function compare(string $ver1, string $ver2) : int { - return \version_compare($ver1, $ver2); + return version_compare($ver1, $ver2); } } diff --git a/Views/View.php b/Views/View.php index 2d252ba26..166079d8b 100644 --- a/Views/View.php +++ b/Views/View.php @@ -232,18 +232,18 @@ class View extends ViewAbstract { $match = '/Modules/'; - if (($start = \strripos($this->template, $match)) === false) { + if (($start = strripos($this->template, $match)) === false) { throw new InvalidModuleException($this->template); } $start = $start + \strlen($match); - $end = \strpos($this->template, '/', $start); + $end = strpos($this->template, '/', $start); if ($end === false) { throw new InvalidModuleException($this->template); } - $this->module = \substr($this->template, $start, $end - $start); + $this->module = substr($this->template, $start, $end - $start); if ($this->module === false) { $this->module = '0'; // @codeCoverageIgnore @@ -265,13 +265,13 @@ class View extends ViewAbstract { $match = '/Theme/'; - if (($start = \strripos($this->template, $match)) === false) { + if (($start = strripos($this->template, $match)) === false) { throw new InvalidThemeException($this->template); } $start = $start + \strlen($match); - $end = \strpos($this->template, '/', $start); - $this->theme = \substr($this->template, $start, $end - $start); + $end = strpos($this->template, '/', $start); + $this->theme = substr($this->template, $start, $end - $start); if ($this->theme === false) { $this->theme = '0'; // @codeCoverageIgnore @@ -291,7 +291,7 @@ class View extends ViewAbstract */ public function getHtml(string $translation, string $module = null, string $theme = null) : string { - return \htmlspecialchars($this->getText($translation, $module, $theme)); + return htmlspecialchars($this->getText($translation, $module, $theme)); } /** diff --git a/Views/ViewAbstract.php b/Views/ViewAbstract.php index 65663f67a..8a15261fe 100644 --- a/Views/ViewAbstract.php +++ b/Views/ViewAbstract.php @@ -97,7 +97,7 @@ abstract class ViewAbstract implements RenderableInterface */ public function printHtml(?string $text) : string { - return $text === null ? '' : \htmlspecialchars($text); + return $text === null ? '' : htmlspecialchars($text); } /** @@ -111,7 +111,7 @@ abstract class ViewAbstract implements RenderableInterface */ public static function html(?string $text) : string { - return $text === null ? '' : \htmlspecialchars($text); + return $text === null ? '' : htmlspecialchars($text); } /** @@ -196,7 +196,7 @@ abstract class ViewAbstract implements RenderableInterface public function serialize() : string { if (empty($this->template)) { - return (string) \json_encode($this->toArray()); + return (string) json_encode($this->toArray()); } return $this->render(); @@ -239,11 +239,11 @@ abstract class ViewAbstract implements RenderableInterface try { if ($this->isBuffered) { - \ob_start(); + ob_start(); } $path = $this->template; - if (!\is_file($path)) { + if (!is_file($path)) { throw new PathException($path); } @@ -251,15 +251,15 @@ abstract class ViewAbstract implements RenderableInterface $includeData = include $path; if ($this->isBuffered) { - $ob = (string) \ob_get_clean(); + $ob = (string) ob_get_clean(); } if (\is_array($includeData)) { - $ob = (string) \json_encode($includeData); + $ob = (string) json_encode($includeData); } } catch (\Throwable $e) { if ($this->isBuffered) { - \ob_end_clean(); + ob_end_clean(); } $ob = ''; @@ -284,7 +284,7 @@ abstract class ViewAbstract implements RenderableInterface try { $path = $this->template; - if (!\is_file($path)) { + if (!is_file($path)) { throw new PathException($path); } diff --git a/tests/Account/AccountStatusTest.php b/tests/Account/AccountStatusTest.php index 7b3e22582..3b3fad8a9 100644 --- a/tests/Account/AccountStatusTest.php +++ b/tests/Account/AccountStatusTest.php @@ -38,7 +38,7 @@ class AccountStatusTest extends \PHPUnit\Framework\TestCase */ public function testUnique() : void { - self::assertEquals(AccountStatus::getConstants(), \array_unique(AccountStatus::getConstants())); + self::assertEquals(AccountStatus::getConstants(), array_unique(AccountStatus::getConstants())); } /** diff --git a/tests/Account/AccountTest.php b/tests/Account/AccountTest.php index 6bf4ab26c..4933f9065 100644 --- a/tests/Account/AccountTest.php +++ b/tests/Account/AccountTest.php @@ -116,7 +116,7 @@ class AccountTest extends \PHPUnit\Framework\TestCase $array = $account->toArray(); self::assertIsArray($array); self::assertGreaterThan(0, \count($array)); - self::assertEquals(\json_encode($array), $account->__toString()); + self::assertEquals(json_encode($array), $account->__toString()); self::assertEquals($array, $account->jsonSerialize()); } @@ -321,7 +321,7 @@ class AccountTest extends \PHPUnit\Framework\TestCase $rand = 0; do { - $rand = \mt_rand(\PHP_INT_MIN, \PHP_INT_MAX); + $rand = mt_rand(\PHP_INT_MIN, \PHP_INT_MAX); } while (AccountStatus::isValidValue($rand)); $account->setStatus($rand); @@ -339,7 +339,7 @@ class AccountTest extends \PHPUnit\Framework\TestCase $rand = 0; do { - $rand = \mt_rand(\PHP_INT_MIN, \PHP_INT_MAX); + $rand = mt_rand(\PHP_INT_MIN, \PHP_INT_MAX); } while (AccountType::isValidValue($rand)); $account->setType($rand); diff --git a/tests/Account/AccountTypeTest.php b/tests/Account/AccountTypeTest.php index fb71d3d04..6ebc54768 100644 --- a/tests/Account/AccountTypeTest.php +++ b/tests/Account/AccountTypeTest.php @@ -38,7 +38,7 @@ class AccountTypeTest extends \PHPUnit\Framework\TestCase */ public function testUnique() : void { - self::assertEquals(AccountType::getConstants(), \array_unique(AccountType::getConstants())); + self::assertEquals(AccountType::getConstants(), array_unique(AccountType::getConstants())); } /** diff --git a/tests/Account/GroupStatusTest.php b/tests/Account/GroupStatusTest.php index b487f2bd3..3c549355c 100644 --- a/tests/Account/GroupStatusTest.php +++ b/tests/Account/GroupStatusTest.php @@ -38,7 +38,7 @@ class GroupStatusTest extends \PHPUnit\Framework\TestCase */ public function testUnique() : void { - self::assertEquals(GroupStatus::getConstants(), \array_unique(GroupStatus::getConstants())); + self::assertEquals(GroupStatus::getConstants(), array_unique(GroupStatus::getConstants())); } /** diff --git a/tests/Account/GroupTest.php b/tests/Account/GroupTest.php index 4aa42a956..888fc4af2 100644 --- a/tests/Account/GroupTest.php +++ b/tests/Account/GroupTest.php @@ -73,7 +73,7 @@ class GroupTest extends \PHPUnit\Framework\TestCase $array = $group->toArray(); self::assertIsArray($array); self::assertGreaterThan(0, \count($array)); - self::assertEquals(\json_encode($array), $group->__toString()); + self::assertEquals(json_encode($array), $group->__toString()); self::assertEquals($array, $group->jsonSerialize()); } @@ -185,7 +185,7 @@ class GroupTest extends \PHPUnit\Framework\TestCase $rand = 0; do { - $rand = \mt_rand(\PHP_INT_MIN, \PHP_INT_MAX); + $rand = mt_rand(\PHP_INT_MIN, \PHP_INT_MAX); } while (GroupStatus::isValidValue($rand)); $group->setStatus($rand); diff --git a/tests/Account/PermissionTypeTest.php b/tests/Account/PermissionTypeTest.php index 84b45ce1f..e314b8e27 100644 --- a/tests/Account/PermissionTypeTest.php +++ b/tests/Account/PermissionTypeTest.php @@ -38,7 +38,7 @@ class PermissionTypeTest extends \PHPUnit\Framework\TestCase */ public function testUnique() : void { - self::assertEquals(PermissionType::getConstants(), \array_unique(PermissionType::getConstants())); + self::assertEquals(PermissionType::getConstants(), array_unique(PermissionType::getConstants())); } /** diff --git a/tests/Algorithm/CoinMatching/MinimumCoinProblemTest.php b/tests/Algorithm/CoinMatching/MinimumCoinProblemTest.php index a3f2674d8..a7173fc23 100644 --- a/tests/Algorithm/CoinMatching/MinimumCoinProblemTest.php +++ b/tests/Algorithm/CoinMatching/MinimumCoinProblemTest.php @@ -34,7 +34,7 @@ class MinimumCoinProblemTest extends \PHPUnit\Framework\TestCase { self::assertEquals( [], - \array_diff_key([6, 6, 5], MinimumCoinProblem::getMinimumCoinsForValueI([9, 6, 5, 6, 1], 17)) + array_diff_key([6, 6, 5], MinimumCoinProblem::getMinimumCoinsForValueI([9, 6, 5, 6, 1], 17)) ); } } diff --git a/tests/Algorithm/Maze/MazeGeneratorTest.php b/tests/Algorithm/Maze/MazeGeneratorTest.php index 37a148753..b657136c9 100644 --- a/tests/Algorithm/Maze/MazeGeneratorTest.php +++ b/tests/Algorithm/Maze/MazeGeneratorTest.php @@ -67,7 +67,7 @@ class MazeGeneratorTest extends \PHPUnit\Framework\TestCase public function testMazeRender() : void { $ob = MazeGenerator::render(MazeGenerator::random(10, 7)); - $maze = \explode("\n", $ob); + $maze = explode("\n", $ob); // correct top self::assertEquals( diff --git a/tests/Algorithm/Sort/NumericElement.php b/tests/Algorithm/Sort/NumericElement.php index 1d3a023c4..db4816785 100644 --- a/tests/Algorithm/Sort/NumericElement.php +++ b/tests/Algorithm/Sort/NumericElement.php @@ -52,7 +52,7 @@ float $value = 0; $values[] = $element->value; } - return \max($values); + return max($values); } public static function min(array $list) : int | float @@ -62,6 +62,6 @@ float $value = 0; $values[] = $element->value; } - return \min($values); + return min($values); } } diff --git a/tests/Application/ApplicationInfoTest.php b/tests/Application/ApplicationInfoTest.php index 6152c224a..18a8f1f8b 100644 --- a/tests/Application/ApplicationInfoTest.php +++ b/tests/Application/ApplicationInfoTest.php @@ -35,7 +35,7 @@ class ApplicationInfoTest extends \PHPUnit\Framework\TestCase $info = new ApplicationInfo(__DIR__ . '/info-test.json'); $info->load(); - $jarray = \json_decode(\file_get_contents(__DIR__ . '/info-test.json'), true); + $jarray = json_decode(file_get_contents(__DIR__ . '/info-test.json'), true); self::assertEquals($jarray, $info->get()); self::assertEquals($jarray['name']['id'], $info->getId()); @@ -56,7 +56,7 @@ class ApplicationInfoTest extends \PHPUnit\Framework\TestCase */ public function testChange() : void { - $jarray = \json_decode(\file_get_contents(__DIR__ . '/info-test.json'), true); + $jarray = json_decode(file_get_contents(__DIR__ . '/info-test.json'), true); $info = new ApplicationInfo(__DIR__ . '/info-test.json'); $info->load(); diff --git a/tests/Application/ApplicationManagerTest.php b/tests/Application/ApplicationManagerTest.php index 122d8f231..9c578d405 100644 --- a/tests/Application/ApplicationManagerTest.php +++ b/tests/Application/ApplicationManagerTest.php @@ -83,8 +83,8 @@ class ApplicationManagerTest extends \PHPUnit\Framework\TestCase public function testInstallUninstall() : void { self::assertTrue($this->appManager->install(__DIR__ . '/Testapp', __DIR__ . '/Apps/Testapp')); - self::assertTrue(\is_dir(__DIR__ . '/Apps/Testapp')); - self::assertTrue(\is_file(__DIR__ . '/Apps/Testapp/css/styles.css')); + self::assertTrue(is_dir(__DIR__ . '/Apps/Testapp')); + self::assertTrue(is_file(__DIR__ . '/Apps/Testapp/css/styles.css')); $apps = $this->appManager->getInstalledApplications(false, __DIR__ . '/Apps'); self::assertTrue(isset($apps['Testapp'])); @@ -95,7 +95,7 @@ class ApplicationManagerTest extends \PHPUnit\Framework\TestCase self::assertTrue(\in_array('Navigation', $providing['Testapp'])); $this->appManager->uninstall(__DIR__ . '/Apps/Testapp'); - self::assertFalse(\is_dir(__DIR__ . '/Apps/Testapp')); + self::assertFalse(is_dir(__DIR__ . '/Apps/Testapp')); } /** diff --git a/tests/Application/InstallerAbstractTest.php b/tests/Application/InstallerAbstractTest.php index 3a175a031..51a117966 100644 --- a/tests/Application/InstallerAbstractTest.php +++ b/tests/Application/InstallerAbstractTest.php @@ -44,6 +44,6 @@ class InstallerAbstractTest extends \PHPUnit\Framework\TestCase public function testInvalidTheme() : void { $this->installer::installTheme(__DIR__, 'Invalid'); - self::assertFalse(\is_dir(__DIR__ . '/css')); + self::assertFalse(is_dir(__DIR__ . '/css')); } } diff --git a/tests/Application/StatusAbstractTest.php b/tests/Application/StatusAbstractTest.php index cc724d694..9183779a7 100644 --- a/tests/Application/StatusAbstractTest.php +++ b/tests/Application/StatusAbstractTest.php @@ -46,6 +46,6 @@ class StatusAbstractTest extends \PHPUnit\Framework\TestCase $this->status::activateRoutes(); $this->status::activateHooks(); - self::assertFalse(\is_file(__DIR__ . '/Routes.php')); + self::assertFalse(is_file(__DIR__ . '/Routes.php')); } } diff --git a/tests/Application/UninstallerAbstractTest.php b/tests/Application/UninstallerAbstractTest.php index f157f26f9..c6d1fd2ee 100644 --- a/tests/Application/UninstallerAbstractTest.php +++ b/tests/Application/UninstallerAbstractTest.php @@ -51,6 +51,6 @@ class UninstallerAbstractTest extends \PHPUnit\Framework\TestCase new ApplicationInfo(__DIR__) ); - self::assertFalse(\file_exists($this->uninstaller::PATH . '/Install/db.json')); + self::assertFalse(file_exists($this->uninstaller::PATH . '/Install/db.json')); } } diff --git a/tests/Asset/AssetTypeTest.php b/tests/Asset/AssetTypeTest.php index adcbfc5cd..845ae750b 100644 --- a/tests/Asset/AssetTypeTest.php +++ b/tests/Asset/AssetTypeTest.php @@ -38,7 +38,7 @@ class AssetTypeTest extends \PHPUnit\Framework\TestCase */ public function testUnique() : void { - self::assertEquals(AssetType::getConstants(), \array_unique(AssetType::getConstants())); + self::assertEquals(AssetType::getConstants(), array_unique(AssetType::getConstants())); } /** diff --git a/tests/Auth/LoginReturnTypeTest.php b/tests/Auth/LoginReturnTypeTest.php index 2297a5fc6..5c66a3a5b 100644 --- a/tests/Auth/LoginReturnTypeTest.php +++ b/tests/Auth/LoginReturnTypeTest.php @@ -38,7 +38,7 @@ class LoginReturnTypeTest extends \PHPUnit\Framework\TestCase */ public function testUnique() : void { - self::assertEquals(LoginReturnType::getConstants(), \array_unique(LoginReturnType::getConstants())); + self::assertEquals(LoginReturnType::getConstants(), array_unique(LoginReturnType::getConstants())); } /** diff --git a/tests/Autoloader.php b/tests/Autoloader.php index c16b8767f..73f4bb369 100644 --- a/tests/Autoloader.php +++ b/tests/Autoloader.php @@ -14,7 +14,7 @@ declare(strict_types=1); namespace Tests\PHPUnit; -\spl_autoload_register('\Tests\PHPUnit\Autoloader::defaultAutoloader'); +spl_autoload_register('\Tests\PHPUnit\Autoloader::defaultAutoloader'); /** * Autoloader class. @@ -39,10 +39,10 @@ class Autoloader */ public static function defaultAutoloader(string $class) : void { - $class = \ltrim($class, '\\'); - $class = \str_replace(['_', '\\'], '/', $class); + $class = ltrim($class, '\\'); + $class = str_replace(['_', '\\'], '/', $class); - if (!\is_file($path = __DIR__ . '/../../' . $class . '.php')) { + if (!is_file($path = __DIR__ . '/../../' . $class . '.php')) { return; } @@ -63,9 +63,9 @@ class Autoloader */ public static function exists(string $class) : bool { - $class = \ltrim($class, '\\'); - $class = \str_replace(['_', '\\'], '/', $class); + $class = ltrim($class, '\\'); + $class = str_replace(['_', '\\'], '/', $class); - return \is_file(__DIR__ . '/../../' . $class . '.php'); + return is_file(__DIR__ . '/../../' . $class . '.php'); } } diff --git a/tests/AutoloaderTest.php b/tests/AutoloaderTest.php index 2107bbcf1..327d5d4c4 100644 --- a/tests/AutoloaderTest.php +++ b/tests/AutoloaderTest.php @@ -42,8 +42,8 @@ class AutoloaderTest extends \PHPUnit\Framework\TestCase { Autoloader::defaultAutoloader('\phpOMS\tests\TestLoad'); - $includes = \get_included_files(); - self::assertTrue(\in_array(\realpath(__DIR__ . '/TestLoad.php'), $includes)); + $includes = get_included_files(); + self::assertTrue(\in_array(realpath(__DIR__ . '/TestLoad.php'), $includes)); } /** @@ -56,8 +56,8 @@ class AutoloaderTest extends \PHPUnit\Framework\TestCase Autoloader::defaultAutoloader('\tests\TestLoad2'); Autoloader::defaultAutoloader('\tests\Invalid'); - $includes = \get_included_files(); - self::assertTrue(\in_array(\realpath(__DIR__ . '/TestLoad2.php'), $includes)); + $includes = get_included_files(); + self::assertTrue(\in_array(realpath(__DIR__ . '/TestLoad2.php'), $includes)); } public function testPathFinding() : void @@ -72,20 +72,20 @@ class AutoloaderTest extends \PHPUnit\Framework\TestCase public function testOpcodeCacheInvalidation() : void { if (!\extension_loaded('zend opcache') - || \ini_get('opcache.enable') !== '1' - || \ini_get('opcache.enable_cli') !== '1' - || \ini_get('opcache.file_cache_only') !== '0' - || \opcache_get_status() === false + || ini_get('opcache.enable') !== '1' + || ini_get('opcache.enable_cli') !== '1' + || ini_get('opcache.file_cache_only') !== '0' + || opcache_get_status() === false ) { $this->markTestSkipped( 'The opcache extension is not available.' ); } - self::assertFalse(\opcache_is_script_cached(__DIR__ . '/TestLoad3.php')); + self::assertFalse(opcache_is_script_cached(__DIR__ . '/TestLoad3.php')); Autoloader::defaultAutoloader('\phpOMS\tests\TestLoad3'); self::assertTrue(Autoloader::invalidate(__DIR__ . '/TestLoad3.php')); - self::assertTrue(\opcache_is_script_cached(__DIR__ . '/TestLoad3.php')); + self::assertTrue(opcache_is_script_cached(__DIR__ . '/TestLoad3.php')); } /** @@ -94,7 +94,7 @@ class AutoloaderTest extends \PHPUnit\Framework\TestCase */ public function testUncachedInvalidation() : void { - self::assertFalse(\opcache_is_script_cached(__DIR__ . '/TestLoad4.php')); + self::assertFalse(opcache_is_script_cached(__DIR__ . '/TestLoad4.php')); self::assertFalse(Autoloader::invalidate(__DIR__ . '/TestLoad4.php')); } } diff --git a/tests/Bootstrap.php b/tests/Bootstrap.php index ec6619a23..8642016d4 100644 --- a/tests/Bootstrap.php +++ b/tests/Bootstrap.php @@ -1,14 +1,14 @@ /dev/null 2>&1 & echo $!', WEB_SERVER_HOST, WEB_SERVER_PORT, @@ -386,34 +386,34 @@ function phpServe() : void // Execute the command and store the process ID $output = []; - echo \sprintf('Starting server...') . \PHP_EOL; - echo \sprintf(' Current directory: %s', \getcwd()) . \PHP_EOL; - echo \sprintf(' %s', $command); - \exec($command, $output); + echo sprintf('Starting server...') . \PHP_EOL; + echo sprintf(' Current directory: %s', getcwd()) . \PHP_EOL; + echo sprintf(' %s', $command); + exec($command, $output); // Get PID if ($isWindows) { - $pid = \explode('=', $output[0]); - $pid = \str_replace(' ', '', $pid[1]); - $pid = \str_replace(';', '', $pid); + $pid = explode('=', $output[0]); + $pid = str_replace(' ', '', $pid[1]); + $pid = str_replace(';', '', $pid); } else { $pid = (int) $output[0]; } // Log - echo \sprintf( + echo sprintf( ' %s - Web server started on %s:%d with PID %d', - \date('r'), + date('r'), WEB_SERVER_HOST, WEB_SERVER_PORT, $pid ) . \PHP_EOL; // Kill the web server when the process ends - \register_shutdown_function(function() use ($killCommand, $pid) : void { - echo \PHP_EOL . \sprintf('Stopping server...') . \PHP_EOL; - echo \sprintf(' %s - Killing process with ID %d', \date('r'), $pid) . \PHP_EOL; - \exec($killCommand . $pid); + register_shutdown_function(function() use ($killCommand, $pid) : void { + echo \PHP_EOL . sprintf('Stopping server...') . \PHP_EOL; + echo sprintf(' %s - Killing process with ID %d', date('r'), $pid) . \PHP_EOL; + exec($killCommand . $pid); }); } diff --git a/tests/Business/Finance/FinanceFormulasTest.php b/tests/Business/Finance/FinanceFormulasTest.php index 5873d90ee..04f2b1cd0 100644 --- a/tests/Business/Finance/FinanceFormulasTest.php +++ b/tests/Business/Finance/FinanceFormulasTest.php @@ -36,8 +36,8 @@ class FinanceFormulasTest extends \PHPUnit\Framework\TestCase $n = 12; $apy = FinanceFormulas::getAnnualPercentageYield($r, $n); - self::assertEquals(\round($expected, 5), \round($apy, 5)); - self::assertEquals(\round($r, 2), FinanceFormulas::getStateAnnualInterestRateOfAPY($apy, $n)); + self::assertEquals(round($expected, 5), round($apy, 5)); + self::assertEquals(round($r, 2), FinanceFormulas::getStateAnnualInterestRateOfAPY($apy, $n)); } /** @@ -54,9 +54,9 @@ class FinanceFormulasTest extends \PHPUnit\Framework\TestCase $n = 5; $fva = FinanceFormulas::getFutureValueOfAnnuity($P, $r, $n); - self::assertEquals(\round($expected, 2), \round($fva, 2)); + self::assertEquals(round($expected, 2), round($fva, 2)); self::assertEquals($n, FinanceFormulas::getNumberOfPeriodsOfFVA($fva, $P, $r)); - self::assertEquals(\round($P, 2), \round(FinanceFormulas::getPeriodicPaymentOfFVA($fva, $r, $n), 2)); + self::assertEquals(round($P, 2), round(FinanceFormulas::getPeriodicPaymentOfFVA($fva, $r, $n), 2)); } /** @@ -73,8 +73,8 @@ class FinanceFormulasTest extends \PHPUnit\Framework\TestCase $t = 12; $fvacc = FinanceFormulas::getFutureValueOfAnnuityConinuousCompounding($cf, $r, $t); - self::assertEquals(\round($expected, 2), \round($fvacc, 2)); - self::assertEquals(\round($cf, 2), \round(FinanceFormulas::getCashFlowOfFVACC($fvacc, $r, $t), 2)); + self::assertEquals(round($expected, 2), round($fvacc, 2)); + self::assertEquals(round($cf, 2), round(FinanceFormulas::getCashFlowOfFVACC($fvacc, $r, $t), 2)); self::assertEquals($t, FinanceFormulas::getTimeOfFVACC($fvacc, $cf, $r)); } @@ -92,9 +92,9 @@ class FinanceFormulasTest extends \PHPUnit\Framework\TestCase $n = 5; $p = FinanceFormulas::getAnnuityPaymentPV($pv, $r, $n); - self::assertEquals(\round($expected, 2), \round($p, 2)); + self::assertEquals(round($expected, 2), round($p, 2)); self::assertEquals($n, FinanceFormulas::getNumberOfAPPV($p, $pv, $r)); - self::assertEquals(\round($pv, 2), \round(FinanceFormulas::getPresentValueOfAPPV($p, $r, $n), 2)); + self::assertEquals(round($pv, 2), round(FinanceFormulas::getPresentValueOfAPPV($p, $r, $n), 2)); } /** @@ -111,9 +111,9 @@ class FinanceFormulasTest extends \PHPUnit\Framework\TestCase $n = 5; $p = FinanceFormulas::getAnnuityPaymentFV($fv, $r, $n); - self::assertEquals(\round($expected, 2), \round($p, 2)); + self::assertEquals(round($expected, 2), round($p, 2)); self::assertEquals($n, FinanceFormulas::getNumberOfAPFV($p, $fv, $r)); - self::assertEquals(\round($fv, 2), \round(FinanceFormulas::getFutureValueOfAPFV($p, $r, $n), 2)); + self::assertEquals(round($fv, 2), round(FinanceFormulas::getFutureValueOfAPFV($p, $r, $n), 2)); } /** @@ -129,7 +129,7 @@ class FinanceFormulasTest extends \PHPUnit\Framework\TestCase $n = 5; $p = FinanceFormulas::getAnnutiyPaymentFactorPV($r, $n); - self::assertEquals(\round($expected, 5), \round($p, 5)); + self::assertEquals(round($expected, 5), round($p, 5)); self::assertEquals($n, FinanceFormulas::getNumberOfAPFPV($p, $r)); } @@ -147,9 +147,9 @@ class FinanceFormulasTest extends \PHPUnit\Framework\TestCase $n = 5; $pva = FinanceFormulas::getPresentValueOfAnnuity($P, $r, $n); - self::assertEquals(\round($expected, 2), \round($pva, 2)); + self::assertEquals(round($expected, 2), round($pva, 2)); self::assertEquals($n, FinanceFormulas::getNumberOfPeriodsOfPVA($pva, $P, $r)); - self::assertEquals(\round($P, 2), \round(FinanceFormulas::getPeriodicPaymentOfPVA($pva, $r, $n), 2)); + self::assertEquals(round($P, 2), round(FinanceFormulas::getPeriodicPaymentOfPVA($pva, $r, $n), 2)); } /** @@ -165,7 +165,7 @@ class FinanceFormulasTest extends \PHPUnit\Framework\TestCase $n = 5; $p = FinanceFormulas::getPresentValueAnnuityFactor($r, $n); - self::assertEquals(\round($expected, 4), \round($p, 4)); + self::assertEquals(round($expected, 4), round($p, 4)); self::assertEquals($n, FinanceFormulas::getPeriodsOfPVAF($p, $r)); } @@ -184,8 +184,8 @@ class FinanceFormulasTest extends \PHPUnit\Framework\TestCase $PV = FinanceFormulas::getPresentValueOfAnnuityDue($P, $r, $n); - self::assertEquals(\round($expected, 2), \round($PV, 2)); - self::assertEquals(\round($P, 2), FinanceFormulas::getPeriodicPaymentOfPVAD($PV, $r, $n)); + self::assertEquals(round($expected, 2), round($PV, 2)); + self::assertEquals(round($P, 2), FinanceFormulas::getPeriodicPaymentOfPVAD($PV, $r, $n)); self::assertEquals($n, FinanceFormulas::getPeriodsOfPVAD($PV, $P, $r)); } @@ -204,8 +204,8 @@ class FinanceFormulasTest extends \PHPUnit\Framework\TestCase $FV = FinanceFormulas::getFutureValueOfAnnuityDue($P, $r, $n); - self::assertEquals(\round($expected, 2), \round($FV, 2)); - self::assertEquals(\round($P, 2), FinanceFormulas::getPeriodicPaymentOfFVAD($FV, $r, $n)); + self::assertEquals(round($expected, 2), round($FV, 2)); + self::assertEquals(round($P, 2), FinanceFormulas::getPeriodicPaymentOfFVAD($FV, $r, $n)); self::assertEquals($n, FinanceFormulas::getPeriodsOfFVAD($FV, $P, $r)); } @@ -311,11 +311,11 @@ class FinanceFormulasTest extends \PHPUnit\Framework\TestCase $r = 0.05; $t = 3; - $C = \round(FinanceFormulas::getCompoundInterest($P, $r, $t), 2); + $C = round(FinanceFormulas::getCompoundInterest($P, $r, $t), 2); - self::assertEquals(\round($expected, 2), $C); + self::assertEquals(round($expected, 2), $C); self::assertEqualsWithDelta($P, FinanceFormulas::getPrincipalOfCompundInterest($C, $r, $t), 0.1); - self::assertEquals($t, (int) \round(FinanceFormulas::getPeriodsOfCompundInterest($P, $C, $r), 0)); + self::assertEquals($t, (int) round(FinanceFormulas::getPeriodsOfCompundInterest($P, $C, $r), 0)); } /** @@ -331,10 +331,10 @@ class FinanceFormulasTest extends \PHPUnit\Framework\TestCase $r = 0.05; $t = 3; - $C = \round(FinanceFormulas::getContinuousCompounding($P, $r, $t), 2); + $C = round(FinanceFormulas::getContinuousCompounding($P, $r, $t), 2); - self::assertEquals(\round($expected, 2), $C); - self::assertEquals(\round($P, 2), \round(FinanceFormulas::getPrincipalOfContinuousCompounding($C, $r, $t), 2)); + self::assertEquals(round($expected, 2), $C); + self::assertEquals(round($P, 2), round(FinanceFormulas::getPrincipalOfContinuousCompounding($C, $r, $t), 2)); self::assertEqualsWithDelta($t, FinanceFormulas::getPeriodsOfContinuousCompounding($P, $C, $r), 0.01); self::assertEqualsWithDelta($r, FinanceFormulas::getRateOfContinuousCompounding($P, $C, $t), 0.01); } diff --git a/tests/Business/Marketing/NetPromoterScoreTest.php b/tests/Business/Marketing/NetPromoterScoreTest.php index 1c7d47ce5..65be3dbba 100644 --- a/tests/Business/Marketing/NetPromoterScoreTest.php +++ b/tests/Business/Marketing/NetPromoterScoreTest.php @@ -43,15 +43,15 @@ class NetPromoterScoreTest extends \PHPUnit\Framework\TestCase $nps = new NetPromoterScore(); for ($i = 0; $i < 10; ++$i) { - $nps->add(\mt_rand(0, 6)); + $nps->add(mt_rand(0, 6)); } for ($i = 0; $i < 30; ++$i) { - $nps->add(\mt_rand(7, 8)); + $nps->add(mt_rand(7, 8)); } for ($i = 0; $i < 60; ++$i) { - $nps->add(\mt_rand(9, 10)); + $nps->add(mt_rand(9, 10)); } self::assertEquals(50, $nps->getScore()); diff --git a/tests/Business/Programming/MetricsTest.php b/tests/Business/Programming/MetricsTest.php index 8aeb02695..1b20fd05c 100644 --- a/tests/Business/Programming/MetricsTest.php +++ b/tests/Business/Programming/MetricsTest.php @@ -29,7 +29,7 @@ class MetricsTest extends \PHPUnit\Framework\TestCase */ public function testABCMetric() : void { - self::assertEquals((int) \sqrt(5 * 5 + 11 * 11 + 9 * 9), Metrics::abcScore(5, 11, 9)); + self::assertEquals((int) sqrt(5 * 5 + 11 * 11 + 9 * 9), Metrics::abcScore(5, 11, 9)); } /** diff --git a/tests/Business/Sales/MarketShareEstimationTest.php b/tests/Business/Sales/MarketShareEstimationTest.php index 7814a05ba..6d54fea35 100644 --- a/tests/Business/Sales/MarketShareEstimationTest.php +++ b/tests/Business/Sales/MarketShareEstimationTest.php @@ -39,8 +39,8 @@ class MarketShareEstimationTest extends \PHPUnit\Framework\TestCase */ public function testZipfShare() : void { - self::assertTrue(\abs(0.01 - MarketShareEstimation::getMarketShareFromRank(1000, 13)) < 0.01); - self::assertTrue(\abs(0.01 - MarketShareEstimation::getMarketShareFromRank(100, 19)) < 0.01); - self::assertTrue(\abs(0.01 - MarketShareEstimation::getMarketShareFromRank(100000, 8)) < 0.01); + self::assertTrue(abs(0.01 - MarketShareEstimation::getMarketShareFromRank(1000, 13)) < 0.01); + self::assertTrue(abs(0.01 - MarketShareEstimation::getMarketShareFromRank(100, 19)) < 0.01); + self::assertTrue(abs(0.01 - MarketShareEstimation::getMarketShareFromRank(100000, 8)) < 0.01); } } diff --git a/tests/DataStorage/Cache/CacheStatusTest.php b/tests/DataStorage/Cache/CacheStatusTest.php index 3f3a5c9fd..e8c200a1e 100644 --- a/tests/DataStorage/Cache/CacheStatusTest.php +++ b/tests/DataStorage/Cache/CacheStatusTest.php @@ -36,7 +36,7 @@ class CacheStatusTest extends \PHPUnit\Framework\TestCase */ public function testUnique() : void { - self::assertEquals(CacheStatus::getConstants(), \array_unique(CacheStatus::getConstants())); + self::assertEquals(CacheStatus::getConstants(), array_unique(CacheStatus::getConstants())); } /** diff --git a/tests/DataStorage/Cache/CacheTypeTest.php b/tests/DataStorage/Cache/CacheTypeTest.php index d2809cf75..adfd95e24 100644 --- a/tests/DataStorage/Cache/CacheTypeTest.php +++ b/tests/DataStorage/Cache/CacheTypeTest.php @@ -36,7 +36,7 @@ class CacheTypeTest extends \PHPUnit\Framework\TestCase */ public function testUnique() : void { - self::assertEquals(CacheType::getConstants(), \array_unique(CacheType::getConstants())); + self::assertEquals(CacheType::getConstants(), array_unique(CacheType::getConstants())); } /** diff --git a/tests/DataStorage/Cache/Connection/CacheValueTypeTest.php b/tests/DataStorage/Cache/Connection/CacheValueTypeTest.php index e687304e1..c907a8e97 100644 --- a/tests/DataStorage/Cache/Connection/CacheValueTypeTest.php +++ b/tests/DataStorage/Cache/Connection/CacheValueTypeTest.php @@ -36,7 +36,7 @@ class CacheValueTypeTest extends \PHPUnit\Framework\TestCase */ public function testUnique() : void { - self::assertEquals(CacheValueType::getConstants(), \array_unique(CacheValueType::getConstants())); + self::assertEquals(CacheValueType::getConstants(), array_unique(CacheValueType::getConstants())); } /** diff --git a/tests/DataStorage/Cache/Connection/FileCacheJsonSerializable.php b/tests/DataStorage/Cache/Connection/FileCacheJsonSerializable.php index cc9a5ae9e..21e9e8a36 100644 --- a/tests/DataStorage/Cache/Connection/FileCacheJsonSerializable.php +++ b/tests/DataStorage/Cache/Connection/FileCacheJsonSerializable.php @@ -28,6 +28,6 @@ class FileCacheJsonSerializable implements \JsonSerializable public function unserialize($val) : void { - $this->val = \json_decode($val, true); + $this->val = json_decode($val, true); } } diff --git a/tests/DataStorage/Cache/Connection/FileCacheTest.php b/tests/DataStorage/Cache/Connection/FileCacheTest.php index 5c659aaf7..64f3b8c09 100644 --- a/tests/DataStorage/Cache/Connection/FileCacheTest.php +++ b/tests/DataStorage/Cache/Connection/FileCacheTest.php @@ -33,8 +33,8 @@ class FileCacheTest extends \PHPUnit\Framework\TestCase */ protected function setUp() : void { - if (\is_dir(__DIR__ . '/Cache')) { - \rmdir(__DIR__ . '/Cache'); + if (is_dir(__DIR__ . '/Cache')) { + rmdir(__DIR__ . '/Cache'); } $this->cache = new FileCache(__DIR__ . '/Cache'); @@ -44,8 +44,8 @@ class FileCacheTest extends \PHPUnit\Framework\TestCase { $this->cache->flushAll(); - if (\is_dir(__DIR__ . '/Cache')) { - \rmdir(__DIR__ . '/Cache'); + if (is_dir(__DIR__ . '/Cache')) { + rmdir(__DIR__ . '/Cache'); } } @@ -57,7 +57,7 @@ class FileCacheTest extends \PHPUnit\Framework\TestCase public function testDefault() : void { self::assertEquals(CacheType::FILE, $this->cache->getType()); - self::assertTrue(\is_dir(__DIR__ . '/Cache')); + self::assertTrue(is_dir(__DIR__ . '/Cache')); self::assertTrue($this->cache->flushAll()); self::assertEquals(50, $this->cache->getThreshold()); self::assertEquals('', $this->cache->getCache()); @@ -137,10 +137,10 @@ class FileCacheTest extends \PHPUnit\Framework\TestCase public function testExpiredExists() : void { $this->cache->set('key2', 'testVal2', 2); - \sleep(1); + sleep(1); self::assertTrue($this->cache->exists('key2')); self::assertFalse($this->cache->exists('key2', 0)); - \sleep(3); + sleep(3); self::assertFalse($this->cache->exists('key2')); } @@ -154,17 +154,17 @@ class FileCacheTest extends \PHPUnit\Framework\TestCase { $this->cache->set('key1', 'testVal1'); $this->cache->set('key2', 'testVal2'); - self::assertEquals([], \array_diff(['testVal1', 'testVal2'], $this->cache->getLike('key\d'))); + self::assertEquals([], array_diff(['testVal1', 'testVal2'], $this->cache->getLike('key\d'))); } public function testExpiredGetLike() : void { $this->cache->set('key1', 'testVal1', 2); $this->cache->set('key2', 'testVal2', 2); - \sleep(1); - self::assertEquals([], \array_diff(['testVal1', 'testVal2'], $this->cache->getLike('key\d'))); + sleep(1); + self::assertEquals([], array_diff(['testVal1', 'testVal2'], $this->cache->getLike('key\d'))); self::assertEquals([], $this->cache->getLike('key\d', 0)); - \sleep(3); + sleep(3); self::assertEquals([], $this->cache->getLike('key\d')); } @@ -218,7 +218,7 @@ class FileCacheTest extends \PHPUnit\Framework\TestCase $this->cache->set('key1', 'testVal1', 2); $this->cache->set('key2', 'testVal2', 2); - \sleep(1); + sleep(1); self::assertTrue($this->cache->deleteLike('key\d', 0)); self::assertEquals([], $this->cache->getLike('key\d')); @@ -234,8 +234,8 @@ class FileCacheTest extends \PHPUnit\Framework\TestCase { $this->cache->set('key2', 'testVal2', 1); self::assertEquals('testVal2', $this->cache->get('key2', 1)); - \sleep(2); - self::assertTrue($this->cache->updateExpire('key2', \time() + 10000)); + sleep(2); + self::assertTrue($this->cache->updateExpire('key2', time() + 10000)); self::assertEquals('testVal2', $this->cache->get('key2')); } @@ -363,7 +363,7 @@ class FileCacheTest extends \PHPUnit\Framework\TestCase { $this->cache->set('key2', 'testVal2', 1); self::assertEquals('testVal2', $this->cache->get('key2', 1)); - \sleep(2); + sleep(2); self::assertNull($this->cache->get('key2', 1)); self::assertNull($this->cache->get('key2')); // this causes a side effect of deleting the outdated cache element!!! } @@ -376,7 +376,7 @@ class FileCacheTest extends \PHPUnit\Framework\TestCase public function testForceExpiredInputOutput() : void { $this->cache->set('key2', 'testVal2', 1); - \sleep(2); + sleep(2); self::assertEquals('testVal2', $this->cache->get('key2', 10)); } @@ -399,7 +399,7 @@ class FileCacheTest extends \PHPUnit\Framework\TestCase public function testDeleteExpired() : void { $this->cache->set('key4', 'testVal4', 1); - \sleep(2); + sleep(2); self::assertTrue($this->cache->delete('key4', 1)); } @@ -411,7 +411,7 @@ class FileCacheTest extends \PHPUnit\Framework\TestCase public function testForceDeleteUnexpired() : void { $this->cache->set('key5', 'testVal5', 10000); - \sleep(2); + sleep(2); self::assertFalse($this->cache->delete('key5', 1000000)); self::assertTrue($this->cache->delete('key5', 1)); } @@ -424,7 +424,7 @@ class FileCacheTest extends \PHPUnit\Framework\TestCase public function testFlushExpired() : void { $this->cache->set('key6', 'testVal6', 1); - \sleep(2); + sleep(2); $this->cache->flush(0); self::assertNull($this->cache->get('key6', 0)); diff --git a/tests/DataStorage/Cache/Connection/MemCachedTest.php b/tests/DataStorage/Cache/Connection/MemCachedTest.php index 86ec16f3c..27ce5a943 100644 --- a/tests/DataStorage/Cache/Connection/MemCachedTest.php +++ b/tests/DataStorage/Cache/Connection/MemCachedTest.php @@ -137,10 +137,10 @@ class MemCachedTest extends \PHPUnit\Framework\TestCase public function testExpiredExists() : void { $this->cache->set('key2', 'testVal2', 2); - \sleep(1); + sleep(1); self::assertTrue($this->cache->exists('key2')); self::assertFalse($this->cache->exists('key2', 0)); - \sleep(3); + sleep(3); self::assertFalse($this->cache->exists('key2')); } @@ -161,10 +161,10 @@ class MemCachedTest extends \PHPUnit\Framework\TestCase { $this->cache->set('key1', 'testVal1', 2); $this->cache->set('key2', 'testVal2', 2); - \sleep(1); - self::assertEquals([], \array_diff(['testVal1', 'testVal2'], $this->cache->getLike('key\d'))); + sleep(1); + self::assertEquals([], array_diff(['testVal1', 'testVal2'], $this->cache->getLike('key\d'))); self::assertEquals([], $this->cache->getLike('key\d', 0)); - \sleep(3); + sleep(3); self::assertEquals([], $this->cache->getLike('key\d')); } @@ -223,8 +223,8 @@ class MemCachedTest extends \PHPUnit\Framework\TestCase { $this->cache->set('key2', 'testVal2', 1); self::assertEquals('testVal2', $this->cache->get('key2', 1)); - \sleep(2); - self::assertTrue($this->cache->updateExpire('key2', \time() + 10000)); + sleep(2); + self::assertTrue($this->cache->updateExpire('key2', time() + 10000)); self::assertEquals('testVal2', $this->cache->get('key2')); } @@ -351,7 +351,7 @@ class MemCachedTest extends \PHPUnit\Framework\TestCase { $this->cache->set('key2', 'testVal2', 1); self::assertEquals('testVal2', $this->cache->get('key2', 1)); - \sleep(2); + sleep(2); self::assertNull($this->cache->get('key2', 1)); } @@ -363,7 +363,7 @@ class MemCachedTest extends \PHPUnit\Framework\TestCase public function testFlushExpired() : void { $this->cache->set('key6', 'testVal6', 1); - \sleep(2); + sleep(2); $this->cache->flush(0); self::assertNull($this->cache->get('key6', 0)); diff --git a/tests/DataStorage/Cache/Connection/RedisCacheTest.php b/tests/DataStorage/Cache/Connection/RedisCacheTest.php index 753ddaa71..6c930c206 100644 --- a/tests/DataStorage/Cache/Connection/RedisCacheTest.php +++ b/tests/DataStorage/Cache/Connection/RedisCacheTest.php @@ -133,10 +133,10 @@ class RedisCacheTest extends \PHPUnit\Framework\TestCase public function testExpiredExists() : void { $this->cache->set('key2', 'testVal2', 2); - \sleep(1); + sleep(1); self::assertTrue($this->cache->exists('key2')); self::assertFalse($this->cache->exists('key2', 0)); - \sleep(3); + sleep(3); self::assertFalse($this->cache->exists('key2')); } @@ -161,10 +161,10 @@ class RedisCacheTest extends \PHPUnit\Framework\TestCase { $this->cache->set('key1', 'testVal1', 2); $this->cache->set('key2', 'testVal2', 2); - \sleep(1); - self::assertEquals([], \array_diff(['testVal1', 'testVal2'], $this->cache->getLike('key\d'))); + sleep(1); + self::assertEquals([], array_diff(['testVal1', 'testVal2'], $this->cache->getLike('key\d'))); self::assertEquals([], $this->cache->getLike('key\d', 0)); - \sleep(3); + sleep(3); self::assertEquals([], $this->cache->getLike('key\d')); } @@ -223,8 +223,8 @@ class RedisCacheTest extends \PHPUnit\Framework\TestCase { $this->cache->set('key2', 'testVal2', 1); self::assertEquals('testVal2', $this->cache->get('key2', 1)); - \sleep(2); - self::assertTrue($this->cache->updateExpire('key2', \time() + 10000)); + sleep(2); + self::assertTrue($this->cache->updateExpire('key2', time() + 10000)); self::assertEquals('testVal2', $this->cache->get('key2')); } @@ -341,7 +341,7 @@ class RedisCacheTest extends \PHPUnit\Framework\TestCase { $this->cache->set('key2', 'testVal2', 1); self::assertEquals('testVal2', $this->cache->get('key2', 1)); - \sleep(2); + sleep(2); self::assertNull($this->cache->get('key2', 1)); } diff --git a/tests/DataStorage/Database/Connection/SQLiteConnectionTest.php b/tests/DataStorage/Database/Connection/SQLiteConnectionTest.php index 0b9fb1b21..d24970fe5 100644 --- a/tests/DataStorage/Database/Connection/SQLiteConnectionTest.php +++ b/tests/DataStorage/Database/Connection/SQLiteConnectionTest.php @@ -93,8 +93,8 @@ class SQLiteConnectionTest extends \PHPUnit\Framework\TestCase public static function tearDownAfterClass() : void { - if (\is_file($GLOBALS['CONFIG']['db']['core']['sqlite']['admin']['database'])) { - \unlink($GLOBALS['CONFIG']['db']['core']['sqlite']['admin']['database']); + if (is_file($GLOBALS['CONFIG']['db']['core']['sqlite']['admin']['database'])) { + unlink($GLOBALS['CONFIG']['db']['core']['sqlite']['admin']['database']); } } } diff --git a/tests/DataStorage/Database/DataMapperAbstractTest.php b/tests/DataStorage/Database/DataMapperAbstractTest.php index ae6b91c82..2a3024576 100644 --- a/tests/DataStorage/Database/DataMapperAbstractTest.php +++ b/tests/DataStorage/Database/DataMapperAbstractTest.php @@ -267,8 +267,8 @@ class DataMapperAbstractTest extends \PHPUnit\Framework\TestCase self::assertCount(2, $modelR->hasManyDirect); self::assertCount(2, $modelR->hasManyRelations); - self::assertEquals(\reset($this->model->hasManyDirect)->string, \reset($modelR->hasManyDirect)->string); - self::assertEquals(\reset($this->model->hasManyRelations)->string, \reset($modelR->hasManyRelations)->string); + self::assertEquals(reset($this->model->hasManyDirect)->string, reset($modelR->hasManyDirect)->string); + self::assertEquals(reset($this->model->hasManyRelations)->string, reset($modelR->hasManyRelations)->string); self::assertEquals($this->model->ownsOneSelf->string, $modelR->ownsOneSelf->string); self::assertEquals($this->model->belongsToOne->string, $modelR->belongsToOne->string); } @@ -285,7 +285,7 @@ class DataMapperAbstractTest extends \PHPUnit\Framework\TestCase $for = ManyToManyDirectModelMapper::getFor($id, 'to'); self::assertEquals( - \reset($this->model->hasManyDirect)->string, + reset($this->model->hasManyDirect)->string, $for[1]->string ); } @@ -319,13 +319,13 @@ class DataMapperAbstractTest extends \PHPUnit\Framework\TestCase $model1 = new BaseModel(); $model1->datetime = new \DateTime('now'); $id1 = BaseModelMapper::create($model1); - \sleep(1); + sleep(1); $model2 = new BaseModel(); $model2->datetime = new \DateTime('now'); $id2 = BaseModelMapper::create($model2); $newest = BaseModelMapper::getNewest(); - self::assertEquals($id2, \reset($newest)->getId()); + self::assertEquals($id2, reset($newest)->getId()); } public function testGetNullModel() : void @@ -353,8 +353,8 @@ class DataMapperAbstractTest extends \PHPUnit\Framework\TestCase $found = BaseModelMapper::find('sir'); self::assertCount(2, $found); - self::assertEquals($model2->string, \reset($found)->string); - self::assertEquals($model3->string, \end($found)->string); + self::assertEquals($model2->string, reset($found)->string); + self::assertEquals($model3->string, end($found)->string); } /** @@ -395,10 +395,10 @@ class DataMapperAbstractTest extends \PHPUnit\Framework\TestCase $found = BaseModelMapper::with('language', 'de')::getAll(); self::assertCount(2, $found); - self::assertEquals($model1->string, \reset($found)->string); - self::assertEquals($model2->string, \end($found)->string); - self::assertEquals('cond1_de', \reset($found)->conditional); - self::assertEquals('cond2_de', \end($found)->conditional); + self::assertEquals($model1->string, reset($found)->string); + self::assertEquals($model2->string, end($found)->string); + self::assertEquals('cond1_de', reset($found)->conditional); + self::assertEquals('cond2_de', end($found)->conditional); } /** @@ -422,15 +422,15 @@ class DataMapperAbstractTest extends \PHPUnit\Framework\TestCase self::assertCount(2, $modelR['hasManyDirect']); self::assertCount(2, $modelR['hasManyRelations']); - self::assertEquals(\reset($this->modelArray['hasManyDirect'])['string'], \reset($modelR['hasManyDirect'])['string']); - self::assertEquals(\reset($this->modelArray['hasManyRelations'])['string'], \reset($modelR['hasManyRelations'])['string']); + self::assertEquals(reset($this->modelArray['hasManyDirect'])['string'], reset($modelR['hasManyDirect'])['string']); + self::assertEquals(reset($this->modelArray['hasManyRelations'])['string'], reset($modelR['hasManyRelations'])['string']); self::assertEquals($this->modelArray['ownsOneSelf']['string'], $modelR['ownsOneSelf']['string']); self::assertEquals($this->modelArray['belongsToOne']['string'], $modelR['belongsToOne']['string']); $for = ManyToManyDirectModelMapper::getForArray($id, 'to'); self::assertEquals( - \reset($this->modelArray['hasManyDirect'])['string'], - \reset($for)['string'] + reset($this->modelArray['hasManyDirect'])['string'], + reset($for)['string'] ); self::assertCount(1, BaseModelMapper::getAllArray()); @@ -532,7 +532,7 @@ class DataMapperAbstractTest extends \PHPUnit\Framework\TestCase $count1 = \count($this->model->hasManyRelations); - BaseModelMapper::deleteRelation('hasManyRelations', $id1, \reset($this->model->hasManyRelations)->id); + BaseModelMapper::deleteRelation('hasManyRelations', $id1, reset($this->model->hasManyRelations)->id); BaseModelMapper::clearCache(); $base = BaseModelMapper::get($id1); diff --git a/tests/DataStorage/Database/DatabaseStatusTest.php b/tests/DataStorage/Database/DatabaseStatusTest.php index 05531aadc..ccb0dc610 100644 --- a/tests/DataStorage/Database/DatabaseStatusTest.php +++ b/tests/DataStorage/Database/DatabaseStatusTest.php @@ -36,7 +36,7 @@ class DatabaseStatusTest extends \PHPUnit\Framework\TestCase */ public function testUnique() : void { - self::assertEquals(DatabaseStatus::getConstants(), \array_unique(DatabaseStatus::getConstants())); + self::assertEquals(DatabaseStatus::getConstants(), array_unique(DatabaseStatus::getConstants())); } /** diff --git a/tests/DataStorage/Database/DatabaseTypeTest.php b/tests/DataStorage/Database/DatabaseTypeTest.php index dcf1d697b..4005e3405 100644 --- a/tests/DataStorage/Database/DatabaseTypeTest.php +++ b/tests/DataStorage/Database/DatabaseTypeTest.php @@ -36,7 +36,7 @@ class DatabaseTypeTest extends \PHPUnit\Framework\TestCase */ public function testUnique() : void { - self::assertEquals(DatabaseType::getConstants(), \array_unique(DatabaseType::getConstants())); + self::assertEquals(DatabaseType::getConstants(), array_unique(DatabaseType::getConstants())); } /** diff --git a/tests/DataStorage/Database/Query/JoinTypeTest.php b/tests/DataStorage/Database/Query/JoinTypeTest.php index 3749f6596..1d3ad20be 100644 --- a/tests/DataStorage/Database/Query/JoinTypeTest.php +++ b/tests/DataStorage/Database/Query/JoinTypeTest.php @@ -36,7 +36,7 @@ class JoinTypeTest extends \PHPUnit\Framework\TestCase */ public function testUnique() : void { - self::assertEquals(JoinType::getConstants(), \array_unique(JoinType::getConstants())); + self::assertEquals(JoinType::getConstants(), array_unique(JoinType::getConstants())); } /** diff --git a/tests/DataStorage/Database/Query/QueryTypeTest.php b/tests/DataStorage/Database/Query/QueryTypeTest.php index f616d77ed..4f113fab3 100644 --- a/tests/DataStorage/Database/Query/QueryTypeTest.php +++ b/tests/DataStorage/Database/Query/QueryTypeTest.php @@ -36,7 +36,7 @@ class QueryTypeTest extends \PHPUnit\Framework\TestCase */ public function testUnique() : void { - self::assertEquals(QueryType::getConstants(), \array_unique(QueryType::getConstants())); + self::assertEquals(QueryType::getConstants(), array_unique(QueryType::getConstants())); } /** diff --git a/tests/DataStorage/Database/RelationTypeTest.php b/tests/DataStorage/Database/RelationTypeTest.php index e752aa573..c0bf69aee 100644 --- a/tests/DataStorage/Database/RelationTypeTest.php +++ b/tests/DataStorage/Database/RelationTypeTest.php @@ -36,7 +36,7 @@ class RelationTypeTest extends \PHPUnit\Framework\TestCase */ public function testUnique() : void { - self::assertEquals(RelationType::getConstants(), \array_unique(RelationType::getConstants())); + self::assertEquals(RelationType::getConstants(), array_unique(RelationType::getConstants())); } /** diff --git a/tests/DataStorage/Database/Schema/Grammar/MysqlGrammarTest.php b/tests/DataStorage/Database/Schema/Grammar/MysqlGrammarTest.php index 5b11db7ea..e2ef012f6 100644 --- a/tests/DataStorage/Database/Schema/Grammar/MysqlGrammarTest.php +++ b/tests/DataStorage/Database/Schema/Grammar/MysqlGrammarTest.php @@ -57,7 +57,7 @@ class MysqlGrammarTest extends \PHPUnit\Framework\TestCase */ public function testSchemaInputOutput() : void { - $definitions = \json_decode(\file_get_contents(__DIR__ . '/testSchema.json'), true); + $definitions = json_decode(file_get_contents(__DIR__ . '/testSchema.json'), true); foreach ($definitions as $definition) { Builder::createFromSchema($definition, $this->con)->execute(); } @@ -90,7 +90,7 @@ class MysqlGrammarTest extends \PHPUnit\Framework\TestCase */ public function testDelete() : void { - $definitions = \json_decode(\file_get_contents(__DIR__ . '/testSchema.json'), true); + $definitions = json_decode(file_get_contents(__DIR__ . '/testSchema.json'), true); foreach ($definitions as $definition) { Builder::createFromSchema($definition, $this->con)->execute(); } diff --git a/tests/DataStorage/Database/Schema/QueryTypeTest.php b/tests/DataStorage/Database/Schema/QueryTypeTest.php index 4b58ee399..50a4a0125 100644 --- a/tests/DataStorage/Database/Schema/QueryTypeTest.php +++ b/tests/DataStorage/Database/Schema/QueryTypeTest.php @@ -36,7 +36,7 @@ class QueryTypeTest extends \PHPUnit\Framework\TestCase */ public function testUnique() : void { - self::assertEquals(QueryType::getConstants(), \array_unique(QueryType::getConstants())); + self::assertEquals(QueryType::getConstants(), array_unique(QueryType::getConstants())); } /** diff --git a/tests/DataStorage/Session/FileSessionHandlerTest.php b/tests/DataStorage/Session/FileSessionHandlerTest.php index 27067a7be..eceecd139 100644 --- a/tests/DataStorage/Session/FileSessionHandlerTest.php +++ b/tests/DataStorage/Session/FileSessionHandlerTest.php @@ -31,7 +31,7 @@ class FileSessionHandlerTest extends \PHPUnit\Framework\TestCase */ protected function setUp() : void { - if (\is_dir(__DIR__ . '/test')) { + if (is_dir(__DIR__ . '/test')) { Directory::delete(__DIR__ . '/test'); } @@ -40,7 +40,7 @@ class FileSessionHandlerTest extends \PHPUnit\Framework\TestCase protected function tearDown() : void { - if (\is_dir(__DIR__ . '/test')) { + if (is_dir(__DIR__ . '/test')) { Directory::delete(__DIR__ . '/test'); } } @@ -125,7 +125,7 @@ class FileSessionHandlerTest extends \PHPUnit\Framework\TestCase self::assertTrue($this->sh->write($id, 'test')); self::assertEquals('test', $this->sh->read($id)); - \sleep(2); + sleep(2); $this->sh->gc(0); self::assertEquals('', $this->sh->read($id)); diff --git a/tests/Localization/Defaults/CityMapperTest.php b/tests/Localization/Defaults/CityMapperTest.php index 613e9aa8b..f2525beb8 100644 --- a/tests/Localization/Defaults/CityMapperTest.php +++ b/tests/Localization/Defaults/CityMapperTest.php @@ -32,7 +32,7 @@ class CityMapperTest extends \PHPUnit\Framework\TestCase $con = new SqliteConnection([ 'prefix' => '', 'db' => 'sqlite', - 'database' => \realpath(__DIR__ . '/../../../Localization/Defaults/localization.sqlite'), + 'database' => realpath(__DIR__ . '/../../../Localization/Defaults/localization.sqlite'), ]); DataMapperAbstract::setConnection($con); diff --git a/tests/Localization/Defaults/CountryMapperTest.php b/tests/Localization/Defaults/CountryMapperTest.php index c8d18fa61..5a690cc25 100644 --- a/tests/Localization/Defaults/CountryMapperTest.php +++ b/tests/Localization/Defaults/CountryMapperTest.php @@ -32,7 +32,7 @@ class CountryMapperTest extends \PHPUnit\Framework\TestCase $con = new SqliteConnection([ 'prefix' => '', 'db' => 'sqlite', - 'database' => \realpath(__DIR__ . '/../../../Localization/Defaults/localization.sqlite'), + 'database' => realpath(__DIR__ . '/../../../Localization/Defaults/localization.sqlite'), ]); DataMapperAbstract::setConnection($con); diff --git a/tests/Localization/Defaults/CurrencyMapperTest.php b/tests/Localization/Defaults/CurrencyMapperTest.php index 121b2afa5..f401f6f10 100644 --- a/tests/Localization/Defaults/CurrencyMapperTest.php +++ b/tests/Localization/Defaults/CurrencyMapperTest.php @@ -32,7 +32,7 @@ class CurrencyMapperTest extends \PHPUnit\Framework\TestCase $con = new SqliteConnection([ 'prefix' => '', 'db' => 'sqlite', - 'database' => \realpath(__DIR__ . '/../../../Localization/Defaults/localization.sqlite'), + 'database' => realpath(__DIR__ . '/../../../Localization/Defaults/localization.sqlite'), ]); DataMapperAbstract::setConnection($con); diff --git a/tests/Localization/Defaults/IbanMapperTest.php b/tests/Localization/Defaults/IbanMapperTest.php index 683e70e51..5593cc12e 100644 --- a/tests/Localization/Defaults/IbanMapperTest.php +++ b/tests/Localization/Defaults/IbanMapperTest.php @@ -32,7 +32,7 @@ class IbanMapperTest extends \PHPUnit\Framework\TestCase $con = new SqliteConnection([ 'prefix' => '', 'db' => 'sqlite', - 'database' => \realpath(__DIR__ . '/../../../Localization/Defaults/localization.sqlite'), + 'database' => realpath(__DIR__ . '/../../../Localization/Defaults/localization.sqlite'), ]); DataMapperAbstract::setConnection($con); diff --git a/tests/Localization/Defaults/LanguageMapperTest.php b/tests/Localization/Defaults/LanguageMapperTest.php index b7175d340..7eb6c53f8 100644 --- a/tests/Localization/Defaults/LanguageMapperTest.php +++ b/tests/Localization/Defaults/LanguageMapperTest.php @@ -32,7 +32,7 @@ class LanguageMapperTest extends \PHPUnit\Framework\TestCase $con = new SqliteConnection([ 'prefix' => '', 'db' => 'sqlite', - 'database' => \realpath(__DIR__ . '/../../../Localization/Defaults/localization.sqlite'), + 'database' => realpath(__DIR__ . '/../../../Localization/Defaults/localization.sqlite'), ]); DataMapperAbstract::setConnection($con); diff --git a/tests/Localization/ISO3166CharEnumTest.php b/tests/Localization/ISO3166CharEnumTest.php index 90921c872..b2cdda95e 100644 --- a/tests/Localization/ISO3166CharEnumTest.php +++ b/tests/Localization/ISO3166CharEnumTest.php @@ -41,6 +41,6 @@ class ISO3166CharEnumTest extends \PHPUnit\Framework\TestCase } self::assertTrue($ok); - self::assertEquals(\count($enum), \count(\array_unique($enum))); + self::assertEquals(\count($enum), \count(array_unique($enum))); } } diff --git a/tests/Localization/ISO3166NameEnumTest.php b/tests/Localization/ISO3166NameEnumTest.php index f837d8adc..16f05e4d2 100644 --- a/tests/Localization/ISO3166NameEnumTest.php +++ b/tests/Localization/ISO3166NameEnumTest.php @@ -30,6 +30,6 @@ class ISO3166NameEnumTest extends \PHPUnit\Framework\TestCase public function testEnums() : void { $enum = ISO3166NameEnum::getConstants(); - self::assertEquals(\count($enum), \count(\array_unique($enum))); + self::assertEquals(\count($enum), \count(array_unique($enum))); } } diff --git a/tests/Localization/ISO3166NumEnumTest.php b/tests/Localization/ISO3166NumEnumTest.php index 8532a8eaf..90d350f88 100644 --- a/tests/Localization/ISO3166NumEnumTest.php +++ b/tests/Localization/ISO3166NumEnumTest.php @@ -41,6 +41,6 @@ class ISO3166NumEnumTest extends \PHPUnit\Framework\TestCase } self::assertTrue($ok); - self::assertEquals(\count($enum), \count(\array_unique($enum))); + self::assertEquals(\count($enum), \count(array_unique($enum))); } } diff --git a/tests/Localization/ISO3166TwoEnumTest.php b/tests/Localization/ISO3166TwoEnumTest.php index 4579cc48f..bd9b96d12 100644 --- a/tests/Localization/ISO3166TwoEnumTest.php +++ b/tests/Localization/ISO3166TwoEnumTest.php @@ -41,6 +41,6 @@ class ISO3166TwoEnumTest extends \PHPUnit\Framework\TestCase } self::assertTrue($ok); - self::assertEquals(\count($countryCodes), \count(\array_unique($countryCodes))); + self::assertEquals(\count($countryCodes), \count(array_unique($countryCodes))); } } diff --git a/tests/Localization/ISO4217CharEnumTest.php b/tests/Localization/ISO4217CharEnumTest.php index 161df983d..9349a8851 100644 --- a/tests/Localization/ISO4217CharEnumTest.php +++ b/tests/Localization/ISO4217CharEnumTest.php @@ -41,6 +41,6 @@ class ISO4217CharEnumTest extends \PHPUnit\Framework\TestCase } self::assertTrue($ok); - self::assertEquals(\count($enum), \count(\array_unique($enum))); + self::assertEquals(\count($enum), \count(array_unique($enum))); } } diff --git a/tests/Localization/ISO4217EnumTest.php b/tests/Localization/ISO4217EnumTest.php index b21225ddb..929de0386 100644 --- a/tests/Localization/ISO4217EnumTest.php +++ b/tests/Localization/ISO4217EnumTest.php @@ -30,6 +30,6 @@ class ISO4217EnumTest extends \PHPUnit\Framework\TestCase public function testEnums() : void { $enum = ISO4217Enum::getConstants(); - self::assertEquals(\count($enum), \count(\array_unique($enum))); + self::assertEquals(\count($enum), \count(array_unique($enum))); } } diff --git a/tests/Localization/ISO4217NumEnumTest.php b/tests/Localization/ISO4217NumEnumTest.php index 0d3002d67..b9cb4cca4 100644 --- a/tests/Localization/ISO4217NumEnumTest.php +++ b/tests/Localization/ISO4217NumEnumTest.php @@ -41,6 +41,6 @@ class ISO4217NumEnumTest extends \PHPUnit\Framework\TestCase } self::assertTrue($ok); - self::assertEquals(\count($enum), \count(\array_unique($enum))); + self::assertEquals(\count($enum), \count(array_unique($enum))); } } diff --git a/tests/Localization/ISO639EnumTest.php b/tests/Localization/ISO639EnumTest.php index c97a65b26..ee7e1e3de 100644 --- a/tests/Localization/ISO639EnumTest.php +++ b/tests/Localization/ISO639EnumTest.php @@ -30,6 +30,6 @@ class ISO639EnumTest extends \PHPUnit\Framework\TestCase public function testEnums() : void { $enum = ISO639Enum::getConstants(); - self::assertEquals(\count($enum), \count(\array_unique($enum))); + self::assertEquals(\count($enum), \count(array_unique($enum))); } } diff --git a/tests/Localization/ISO639x1EnumTest.php b/tests/Localization/ISO639x1EnumTest.php index 9d64b4c12..043af2744 100644 --- a/tests/Localization/ISO639x1EnumTest.php +++ b/tests/Localization/ISO639x1EnumTest.php @@ -41,6 +41,6 @@ class ISO639x1EnumTest extends \PHPUnit\Framework\TestCase } self::assertTrue($ok); - self::assertEquals(\count($enum), \count(\array_unique($enum))); + self::assertEquals(\count($enum), \count(array_unique($enum))); } } diff --git a/tests/Localization/ISO639x2EnumTest.php b/tests/Localization/ISO639x2EnumTest.php index 938152298..a344f5fab 100644 --- a/tests/Localization/ISO639x2EnumTest.php +++ b/tests/Localization/ISO639x2EnumTest.php @@ -41,6 +41,6 @@ class ISO639x2EnumTest extends \PHPUnit\Framework\TestCase } self::assertTrue($ok); - self::assertEquals(\count($enum), \count(\array_unique($enum))); + self::assertEquals(\count($enum), \count(array_unique($enum))); } } diff --git a/tests/Localization/TimeZoneEnumArrayTest.php b/tests/Localization/TimeZoneEnumArrayTest.php index f1814eb7e..6b13608fe 100644 --- a/tests/Localization/TimeZoneEnumArrayTest.php +++ b/tests/Localization/TimeZoneEnumArrayTest.php @@ -29,6 +29,6 @@ class TimeZoneEnumArrayTest extends \PHPUnit\Framework\TestCase */ public function testEnums() : void { - self::assertEquals(\count(TimeZoneEnumArray::getConstants()), \count(\array_unique(TimeZoneEnumArray::getConstants()))); + self::assertEquals(\count(TimeZoneEnumArray::getConstants()), \count(array_unique(TimeZoneEnumArray::getConstants()))); } } diff --git a/tests/Log/FileLoggerTest.php b/tests/Log/FileLoggerTest.php index 3f7b622df..ec950cc65 100644 --- a/tests/Log/FileLoggerTest.php +++ b/tests/Log/FileLoggerTest.php @@ -34,12 +34,12 @@ class FileLoggerTest extends \PHPUnit\Framework\TestCase */ protected function setUp() : void { - if (\is_file(__DIR__ . '/' . \date('Y-m-d') . '.log')) { - \unlink(__DIR__ . '/' . \date('Y-m-d') . '.log'); + if (is_file(__DIR__ . '/' . date('Y-m-d') . '.log')) { + unlink(__DIR__ . '/' . date('Y-m-d') . '.log'); } - if (\is_file(__DIR__ . '/test.log')) { - \unlink(__DIR__ . '/test.log'); + if (is_file(__DIR__ . '/test.log')) { + unlink(__DIR__ . '/test.log'); } $this->log = new FileLogger(__DIR__ . '/test.log', false); @@ -47,12 +47,12 @@ class FileLoggerTest extends \PHPUnit\Framework\TestCase protected function tearDown() : void { - if (\is_file(__DIR__ . '/' . \date('Y-m-d') . '.log')) { - \unlink(__DIR__ . '/' . \date('Y-m-d') . '.log'); + if (is_file(__DIR__ . '/' . date('Y-m-d') . '.log')) { + unlink(__DIR__ . '/' . date('Y-m-d') . '.log'); } - if (\is_file(__DIR__ . '/test.log')) { - \unlink(__DIR__ . '/test.log'); + if (is_file(__DIR__ . '/test.log')) { + unlink(__DIR__ . '/test.log'); } } @@ -87,8 +87,8 @@ class FileLoggerTest extends \PHPUnit\Framework\TestCase */ public function testFileLoggerInstance() : void { - if (\is_file(__DIR__ . '/named.log')) { - \unlink(__DIR__ . '/named.log'); + if (is_file(__DIR__ . '/named.log')) { + unlink(__DIR__ . '/named.log'); } $instance = FileLogger::getInstance(__DIR__ . '/named.log', false); @@ -99,8 +99,8 @@ class FileLoggerTest extends \PHPUnit\Framework\TestCase TestUtils::setMember($instance, 'instance', $instance); - if (\is_file(__DIR__ . '/named.log')) { - \unlink(__DIR__ . '/named.log'); + if (is_file(__DIR__ . '/named.log')) { + unlink(__DIR__ . '/named.log'); } } @@ -111,17 +111,17 @@ class FileLoggerTest extends \PHPUnit\Framework\TestCase */ public function testNamedLogFile() : void { - if (\is_file(__DIR__ . '/named.log')) { - \unlink(__DIR__ . '/named.log'); + if (is_file(__DIR__ . '/named.log')) { + unlink(__DIR__ . '/named.log'); } $log = new FileLogger(__DIR__ . '/named.log', false); $log->info('something'); - self::assertTrue(\is_file(__DIR__ . '/named.log')); + self::assertTrue(is_file(__DIR__ . '/named.log')); - if (\is_file(__DIR__ . '/named.log')) { - \unlink(__DIR__ . '/named.log'); + if (is_file(__DIR__ . '/named.log')) { + unlink(__DIR__ . '/named.log'); } } @@ -135,7 +135,7 @@ class FileLoggerTest extends \PHPUnit\Framework\TestCase $log = new FileLogger(__DIR__, false); $log->info('something'); - self::assertTrue(\is_file(__DIR__ . '/' . \date('Y-m-d') . '.log')); + self::assertTrue(is_file(__DIR__ . '/' . date('Y-m-d') . '.log')); } /** @@ -147,7 +147,7 @@ class FileLoggerTest extends \PHPUnit\Framework\TestCase { $log = new FileLogger(__DIR__, false); - self::assertFalse(\is_file(__DIR__ . '/' . \date('Y-m-d') . '.log')); + self::assertFalse(is_file(__DIR__ . '/' . date('Y-m-d') . '.log')); } /** @@ -217,18 +217,18 @@ class FileLoggerTest extends \PHPUnit\Framework\TestCase 'file' => self::class, ]); - $logContent = \file_get_contents(__DIR__ . '/test.log'); + $logContent = file_get_contents(__DIR__ . '/test.log'); - self::assertTrue(\stripos($logContent, 'emergency1') !== false); - self::assertTrue(\stripos($logContent, 'alert2') !== false); - self::assertTrue(\stripos($logContent, 'critical3') !== false); - self::assertTrue(\stripos($logContent, 'error4') !== false); - self::assertTrue(\stripos($logContent, 'warning5') !== false); - self::assertTrue(\stripos($logContent, 'notice6') !== false); - self::assertTrue(\stripos($logContent, 'info7') !== false); - self::assertTrue(\stripos($logContent, 'debug8') !== false); - self::assertTrue(\stripos($logContent, 'log9') !== false); - self::assertTrue(\stripos($logContent, 'console10') !== false); + self::assertTrue(stripos($logContent, 'emergency1') !== false); + self::assertTrue(stripos($logContent, 'alert2') !== false); + self::assertTrue(stripos($logContent, 'critical3') !== false); + self::assertTrue(stripos($logContent, 'error4') !== false); + self::assertTrue(stripos($logContent, 'warning5') !== false); + self::assertTrue(stripos($logContent, 'notice6') !== false); + self::assertTrue(stripos($logContent, 'info7') !== false); + self::assertTrue(stripos($logContent, 'debug8') !== false); + self::assertTrue(stripos($logContent, 'log9') !== false); + self::assertTrue(stripos($logContent, 'console10') !== false); self::assertEquals(1, $this->log->countLogs()['emergency'] ?? 0); self::assertEquals(1, $this->log->countLogs()['alert'] ?? 0); @@ -353,10 +353,10 @@ class FileLoggerTest extends \PHPUnit\Framework\TestCase { $this->log = new FileLogger(__DIR__, true); - \ob_start(); + ob_start(); $this->log->info('my log message'); - $ob = \ob_get_clean(); - \ob_clean(); + $ob = ob_get_clean(); + ob_clean(); self::assertEquals('my log message' . "\n", $ob); } @@ -370,12 +370,12 @@ class FileLoggerTest extends \PHPUnit\Framework\TestCase { $this->log = new FileLogger(__DIR__, false); - \ob_start(); + ob_start(); $this->log->console('my log message', true); - $ob = \ob_get_clean(); - \ob_clean(); + $ob = ob_get_clean(); + ob_clean(); - self::assertTrue(\stripos($ob, 'my log message') !== false); + self::assertTrue(stripos($ob, 'my log message') !== false); } /** diff --git a/tests/Log/LogLevelTest.php b/tests/Log/LogLevelTest.php index 4d19f1ea0..e59993d5a 100644 --- a/tests/Log/LogLevelTest.php +++ b/tests/Log/LogLevelTest.php @@ -38,7 +38,7 @@ class LogLevelTest extends \PHPUnit\Framework\TestCase */ public function testUnique() : void { - self::assertEquals(LogLevel::getConstants(), \array_unique(LogLevel::getConstants())); + self::assertEquals(LogLevel::getConstants(), array_unique(LogLevel::getConstants())); } /** diff --git a/tests/Math/Functions/BetaTest.php b/tests/Math/Functions/BetaTest.php index 54c67c9ea..7303e8794 100644 --- a/tests/Math/Functions/BetaTest.php +++ b/tests/Math/Functions/BetaTest.php @@ -43,8 +43,8 @@ class BetaTest extends \PHPUnit\Framework\TestCase public function testLogBeta() : void { self::assertEqualsWithDelta(0, Beta::logBeta(1, 0), 0.001); - self::assertEqualsWithDelta(\log(4.4776093), Beta::logBeta(1.5, 0.2), 0.001); - self::assertEqualsWithDelta(\log(Beta::beta(2, 4)), Beta::logBeta(2, 4), 0.001); + self::assertEqualsWithDelta(log(4.4776093), Beta::logBeta(1.5, 0.2), 0.001); + self::assertEqualsWithDelta(log(Beta::beta(2, 4)), Beta::logBeta(2, 4), 0.001); } /** diff --git a/tests/Math/Functions/GammaTest.php b/tests/Math/Functions/GammaTest.php index 3127d4247..d955c8a17 100644 --- a/tests/Math/Functions/GammaTest.php +++ b/tests/Math/Functions/GammaTest.php @@ -57,7 +57,7 @@ class GammaTest extends \PHPUnit\Framework\TestCase ]; for ($i = 1; $i <= 10; ++$i) { - if (!(\abs($spouge[$i - 1] - Gamma::spougeApproximation($i / 3)) < 0.01)) { + if (!(abs($spouge[$i - 1] - Gamma::spougeApproximation($i / 3)) < 0.01)) { self::assertTrue(false); } } @@ -77,7 +77,7 @@ class GammaTest extends \PHPUnit\Framework\TestCase ]; for ($i = 1; $i <= 10; ++$i) { - if (!(\abs($stirling[$i - 1] - Gamma::stirlingApproximation($i / 3)) < 0.01)) { + if (!(abs($stirling[$i - 1] - Gamma::stirlingApproximation($i / 3)) < 0.01)) { self::assertTrue(false); } } @@ -97,7 +97,7 @@ class GammaTest extends \PHPUnit\Framework\TestCase ]; for ($i = 1; $i <= 10; ++$i) { - if (!(\abs($gsl[$i - 1] - Gamma::lanczosApproximationReal($i / 3)) < 0.01)) { + if (!(abs($gsl[$i - 1] - Gamma::lanczosApproximationReal($i / 3)) < 0.01)) { self::assertTrue(false); } } @@ -117,7 +117,7 @@ class GammaTest extends \PHPUnit\Framework\TestCase ]; for ($i = 1; $i <= 10; ++$i) { - if (!(\abs($gsl[$i - 1] - Gamma::logGamma($i)) < 0.01)) { + if (!(abs($gsl[$i - 1] - Gamma::logGamma($i)) < 0.01)) { self::assertTrue(false); } } diff --git a/tests/Math/Matrix/EigenvalueDecompositionTest.php b/tests/Math/Matrix/EigenvalueDecompositionTest.php index f9636439e..91ae49d1d 100644 --- a/tests/Math/Matrix/EigenvalueDecompositionTest.php +++ b/tests/Math/Matrix/EigenvalueDecompositionTest.php @@ -91,9 +91,9 @@ class EigenvalueDecompositionTest extends \PHPUnit\Framework\TestCase $eig = new EigenvalueDecomposition($A); self::assertEqualsWithDelta([ - [0, 2 / \sqrt(6), 1 / \sqrt(3)], - [1 / \sqrt(2), -1 / \sqrt(6), 1 / \sqrt(3)], - [-1 / \sqrt(2), -1 / \sqrt(6), 1 / \sqrt(3)], + [0, 2 / sqrt(6), 1 / sqrt(3)], + [1 / sqrt(2), -1 / sqrt(6), 1 / sqrt(3)], + [-1 / sqrt(2), -1 / sqrt(6), 1 / sqrt(3)], ], $eig->getV()->toArray(), 0.2); } @@ -157,9 +157,9 @@ class EigenvalueDecompositionTest extends \PHPUnit\Framework\TestCase $eig = new EigenvalueDecomposition($A); self::assertEqualsWithDelta([ - [-\sqrt(2 / 3), \sqrt(2 / 7), -1 / \sqrt(293)], - [-1 / \sqrt(6), -3 / \sqrt(14), -6 / \sqrt(293)], - [1 / \sqrt(6), -1 / \sqrt(14), -16 / \sqrt(293)], + [-sqrt(2 / 3), sqrt(2 / 7), -1 / sqrt(293)], + [-1 / sqrt(6), -3 / sqrt(14), -6 / sqrt(293)], + [1 / sqrt(6), -1 / sqrt(14), -16 / sqrt(293)], ], $eig->getV()->toArray(), 0.2); } diff --git a/tests/Math/Number/NumberTypeTest.php b/tests/Math/Number/NumberTypeTest.php index 80c9da675..fb6569bd6 100644 --- a/tests/Math/Number/NumberTypeTest.php +++ b/tests/Math/Number/NumberTypeTest.php @@ -36,7 +36,7 @@ class NumberTypeTest extends \PHPUnit\Framework\TestCase */ public function testUnique() : void { - self::assertEquals(NumberType::getConstants(), \array_unique(NumberType::getConstants())); + self::assertEquals(NumberType::getConstants(), array_unique(NumberType::getConstants())); } /** diff --git a/tests/Math/Stochastic/Distribution/BernoulliDistributionTest.php b/tests/Math/Stochastic/Distribution/BernoulliDistributionTest.php index 694f9ea7e..18aa4cb7f 100644 --- a/tests/Math/Stochastic/Distribution/BernoulliDistributionTest.php +++ b/tests/Math/Stochastic/Distribution/BernoulliDistributionTest.php @@ -94,7 +94,7 @@ class BernoulliDistributionTest extends \PHPUnit\Framework\TestCase $p = 0.3; $q = 1 - $p; - self::assertEqualsWithDelta(\sqrt($p * $q), BernoulliDistribution::getStandardDeviation($p), 0.01); + self::assertEqualsWithDelta(sqrt($p * $q), BernoulliDistribution::getStandardDeviation($p), 0.01); } /** @@ -106,7 +106,7 @@ class BernoulliDistributionTest extends \PHPUnit\Framework\TestCase $p = 0.3; $q = 1 - $p; - self::assertEqualsWithDelta((1 - 2 * $p) / \sqrt($p * $q), BernoulliDistribution::getSkewness($p), 0.01); + self::assertEqualsWithDelta((1 - 2 * $p) / sqrt($p * $q), BernoulliDistribution::getSkewness($p), 0.01); } /** @@ -130,7 +130,7 @@ class BernoulliDistributionTest extends \PHPUnit\Framework\TestCase $p = 0.3; $q = 1 - $p; - self::assertEqualsWithDelta(-$q * \log($q) - $p * \log($p), BernoulliDistribution::getEntropy($p), 0.01); + self::assertEqualsWithDelta(-$q * log($q) - $p * log($p), BernoulliDistribution::getEntropy($p), 0.01); } /** @@ -143,7 +143,7 @@ class BernoulliDistributionTest extends \PHPUnit\Framework\TestCase $q = 1 - $p; $t = 2; - self::assertEqualsWithDelta($q + $p * \exp($t), BernoulliDistribution::getMgf($p, $t), 0.01); + self::assertEqualsWithDelta($q + $p * exp($t), BernoulliDistribution::getMgf($p, $t), 0.01); } /** diff --git a/tests/Math/Stochastic/Distribution/BetaDistributionTest.php b/tests/Math/Stochastic/Distribution/BetaDistributionTest.php index 39c608192..be90276cd 100644 --- a/tests/Math/Stochastic/Distribution/BetaDistributionTest.php +++ b/tests/Math/Stochastic/Distribution/BetaDistributionTest.php @@ -57,7 +57,7 @@ class BetaDistributionTest extends \PHPUnit\Framework\TestCase */ public function testStandardDeviation() : void { - self::assertEqualsWithDelta(\sqrt(1 / 20), BetaDistribution::getStandardDeviation(2.0, 2.0), 0.001); + self::assertEqualsWithDelta(sqrt(1 / 20), BetaDistribution::getStandardDeviation(2.0, 2.0), 0.001); } /** diff --git a/tests/Math/Stochastic/Distribution/BinomialDistributionTest.php b/tests/Math/Stochastic/Distribution/BinomialDistributionTest.php index 8cf6392fe..7ffc92a59 100644 --- a/tests/Math/Stochastic/Distribution/BinomialDistributionTest.php +++ b/tests/Math/Stochastic/Distribution/BinomialDistributionTest.php @@ -68,7 +68,7 @@ class BinomialDistributionTest extends \PHPUnit\Framework\TestCase $n = 20; $p = 0.4; - self::assertEqualsWithDelta(\floor($n * $p), BinomialDistribution::getMedian($n, $p), 0.01); + self::assertEqualsWithDelta(floor($n * $p), BinomialDistribution::getMedian($n, $p), 0.01); } /** @@ -80,7 +80,7 @@ class BinomialDistributionTest extends \PHPUnit\Framework\TestCase $n = 20; $p = 0.4; - self::assertEqualsWithDelta(\floor(($n + 1) * $p), BinomialDistribution::getMode($n, $p), 0.01); + self::assertEqualsWithDelta(floor(($n + 1) * $p), BinomialDistribution::getMode($n, $p), 0.01); } /** @@ -104,7 +104,7 @@ class BinomialDistributionTest extends \PHPUnit\Framework\TestCase $n = 20; $p = 0.4; - self::assertEqualsWithDelta(\sqrt($n * $p * (1 - $p)), BinomialDistribution::getStandardDeviation($n, $p), 0.01); + self::assertEqualsWithDelta(sqrt($n * $p * (1 - $p)), BinomialDistribution::getStandardDeviation($n, $p), 0.01); } /** @@ -116,7 +116,7 @@ class BinomialDistributionTest extends \PHPUnit\Framework\TestCase $n = 20; $p = 0.4; - self::assertEqualsWithDelta((1 - 2 * $p) / \sqrt($n * $p * (1 - $p)), BinomialDistribution::getSkewness($n, $p), 0.01); + self::assertEqualsWithDelta((1 - 2 * $p) / sqrt($n * $p * (1 - $p)), BinomialDistribution::getSkewness($n, $p), 0.01); } /** @@ -141,7 +141,7 @@ class BinomialDistributionTest extends \PHPUnit\Framework\TestCase $p = 0.4; $t = 3; - self::assertEqualsWithDelta((1 - $p + $p * \exp($t)) ** $n, BinomialDistribution::getMgf($n, $t, $p), 0.01); + self::assertEqualsWithDelta((1 - $p + $p * exp($t)) ** $n, BinomialDistribution::getMgf($n, $t, $p), 0.01); } /** diff --git a/tests/Math/Stochastic/Distribution/CauchyDistributionTest.php b/tests/Math/Stochastic/Distribution/CauchyDistributionTest.php index f1b0f54ac..4efede74e 100644 --- a/tests/Math/Stochastic/Distribution/CauchyDistributionTest.php +++ b/tests/Math/Stochastic/Distribution/CauchyDistributionTest.php @@ -65,6 +65,6 @@ class CauchyDistributionTest extends \PHPUnit\Framework\TestCase { $gamma = 1.5; - self::assertEqualsWithDelta(\log(4 * \M_PI * $gamma), CauchyDistribution::getEntropy($gamma), 0.01); + self::assertEqualsWithDelta(log(4 * \M_PI * $gamma), CauchyDistribution::getEntropy($gamma), 0.01); } } diff --git a/tests/Math/Stochastic/Distribution/ChiSquaredDistributionTest.php b/tests/Math/Stochastic/Distribution/ChiSquaredDistributionTest.php index 8e2624193..5fb81c627 100644 --- a/tests/Math/Stochastic/Distribution/ChiSquaredDistributionTest.php +++ b/tests/Math/Stochastic/Distribution/ChiSquaredDistributionTest.php @@ -62,7 +62,7 @@ class ChiSquaredDistributionTest extends \PHPUnit\Framework\TestCase */ public function testMode() : void { - self::assertEquals(\max(5 - 2, 0), ChiSquaredDistribution::getMode(5)); + self::assertEquals(max(5 - 2, 0), ChiSquaredDistribution::getMode(5)); } /** @@ -95,7 +95,7 @@ class ChiSquaredDistributionTest extends \PHPUnit\Framework\TestCase { $df = 5; - self::assertEquals(\sqrt(2 * $df), ChiSquaredDistribution::getStandardDeviation($df)); + self::assertEquals(sqrt(2 * $df), ChiSquaredDistribution::getStandardDeviation($df)); } /** @@ -117,7 +117,7 @@ class ChiSquaredDistributionTest extends \PHPUnit\Framework\TestCase { $df = 5; - self::assertEquals(\sqrt(8 / $df), ChiSquaredDistribution::getSkewness($df)); + self::assertEquals(sqrt(8 / $df), ChiSquaredDistribution::getSkewness($df)); } /** diff --git a/tests/Math/Stochastic/Distribution/ExponentialDistributionTest.php b/tests/Math/Stochastic/Distribution/ExponentialDistributionTest.php index 1b4066913..004c747d3 100644 --- a/tests/Math/Stochastic/Distribution/ExponentialDistributionTest.php +++ b/tests/Math/Stochastic/Distribution/ExponentialDistributionTest.php @@ -69,7 +69,7 @@ class ExponentialDistributionTest extends \PHPUnit\Framework\TestCase */ public function testMedian() : void { - self::assertEquals(1 / 3 * \log(2), ExponentialDistribution::getMedian(3)); + self::assertEquals(1 / 3 * log(2), ExponentialDistribution::getMedian(3)); } /** @@ -99,7 +99,7 @@ class ExponentialDistributionTest extends \PHPUnit\Framework\TestCase */ public function testStandardDeviation() : void { - self::assertEquals(\sqrt(1 / (3 ** 2)), ExponentialDistribution::getStandardDeviation(3)); + self::assertEquals(sqrt(1 / (3 ** 2)), ExponentialDistribution::getStandardDeviation(3)); } /** diff --git a/tests/Math/Stochastic/Distribution/FDistributionTest.php b/tests/Math/Stochastic/Distribution/FDistributionTest.php index 364f585ab..688548868 100644 --- a/tests/Math/Stochastic/Distribution/FDistributionTest.php +++ b/tests/Math/Stochastic/Distribution/FDistributionTest.php @@ -61,7 +61,7 @@ class FDistributionTest extends \PHPUnit\Framework\TestCase { self::assertEquals(0.0, FDistribution::getStandardDeviation(1, 2)); self::assertEquals(0.0, FDistribution::getStandardDeviation(1, 4)); - self::assertEqualsWithDelta(\sqrt(11.1111), FDistribution::getStandardDeviation(3, 5), 0.01); + self::assertEqualsWithDelta(sqrt(11.1111), FDistribution::getStandardDeviation(3, 5), 0.01); } /** @@ -71,7 +71,7 @@ class FDistributionTest extends \PHPUnit\Framework\TestCase public function testSkewness() : void { self::assertEquals(0.0, FDistribution::getSkewness(1, 6)); - self::assertEquals(2 * (2 * 4 + 7 - 2) / (7 - 6) * \sqrt(2 * (7 - 4) / (4 * (7 + 4 - 2))), FDistribution::getSkewness(4, 7)); + self::assertEquals(2 * (2 * 4 + 7 - 2) / (7 - 6) * sqrt(2 * (7 - 4) / (4 * (7 + 4 - 2))), FDistribution::getSkewness(4, 7)); } /** diff --git a/tests/Math/Stochastic/Distribution/GammaDistributionTest.php b/tests/Math/Stochastic/Distribution/GammaDistributionTest.php index 475a373eb..eade75527 100644 --- a/tests/Math/Stochastic/Distribution/GammaDistributionTest.php +++ b/tests/Math/Stochastic/Distribution/GammaDistributionTest.php @@ -63,8 +63,8 @@ class GammaDistributionTest extends \PHPUnit\Framework\TestCase */ public function testPdfIntegerScale() : void { - self::assertEqualsWithDelta(\exp(-1), GammaDistribution::getPdfIntegerScale(1, 1, 1), 0.001); - self::assertEqualsWithDelta(3 * \exp(-3 / 4) / 16, GammaDistribution::getPdfIntegerScale(3, 2, 4), 0.001); + self::assertEqualsWithDelta(exp(-1), GammaDistribution::getPdfIntegerScale(1, 1, 1), 0.001); + self::assertEqualsWithDelta(3 * exp(-3 / 4) / 16, GammaDistribution::getPdfIntegerScale(3, 2, 4), 0.001); } /** @@ -113,7 +113,7 @@ class GammaDistributionTest extends \PHPUnit\Framework\TestCase { $alpha = 4; $beta = 2; - self::assertEquals($alpha / \pow($beta, 2), GammaDistribution::getVarianceRate($alpha, $beta)); + self::assertEquals($alpha / pow($beta, 2), GammaDistribution::getVarianceRate($alpha, $beta)); } /** @@ -122,7 +122,7 @@ class GammaDistributionTest extends \PHPUnit\Framework\TestCase */ public function testStandardDeviationScale() : void { - self::assertEqualsWithDelta(\sqrt(32), GammaDistribution::getStandardDeviationScale(2, 4), 0.001); + self::assertEqualsWithDelta(sqrt(32), GammaDistribution::getStandardDeviationScale(2, 4), 0.001); } /** @@ -133,7 +133,7 @@ class GammaDistributionTest extends \PHPUnit\Framework\TestCase { $alpha = 4; $beta = 2; - self::assertEquals(\sqrt($alpha / \pow($beta, 2)), GammaDistribution::getStandardDeviationRate($alpha, $beta)); + self::assertEquals(sqrt($alpha / pow($beta, 2)), GammaDistribution::getStandardDeviationRate($alpha, $beta)); } /** @@ -151,7 +151,7 @@ class GammaDistributionTest extends \PHPUnit\Framework\TestCase */ public function testSkewness() : void { - self::assertEqualsWithDelta(\sqrt(2), GammaDistribution::getSkewness(2, 4), 0.001); + self::assertEqualsWithDelta(sqrt(2), GammaDistribution::getSkewness(2, 4), 0.001); } /** @@ -163,7 +163,7 @@ class GammaDistributionTest extends \PHPUnit\Framework\TestCase $theta = 2; $t = 1 / $theta * 0.4; $k = 3; - self::assertEquals(\pow(1 - $theta * $t, -$k), GammaDistribution::getMgfScale($k, $t, $theta)); + self::assertEquals(pow(1 - $theta * $t, -$k), GammaDistribution::getMgfScale($k, $t, $theta)); } /** @@ -175,7 +175,7 @@ class GammaDistributionTest extends \PHPUnit\Framework\TestCase $alpha = 4; $beta = 3; $t = 2; - self::assertEquals(\pow(1 - $t / $beta, -$alpha), GammaDistribution::getMgfRate($t, $alpha, $beta)); + self::assertEquals(pow(1 - $t / $beta, -$alpha), GammaDistribution::getMgfRate($t, $alpha, $beta)); } /** diff --git a/tests/Math/Stochastic/Distribution/GeometricDistributionTest.php b/tests/Math/Stochastic/Distribution/GeometricDistributionTest.php index 4d72f91ec..0f37a3b0c 100644 --- a/tests/Math/Stochastic/Distribution/GeometricDistributionTest.php +++ b/tests/Math/Stochastic/Distribution/GeometricDistributionTest.php @@ -84,7 +84,7 @@ class GeometricDistributionTest extends \PHPUnit\Framework\TestCase { $p = 0.3; - self::assertEquals(\sqrt((1 - $p) / $p ** 2), GeometricDistribution::getStandardDeviation($p)); + self::assertEquals(sqrt((1 - $p) / $p ** 2), GeometricDistribution::getStandardDeviation($p)); } /** @@ -95,7 +95,7 @@ class GeometricDistributionTest extends \PHPUnit\Framework\TestCase { $p = 0.3; - self::assertEquals((2 - $p) / \sqrt(1 - $p), GeometricDistribution::getSkewness($p)); + self::assertEquals((2 - $p) / sqrt(1 - $p), GeometricDistribution::getSkewness($p)); } /** @@ -117,7 +117,7 @@ class GeometricDistributionTest extends \PHPUnit\Framework\TestCase { $p = 0.3; - self::assertEquals(\ceil(-1 / \log(1 - $p, 2)), GeometricDistribution::getMedian($p)); + self::assertEquals(ceil(-1 / log(1 - $p, 2)), GeometricDistribution::getMedian($p)); } /** @@ -128,9 +128,9 @@ class GeometricDistributionTest extends \PHPUnit\Framework\TestCase { $p = 0.3; $t1 = 2; - $t2 = -\log(1 - $p) * 0.8; + $t2 = -log(1 - $p) * 0.8; - self::assertEquals($p / (1 - (1 - $p) * \exp($t1)), GeometricDistribution::getMgf($p, $t1)); - self::assertEquals($p * \exp($t2) / (1 - (1 - $p) * \exp($t2)), GeometricDistribution::getMgf($p, $t2)); + self::assertEquals($p / (1 - (1 - $p) * exp($t1)), GeometricDistribution::getMgf($p, $t1)); + self::assertEquals($p * exp($t2) / (1 - (1 - $p) * exp($t2)), GeometricDistribution::getMgf($p, $t2)); } } diff --git a/tests/Math/Stochastic/Distribution/LaplaceDistributionTest.php b/tests/Math/Stochastic/Distribution/LaplaceDistributionTest.php index 578fa9e75..2924cf712 100644 --- a/tests/Math/Stochastic/Distribution/LaplaceDistributionTest.php +++ b/tests/Math/Stochastic/Distribution/LaplaceDistributionTest.php @@ -111,7 +111,7 @@ class LaplaceDistributionTest extends \PHPUnit\Framework\TestCase { $b = 3; - self::assertEquals(\sqrt(2 * $b ** 2), LaplaceDistribution::getStandardDeviation($b)); + self::assertEquals(sqrt(2 * $b ** 2), LaplaceDistribution::getStandardDeviation($b)); } /** @@ -124,7 +124,7 @@ class LaplaceDistributionTest extends \PHPUnit\Framework\TestCase $b = 0.4; $m = 2; - self::assertEquals(\exp($m * $t) / (1 - $b ** 2 * $t ** 2), LaplaceDistribution::getMgf($t, $m, $b)); + self::assertEquals(exp($m * $t) / (1 - $b ** 2 * $t ** 2), LaplaceDistribution::getMgf($t, $m, $b)); } /** diff --git a/tests/Math/Stochastic/Distribution/LogDistributionTest.php b/tests/Math/Stochastic/Distribution/LogDistributionTest.php index 5de923808..886698b0b 100644 --- a/tests/Math/Stochastic/Distribution/LogDistributionTest.php +++ b/tests/Math/Stochastic/Distribution/LogDistributionTest.php @@ -31,7 +31,7 @@ class LogDistributionTest extends \PHPUnit\Framework\TestCase $k = 4; self::assertEquals( - -1 / \log(1 - $p) * $p ** $k / $k, + -1 / log(1 - $p) * $p ** $k / $k, LogDistribution::getPmf($p, $k) ); } @@ -59,7 +59,7 @@ class LogDistributionTest extends \PHPUnit\Framework\TestCase { $p = 0.3; - self::assertEquals(-1 / \log(1 - $p) * $p / (1 - $p), LogDistribution::getMean($p)); + self::assertEquals(-1 / log(1 - $p) * $p / (1 - $p), LogDistribution::getMean($p)); } /** @@ -80,7 +80,7 @@ class LogDistributionTest extends \PHPUnit\Framework\TestCase $p = 0.3; self::assertEquals( - -($p ** 2 + $p * \log(1 - $p)) / ((1 - $p) ** 2 * (\log(1 - $p)) ** 2), + -($p ** 2 + $p * log(1 - $p)) / ((1 - $p) ** 2 * (log(1 - $p)) ** 2), LogDistribution::getVariance($p) ); } @@ -94,7 +94,7 @@ class LogDistributionTest extends \PHPUnit\Framework\TestCase $p = 0.3; self::assertEquals( - \sqrt(-($p ** 2 + $p * \log(1 - $p)) / ((1 - $p) ** 2 * (\log(1 - $p)) ** 2)), + sqrt(-($p ** 2 + $p * log(1 - $p)) / ((1 - $p) ** 2 * (log(1 - $p)) ** 2)), LogDistribution::getStandardDeviation($p) ); } @@ -109,7 +109,7 @@ class LogDistributionTest extends \PHPUnit\Framework\TestCase $t = 0.8; self::assertEquals( - \log(1 - $p * \exp($t)) / \log(1 - $p), + log(1 - $p * exp($t)) / log(1 - $p), LogDistribution::getMgf($p, $t) ); } diff --git a/tests/Math/Stochastic/Distribution/LogNormalDistributionTest.php b/tests/Math/Stochastic/Distribution/LogNormalDistributionTest.php index 26e59ddbd..57a736d51 100644 --- a/tests/Math/Stochastic/Distribution/LogNormalDistributionTest.php +++ b/tests/Math/Stochastic/Distribution/LogNormalDistributionTest.php @@ -45,7 +45,7 @@ class LogNormalDistributionTest extends \PHPUnit\Framework\TestCase */ public function testMean() : void { - self::assertEqualsWithDelta(\exp(13 / 2), LogNormalDistribution::getMean(2, 3), 0.001); + self::assertEqualsWithDelta(exp(13 / 2), LogNormalDistribution::getMean(2, 3), 0.001); } /** @@ -55,7 +55,7 @@ class LogNormalDistributionTest extends \PHPUnit\Framework\TestCase public function testVariance() : void { self::assertEqualsWithDelta( - (\exp(9) - 1) * \exp(13), + (exp(9) - 1) * exp(13), LogNormalDistribution::getVariance(2, 3), 0.001 ); } @@ -67,12 +67,12 @@ class LogNormalDistributionTest extends \PHPUnit\Framework\TestCase public function testStandardDeviation() : void { self::assertEqualsWithDelta( - \exp(13 / 2) * \sqrt(\exp(9) - 1), + exp(13 / 2) * sqrt(exp(9) - 1), LogNormalDistribution::getStandardDeviation(2, 3), 0.001 ); self::assertEqualsWithDelta( - \sqrt((\exp(9) - 1) * \exp(13)), + sqrt((exp(9) - 1) * exp(13)), LogNormalDistribution::getStandardDeviation(2, 3), 0.001 ); } @@ -84,7 +84,7 @@ class LogNormalDistributionTest extends \PHPUnit\Framework\TestCase public function testSkewness() : void { self::assertEqualsWithDelta( - \sqrt(\exp(9) - 1) * (\exp(9) + 2), + sqrt(exp(9) - 1) * (exp(9) + 2), LogNormalDistribution::getSkewness(3), 0.001 ); } @@ -96,7 +96,7 @@ class LogNormalDistributionTest extends \PHPUnit\Framework\TestCase public function testExKurtosis() : void { self::assertEqualsWithDelta( - \exp(16) + 2 * \exp(12) + 3 * \exp(8) - 6, + exp(16) + 2 * exp(12) + 3 * exp(8) - 6, LogNormalDistribution::getExKurtosis(2), 0.001 ); } @@ -107,7 +107,7 @@ class LogNormalDistributionTest extends \PHPUnit\Framework\TestCase */ public function testMedian() : void { - self::assertEquals(\exp(3), LogNormalDistribution::getMedian(3)); + self::assertEquals(exp(3), LogNormalDistribution::getMedian(3)); } /** @@ -116,7 +116,7 @@ class LogNormalDistributionTest extends \PHPUnit\Framework\TestCase */ public function testMode() : void { - self::assertEquals(\exp(3 - 4 ** 2), LogNormalDistribution::getMode(3, 4)); + self::assertEquals(exp(3 - 4 ** 2), LogNormalDistribution::getMode(3, 4)); } /** @@ -126,7 +126,7 @@ class LogNormalDistributionTest extends \PHPUnit\Framework\TestCase public function testEntropy() : void { self::assertEqualsWithDelta( - \log(4 * \exp(3 + 0.5) * \sqrt(2 * \M_PI), 2), + log(4 * exp(3 + 0.5) * sqrt(2 * \M_PI), 2), LogNormalDistribution::getEntropy(3, 4), 0.001 ); } diff --git a/tests/Math/Stochastic/Distribution/LogisticDistributionTest.php b/tests/Math/Stochastic/Distribution/LogisticDistributionTest.php index efaae60b0..a147e7a58 100644 --- a/tests/Math/Stochastic/Distribution/LogisticDistributionTest.php +++ b/tests/Math/Stochastic/Distribution/LogisticDistributionTest.php @@ -32,7 +32,7 @@ class LogisticDistributionTest extends \PHPUnit\Framework\TestCase $s = 2; self::assertEquals( - \exp(-($x - $mu) / $s) / ($s * (1 + \exp(-($x - $mu) / $s)) ** 2), + exp(-($x - $mu) / $s) / ($s * (1 + exp(-($x - $mu) / $s)) ** 2), LogisticDistribution::getPdf($x, $mu, $s) ); } @@ -48,7 +48,7 @@ class LogisticDistributionTest extends \PHPUnit\Framework\TestCase $s = 2; self::assertEquals( - 1 / (1 + \exp(-($x - $mu) / $s)), + 1 / (1 + exp(-($x - $mu) / $s)), LogisticDistribution::getCdf($x, $mu, $s) ); } @@ -101,7 +101,7 @@ class LogisticDistributionTest extends \PHPUnit\Framework\TestCase { $s = 3; self::assertEquals( - \sqrt($s ** 2 * \M_PI ** 2 / 3), + sqrt($s ** 2 * \M_PI ** 2 / 3), LogisticDistribution::getStandardDeviation($s) ); } @@ -131,6 +131,6 @@ class LogisticDistributionTest extends \PHPUnit\Framework\TestCase public function testEntropy() : void { $s = 3; - self::assertEquals(\log($s) + 2, LogisticDistribution::getEntropy($s)); + self::assertEquals(log($s) + 2, LogisticDistribution::getEntropy($s)); } } diff --git a/tests/Math/Stochastic/Distribution/NormalDistributionTest.php b/tests/Math/Stochastic/Distribution/NormalDistributionTest.php index 32f0ee028..f7ecfb04e 100644 --- a/tests/Math/Stochastic/Distribution/NormalDistributionTest.php +++ b/tests/Math/Stochastic/Distribution/NormalDistributionTest.php @@ -149,7 +149,7 @@ class NormalDistributionTest extends \PHPUnit\Framework\TestCase $sigma = 5; self::assertEquals( - \exp($mu * $t + $sigma ** 2 * $t ** 2 / 2), + exp($mu * $t + $sigma ** 2 * $t ** 2 / 2), NormalDistribution::getMgf($t, $mu, $sigma) ); } diff --git a/tests/Math/Stochastic/Distribution/ParetoDistributionTest.php b/tests/Math/Stochastic/Distribution/ParetoDistributionTest.php index ea021c7cf..138e74a7d 100644 --- a/tests/Math/Stochastic/Distribution/ParetoDistributionTest.php +++ b/tests/Math/Stochastic/Distribution/ParetoDistributionTest.php @@ -65,7 +65,7 @@ class ParetoDistributionTest extends \PHPUnit\Framework\TestCase */ public function testStandardDeviation() : void { - self::assertEqualsWithDelta(\sqrt(2), ParetoDistribution::getStandardDeviation(3, 4), 0.001); + self::assertEqualsWithDelta(sqrt(2), ParetoDistribution::getStandardDeviation(3, 4), 0.001); } /** @@ -94,7 +94,7 @@ class ParetoDistributionTest extends \PHPUnit\Framework\TestCase */ public function testMedian() : void { - self::assertEquals(3 * \pow(2, 1 / 4), ParetoDistribution::getMedian(3, 4)); + self::assertEquals(3 * pow(2, 1 / 4), ParetoDistribution::getMedian(3, 4)); } /** @@ -113,7 +113,7 @@ class ParetoDistributionTest extends \PHPUnit\Framework\TestCase public function testEntropy() : void { self::assertEquals( - \log(3 / 4 * \exp(1 + 1 / 4)), + log(3 / 4 * exp(1 + 1 / 4)), ParetoDistribution::getEntropy(3, 4) ); } diff --git a/tests/Math/Stochastic/Distribution/PoissonDistributionTest.php b/tests/Math/Stochastic/Distribution/PoissonDistributionTest.php index cc726f7d5..082ea4b64 100644 --- a/tests/Math/Stochastic/Distribution/PoissonDistributionTest.php +++ b/tests/Math/Stochastic/Distribution/PoissonDistributionTest.php @@ -86,7 +86,7 @@ class PoissonDistributionTest extends \PHPUnit\Framework\TestCase { $l = 4.6; - self::assertEquals(\sqrt($l), PoissonDistribution::getStandardDeviation($l)); + self::assertEquals(sqrt($l), PoissonDistribution::getStandardDeviation($l)); } /** @@ -97,7 +97,7 @@ class PoissonDistributionTest extends \PHPUnit\Framework\TestCase { $l = 4.6; - self::assertEquals(1 / \sqrt($l), PoissonDistribution::getSkewness($l)); + self::assertEquals(1 / sqrt($l), PoissonDistribution::getSkewness($l)); } /** @@ -119,7 +119,7 @@ class PoissonDistributionTest extends \PHPUnit\Framework\TestCase { $l = 4.6; - self::assertEquals(\floor($l + 1 / 3 - 0.02 / $l), PoissonDistribution::getMedian($l)); + self::assertEquals(floor($l + 1 / 3 - 0.02 / $l), PoissonDistribution::getMedian($l)); } /** @@ -142,6 +142,6 @@ class PoissonDistributionTest extends \PHPUnit\Framework\TestCase $l = 4.6; $t = 3; - self::assertEquals(\exp($l * (\exp($t) - 1)), PoissonDistribution::getMgf($l, $t)); + self::assertEquals(exp($l * (exp($t) - 1)), PoissonDistribution::getMgf($l, $t)); } } diff --git a/tests/Math/Stochastic/Distribution/TDistributionTest.php b/tests/Math/Stochastic/Distribution/TDistributionTest.php index fa43ef09a..a2c1a37d4 100644 --- a/tests/Math/Stochastic/Distribution/TDistributionTest.php +++ b/tests/Math/Stochastic/Distribution/TDistributionTest.php @@ -64,7 +64,7 @@ class TDistributionTest extends \PHPUnit\Framework\TestCase */ public function testStandardDeviation() : void { - self::assertEqualsWithDelta(\sqrt(5 / 3), TDistribution::getStandardDeviation(5), 0.001); + self::assertEqualsWithDelta(sqrt(5 / 3), TDistribution::getStandardDeviation(5), 0.001); self::assertEqualsWithDelta(\PHP_FLOAT_MAX, TDistribution::getStandardDeviation(2), 0.001); } diff --git a/tests/Math/Stochastic/Distribution/UniformDistributionContinuousTest.php b/tests/Math/Stochastic/Distribution/UniformDistributionContinuousTest.php index aec410b3f..d5ae426de 100644 --- a/tests/Math/Stochastic/Distribution/UniformDistributionContinuousTest.php +++ b/tests/Math/Stochastic/Distribution/UniformDistributionContinuousTest.php @@ -113,7 +113,7 @@ class UniformDistributionContinuousTest extends \PHPUnit\Framework\TestCase $a = 1; $b = 4; - self::assertEquals(\sqrt(1 / 12 * ($b - $a) ** 2), UniformDistributionContinuous::getStandardDeviation($a, $b)); + self::assertEquals(sqrt(1 / 12 * ($b - $a) ** 2), UniformDistributionContinuous::getStandardDeviation($a, $b)); } /** @@ -142,7 +142,7 @@ class UniformDistributionContinuousTest extends \PHPUnit\Framework\TestCase { self::assertEquals(1, UniformDistributionContinuous::getMgf(0, 2, 3)); self::assertEquals( - (\exp(2 * 4) - \exp(2 * 3)) / (2 * (4 - 3)), + (exp(2 * 4) - exp(2 * 3)) / (2 * (4 - 3)), UniformDistributionContinuous::getMgf(2, 3, 4) ); } diff --git a/tests/Math/Stochastic/Distribution/UniformDistributionDiscreteTest.php b/tests/Math/Stochastic/Distribution/UniformDistributionDiscreteTest.php index 3f66ac990..5610642fc 100644 --- a/tests/Math/Stochastic/Distribution/UniformDistributionDiscreteTest.php +++ b/tests/Math/Stochastic/Distribution/UniformDistributionDiscreteTest.php @@ -100,7 +100,7 @@ class UniformDistributionDiscreteTest extends \PHPUnit\Framework\TestCase $a = 1; $b = 4; - self::assertEquals(\sqrt((($b - $a + 1) ** 2 - 1) / 12), UniformDistributionDiscrete::getStandardDeviation($a, $b)); + self::assertEquals(sqrt((($b - $a + 1) ** 2 - 1) / 12), UniformDistributionDiscrete::getStandardDeviation($a, $b)); } /** @@ -123,7 +123,7 @@ class UniformDistributionDiscreteTest extends \PHPUnit\Framework\TestCase public function testMgf() : void { self::assertEquals( - (\exp(3 * 2) - \exp((4 + 1) * 2)) / ((4 - 3 + 1) * (1 - \exp(2))), + (exp(3 * 2) - exp((4 + 1) * 2)) / ((4 - 3 + 1) * (1 - exp(2))), UniformDistributionDiscrete::getMgf(2, 3, 4) ); } diff --git a/tests/Math/Stochastic/Distribution/WeibullDistributionTest.php b/tests/Math/Stochastic/Distribution/WeibullDistributionTest.php index 95a427450..9e489de42 100644 --- a/tests/Math/Stochastic/Distribution/WeibullDistributionTest.php +++ b/tests/Math/Stochastic/Distribution/WeibullDistributionTest.php @@ -83,7 +83,7 @@ class WeibullDistributionTest extends \PHPUnit\Framework\TestCase */ public function testStandardDeviation() : void { - self::assertEqualsWithDelta(\sqrt(3.43362932), WeibullDistribution::getStandardDeviation(4, 2), 0.001); + self::assertEqualsWithDelta(sqrt(3.43362932), WeibullDistribution::getStandardDeviation(4, 2), 0.001); } /** diff --git a/tests/Math/Stochastic/NaiveBayesClassifierTest.php b/tests/Math/Stochastic/NaiveBayesClassifierTest.php index 1f578e3d3..6820df417 100644 --- a/tests/Math/Stochastic/NaiveBayesClassifierTest.php +++ b/tests/Math/Stochastic/NaiveBayesClassifierTest.php @@ -23,7 +23,7 @@ use phpOMS\Math\Stochastic\NaiveBayesClassifier; */ class NaiveBayesClassifierTest extends \PHPUnit\Framework\TestCase { - const PLAY = [ + public const PLAY = [ ['weather' => ['Overcast']], ['weather' => ['Rainy']], ['weather' => ['Sunny']], @@ -35,7 +35,7 @@ class NaiveBayesClassifierTest extends \PHPUnit\Framework\TestCase ['weather' => ['Overcast']], ]; - const NO_PLAY = [ + public const NO_PLAY = [ ['weather' => ['Sunny']], ['weather' => ['Rainy']], ['weather' => ['Rainy']], @@ -43,14 +43,14 @@ class NaiveBayesClassifierTest extends \PHPUnit\Framework\TestCase ['weather' => ['Rainy']], ]; - const MALE = [ + public const MALE = [ ['height' => 6, 'weight' => 180, 'foot' => 12], ['height' => 5.92, 'weight' => 190, 'foot' => 11], ['height' => 5.58, 'weight' => 170, 'foot' => 12], ['height' => 5.92, 'weight' => 165, 'foot' => 10], ]; - const FEMALE = [ + public const FEMALE = [ ['height' => 5, 'weight' => 100, 'foot' => 6], ['height' => 5.5, 'weight' => 150, 'foot' => 8], ['height' => 5.42, 'weight' => 130, 'foot' => 7], diff --git a/tests/Message/Http/BrowserTypeTest.php b/tests/Message/Http/BrowserTypeTest.php index f8ee5d4c8..90884bd66 100644 --- a/tests/Message/Http/BrowserTypeTest.php +++ b/tests/Message/Http/BrowserTypeTest.php @@ -36,7 +36,7 @@ class BrowserTypeTest extends \PHPUnit\Framework\TestCase */ public function testUnique() : void { - self::assertEquals(BrowserType::getConstants(), \array_unique(BrowserType::getConstants())); + self::assertEquals(BrowserType::getConstants(), array_unique(BrowserType::getConstants())); } /** diff --git a/tests/Message/Http/HttpHeaderTest.php b/tests/Message/Http/HttpHeaderTest.php index f3c1e00e5..f4d53aef2 100644 --- a/tests/Message/Http/HttpHeaderTest.php +++ b/tests/Message/Http/HttpHeaderTest.php @@ -189,22 +189,22 @@ class HttpHeaderTest extends \PHPUnit\Framework\TestCase public function testHeaderGeneration() : void { $this->header->generate(RequestStatusCode::R_403); - self::assertEquals(403, \http_response_code()); + self::assertEquals(403, http_response_code()); $this->header->generate(RequestStatusCode::R_404); - self::assertEquals(404, \http_response_code()); + self::assertEquals(404, http_response_code()); $this->header->generate(RequestStatusCode::R_406); - self::assertEquals(406, \http_response_code()); + self::assertEquals(406, http_response_code()); $this->header->generate(RequestStatusCode::R_407); - self::assertEquals(407, \http_response_code()); + self::assertEquals(407, http_response_code()); $this->header->generate(RequestStatusCode::R_503); - self::assertEquals(503, \http_response_code()); + self::assertEquals(503, http_response_code()); $this->header->generate(RequestStatusCode::R_500); - self::assertEquals(500, \http_response_code()); + self::assertEquals(500, http_response_code()); } /** diff --git a/tests/Message/Http/HttpRequestPost.php b/tests/Message/Http/HttpRequestPost.php index 46ee8ff95..dfcf15502 100644 --- a/tests/Message/Http/HttpRequestPost.php +++ b/tests/Message/Http/HttpRequestPost.php @@ -6,4 +6,4 @@ use phpOMS\Message\Http\HttpRequest; $request = HttpRequest::createFromSuperglobals(); -echo \json_encode($request->getData()); +echo json_encode($request->getData()); diff --git a/tests/Message/Http/HttpRequestTest.php b/tests/Message/Http/HttpRequestTest.php index a71f79fc0..8301385e1 100644 --- a/tests/Message/Http/HttpRequestTest.php +++ b/tests/Message/Http/HttpRequestTest.php @@ -239,7 +239,7 @@ class HttpRequestTest extends \PHPUnit\Framework\TestCase 'b' => [4, 5], ]; - $request->setData('abc', \json_encode($data)); + $request->setData('abc', json_encode($data)); self::assertEquals($data, $request->getDataJson('abc')); } @@ -270,7 +270,7 @@ class HttpRequestTest extends \PHPUnit\Framework\TestCase 'b' => [4, 5], ]; - $request->setData('abc', \json_encode($data) . ','); + $request->setData('abc', json_encode($data) . ','); self::assertEquals([], $request->getDataJson('abc')); } @@ -288,7 +288,7 @@ class HttpRequestTest extends \PHPUnit\Framework\TestCase 'a', 'b', ]; - $request->setData('abc', \implode(',', $data)); + $request->setData('abc', implode(',', $data)); self::assertEquals($data, $request->getDataList('abc')); } @@ -405,7 +405,7 @@ class HttpRequestTest extends \PHPUnit\Framework\TestCase $request->setData('testKey', 'testValue'); self::assertEquals( - \json_encode($request->getData()), + json_encode($request->getData()), Rest::request($request)->getBody() ); } @@ -423,7 +423,7 @@ class HttpRequestTest extends \PHPUnit\Framework\TestCase $request->setData('testKey', 'testValue'); self::assertEquals( - \json_encode($request->getData()), + json_encode($request->getData()), Rest::request($request)->getBody() ); } @@ -441,7 +441,7 @@ class HttpRequestTest extends \PHPUnit\Framework\TestCase $request->setData('testKey', 'testValue'); self::assertEquals( - \json_encode($request->getData()), + json_encode($request->getData()), Rest::request($request)->getBody() ); } diff --git a/tests/Message/Http/HttpResponseTest.php b/tests/Message/Http/HttpResponseTest.php index 9930dc28f..ea80eaf49 100644 --- a/tests/Message/Http/HttpResponseTest.php +++ b/tests/Message/Http/HttpResponseTest.php @@ -92,17 +92,17 @@ class HttpResponseTest extends \PHPUnit\Framework\TestCase */ public function testEndAllOutputBuffering() : void { - if (\headers_sent()) { + if (headers_sent()) { $this->response->header->lock(); } - $start = \ob_get_level(); + $start = ob_get_level(); - \ob_start(); - \ob_start(); + ob_start(); + ob_start(); - self::assertEquals($start + 2, $end = \ob_get_level()); + self::assertEquals($start + 2, $end = ob_get_level()); $this->response->endAllOutputBuffering($end - $start); - self::assertEquals($start, \ob_get_level()); + self::assertEquals($start, ob_get_level()); } /** @@ -194,7 +194,7 @@ class HttpResponseTest extends \PHPUnit\Framework\TestCase $this->response->set('null', null); $this->response->header->set('Content-Type', MimeType::M_JSON . '; charset=utf-8', true); - self::assertEquals(\json_encode($data), $this->response->render()); + self::assertEquals(json_encode($data), $this->response->render()); } /** @@ -205,7 +205,7 @@ class HttpResponseTest extends \PHPUnit\Framework\TestCase public function testJsonDataDecode() : void { $array = [1, 'abc' => 'def']; - $this->response->set('json', \json_encode($array)); + $this->response->set('json', json_encode($array)); self::assertEquals($array, $this->response->getJsonData()); } diff --git a/tests/Message/Http/OSTypeTest.php b/tests/Message/Http/OSTypeTest.php index e7fb10c46..1f63b6f79 100644 --- a/tests/Message/Http/OSTypeTest.php +++ b/tests/Message/Http/OSTypeTest.php @@ -36,6 +36,6 @@ class OSTypeTest extends \PHPUnit\Framework\TestCase */ public function testUnique() : void { - self::assertEquals(OSType::getConstants(), \array_unique(OSType::getConstants())); + self::assertEquals(OSType::getConstants(), array_unique(OSType::getConstants())); } } diff --git a/tests/Message/Http/RequestMethodTest.php b/tests/Message/Http/RequestMethodTest.php index 1f0fdf961..c314c2cb0 100644 --- a/tests/Message/Http/RequestMethodTest.php +++ b/tests/Message/Http/RequestMethodTest.php @@ -36,7 +36,7 @@ class RequestMethodTest extends \PHPUnit\Framework\TestCase */ public function testUnique() : void { - self::assertEquals(RequestMethod::getConstants(), \array_unique(RequestMethod::getConstants())); + self::assertEquals(RequestMethod::getConstants(), array_unique(RequestMethod::getConstants())); } /** diff --git a/tests/Message/Http/RequestStatusCodeTest.php b/tests/Message/Http/RequestStatusCodeTest.php index b536c4f4e..183a0c0a8 100644 --- a/tests/Message/Http/RequestStatusCodeTest.php +++ b/tests/Message/Http/RequestStatusCodeTest.php @@ -36,7 +36,7 @@ class RequestStatusCodeTest extends \PHPUnit\Framework\TestCase */ public function testUnique() : void { - self::assertEquals(RequestStatusCode::getConstants(), \array_unique(RequestStatusCode::getConstants())); + self::assertEquals(RequestStatusCode::getConstants(), array_unique(RequestStatusCode::getConstants())); } /** diff --git a/tests/Message/Http/RequestStatusTest.php b/tests/Message/Http/RequestStatusTest.php index 447cfaa91..1c1dd21af 100644 --- a/tests/Message/Http/RequestStatusTest.php +++ b/tests/Message/Http/RequestStatusTest.php @@ -36,7 +36,7 @@ class RequestStatusTest extends \PHPUnit\Framework\TestCase */ public function testUnique() : void { - self::assertEquals(RequestStatus::getConstants(), \array_unique(RequestStatus::getConstants())); + self::assertEquals(RequestStatus::getConstants(), array_unique(RequestStatus::getConstants())); } /** diff --git a/tests/Message/Mail/EmailTest.php b/tests/Message/Mail/EmailTest.php index ccf36f323..944852973 100644 --- a/tests/Message/Mail/EmailTest.php +++ b/tests/Message/Mail/EmailTest.php @@ -198,7 +198,7 @@ class EmailTestTest extends \PHPUnit\Framework\TestCase public function testHtml() : void { - $message = \file_get_contents(__DIR__ . '/files/utf8.html'); + $message = file_get_contents(__DIR__ . '/files/utf8.html'); $this->mail->charset = CharsetType::UTF_8; $this->mail->body = ''; $this->mail->bodyAlt = ''; @@ -208,7 +208,7 @@ class EmailTestTest extends \PHPUnit\Framework\TestCase self::assertNotEmpty($this->mail->body); self::assertNotEmpty($this->mail->bodyAlt); - self::assertTrue(\stripos($this->mail->body, 'cid:') !== false); + self::assertTrue(stripos($this->mail->body, 'cid:') !== false); } public function testAttachment() : void diff --git a/tests/Message/Mail/MailHandlerTest.php b/tests/Message/Mail/MailHandlerTest.php index bb82a4d3e..96e92dc21 100644 --- a/tests/Message/Mail/MailHandlerTest.php +++ b/tests/Message/Mail/MailHandlerTest.php @@ -43,7 +43,7 @@ class MailHandlerTest extends \PHPUnit\Framework\TestCase { $this->handler->setMailer(SubmitType::MAIL); - if ($this->handler->mailerTool !== '' && !\file_exists(\explode(' ', $this->handler->mailerTool)[0])) { + if ($this->handler->mailerTool !== '' && !file_exists(explode(' ', $this->handler->mailerTool)[0])) { self::markTestSkipped(); } @@ -59,7 +59,7 @@ class MailHandlerTest extends \PHPUnit\Framework\TestCase $mail->addAttachment(__DIR__ . '/files/logo.png', 'logo'); $mail->addEmbeddedImage(__DIR__ . '/files/logo.png', 'cid1'); $mail->addStringAttachment('String content', 'string_content_file.txt'); - $mail->addStringEmbeddedImage(\file_get_contents(__DIR__ . '/files/logo.png'), 'cid2'); + $mail->addStringEmbeddedImage(file_get_contents(__DIR__ . '/files/logo.png'), 'cid2'); self::assertTrue($this->handler->send($mail)); } @@ -68,7 +68,7 @@ class MailHandlerTest extends \PHPUnit\Framework\TestCase { $this->handler->setMailer(SubmitType::SENDMAIL); - if ($this->handler->mailerTool !== '' && !\file_exists(\explode(' ', $this->handler->mailerTool)[0])) { + if ($this->handler->mailerTool !== '' && !file_exists(explode(' ', $this->handler->mailerTool)[0])) { self::markTestSkipped(); } @@ -84,7 +84,7 @@ class MailHandlerTest extends \PHPUnit\Framework\TestCase $mail->addAttachment(__DIR__ . '/files/logo.png', 'logo'); $mail->addEmbeddedImage(__DIR__ . '/files/logo.png', 'cid1'); $mail->addStringAttachment('String content', 'string_content_file.txt'); - $mail->addStringEmbeddedImage(\file_get_contents(__DIR__ . '/files/logo.png'), 'cid2'); + $mail->addStringEmbeddedImage(file_get_contents(__DIR__ . '/files/logo.png'), 'cid2'); self::assertTrue($this->handler->send($mail)); } @@ -93,7 +93,7 @@ class MailHandlerTest extends \PHPUnit\Framework\TestCase { $this->handler->setMailer(SubmitType::MAIL); - if ($this->handler->mailerTool !== '' && !\file_exists(\explode(' ', $this->handler->mailerTool)[0])) { + if ($this->handler->mailerTool !== '' && !file_exists(explode(' ', $this->handler->mailerTool)[0])) { self::markTestSkipped(); } @@ -104,7 +104,7 @@ class MailHandlerTest extends \PHPUnit\Framework\TestCase $mail->addBCC('test3@orange-management.email', 'Dennis Eichhorn'); $mail->addReplyTo('test4@orange-management.email', 'Dennis Eichhorn'); $mail->subject = 'testSendHtmlWithMail'; - $message = \file_get_contents(__DIR__ . '/files/utf8.html'); + $message = file_get_contents(__DIR__ . '/files/utf8.html'); $mail->charset = CharsetType::UTF_8; $mail->body = ''; $mail->bodyAlt = ''; @@ -114,7 +114,7 @@ class MailHandlerTest extends \PHPUnit\Framework\TestCase $mail->addAttachment(__DIR__ . '/files/logo.png', 'logo'); $mail->addEmbeddedImage(__DIR__ . '/files/logo.png', 'cid1'); $mail->addStringAttachment('String content', 'string_content_file.txt'); - $mail->addStringEmbeddedImage(\file_get_contents(__DIR__ . '/files/logo.png'), 'cid2'); + $mail->addStringEmbeddedImage(file_get_contents(__DIR__ . '/files/logo.png'), 'cid2'); self::assertTrue($this->handler->send($mail)); } @@ -123,7 +123,7 @@ class MailHandlerTest extends \PHPUnit\Framework\TestCase { $this->handler->setMailer(SubmitType::SENDMAIL); - if ($this->handler->mailerTool !== '' && !\file_exists(\explode(' ', $this->handler->mailerTool)[0])) { + if ($this->handler->mailerTool !== '' && !file_exists(explode(' ', $this->handler->mailerTool)[0])) { self::markTestSkipped(); } @@ -134,7 +134,7 @@ class MailHandlerTest extends \PHPUnit\Framework\TestCase $mail->addBCC('test3@orange-management.email', 'Dennis Eichhorn'); $mail->addReplyTo('test4@orange-management.email', 'Dennis Eichhorn'); $mail->subject = 'testSendHtmlWithSendmail'; - $message = \file_get_contents(__DIR__ . '/files/utf8.html'); + $message = file_get_contents(__DIR__ . '/files/utf8.html'); $mail->charset = CharsetType::UTF_8; $mail->body = ''; $mail->bodyAlt = ''; @@ -144,7 +144,7 @@ class MailHandlerTest extends \PHPUnit\Framework\TestCase $mail->addAttachment(__DIR__ . '/files/logo.png', 'logo'); $mail->addEmbeddedImage(__DIR__ . '/files/logo.png', 'cid1'); $mail->addStringAttachment('String content', 'string_content_file.txt'); - $mail->addStringEmbeddedImage(\file_get_contents(__DIR__ . '/files/logo.png'), 'cid2'); + $mail->addStringEmbeddedImage(file_get_contents(__DIR__ . '/files/logo.png'), 'cid2'); self::assertTrue($this->handler->send($mail)); } @@ -153,7 +153,7 @@ class MailHandlerTest extends \PHPUnit\Framework\TestCase { $this->handler->setMailer(SubmitType::MAIL); - if ($this->handler->mailerTool !== '' && !\file_exists(\explode(' ', $this->handler->mailerTool)[0])) { + if ($this->handler->mailerTool !== '' && !file_exists(explode(' ', $this->handler->mailerTool)[0])) { self::markTestSkipped(); } @@ -172,7 +172,7 @@ class MailHandlerTest extends \PHPUnit\Framework\TestCase { $this->handler->setMailer(SubmitType::SENDMAIL); - if ($this->handler->mailerTool !== '' && !\file_exists(\explode(' ', $this->handler->mailerTool)[0])) { + if ($this->handler->mailerTool !== '' && !file_exists(explode(' ', $this->handler->mailerTool)[0])) { self::markTestSkipped(); } @@ -191,7 +191,7 @@ class MailHandlerTest extends \PHPUnit\Framework\TestCase { $this->handler->setMailer(SubmitType::MAIL); - if ($this->handler->mailerTool !== '' && !\file_exists(\explode(' ', $this->handler->mailerTool)[0])) { + if ($this->handler->mailerTool !== '' && !file_exists(explode(' ', $this->handler->mailerTool)[0])) { self::markTestSkipped(); } @@ -208,7 +208,7 @@ class MailHandlerTest extends \PHPUnit\Framework\TestCase { $this->handler->setMailer(SubmitType::SENDMAIL); - if ($this->handler->mailerTool !== '' && !\file_exists(\explode(' ', $this->handler->mailerTool)[0])) { + if ($this->handler->mailerTool !== '' && !file_exists(explode(' ', $this->handler->mailerTool)[0])) { self::markTestSkipped(); } @@ -225,7 +225,7 @@ class MailHandlerTest extends \PHPUnit\Framework\TestCase { $this->handler->setMailer(SubmitType::MAIL); - if ($this->handler->mailerTool !== '' && !\file_exists(\explode(' ', $this->handler->mailerTool)[0])) { + if ($this->handler->mailerTool !== '' && !file_exists(explode(' ', $this->handler->mailerTool)[0])) { self::markTestSkipped(); } @@ -242,7 +242,7 @@ class MailHandlerTest extends \PHPUnit\Framework\TestCase { $this->handler->setMailer(SubmitType::SENDMAIL); - if ($this->handler->mailerTool !== '' && !\file_exists(\explode(' ', $this->handler->mailerTool)[0])) { + if ($this->handler->mailerTool !== '' && !file_exists(explode(' ', $this->handler->mailerTool)[0])) { self::markTestSkipped(); } @@ -259,7 +259,7 @@ class MailHandlerTest extends \PHPUnit\Framework\TestCase { $this->handler->setMailer(SubmitType::MAIL); - if ($this->handler->mailerTool !== '' && !\file_exists(\explode(' ', $this->handler->mailerTool)[0])) { + if ($this->handler->mailerTool !== '' && !file_exists(explode(' ', $this->handler->mailerTool)[0])) { self::markTestSkipped(); } @@ -279,7 +279,7 @@ class MailHandlerTest extends \PHPUnit\Framework\TestCase { $this->handler->setMailer(SubmitType::SENDMAIL); - if ($this->handler->mailerTool !== '' && !\file_exists(\explode(' ', $this->handler->mailerTool)[0])) { + if ($this->handler->mailerTool !== '' && !file_exists(explode(' ', $this->handler->mailerTool)[0])) { self::markTestSkipped(); } @@ -299,7 +299,7 @@ class MailHandlerTest extends \PHPUnit\Framework\TestCase { $this->handler->setMailer(SubmitType::MAIL); - if ($this->handler->mailerTool !== '' && !\file_exists(\explode(' ', $this->handler->mailerTool)[0])) { + if ($this->handler->mailerTool !== '' && !file_exists(explode(' ', $this->handler->mailerTool)[0])) { self::markTestSkipped(); } @@ -317,7 +317,7 @@ class MailHandlerTest extends \PHPUnit\Framework\TestCase { $this->handler->setMailer(SubmitType::SENDMAIL); - if ($this->handler->mailerTool !== '' && !\file_exists(\explode(' ', $this->handler->mailerTool)[0])) { + if ($this->handler->mailerTool !== '' && !file_exists(explode(' ', $this->handler->mailerTool)[0])) { self::markTestSkipped(); } @@ -335,7 +335,7 @@ class MailHandlerTest extends \PHPUnit\Framework\TestCase { $this->handler->setMailer(SubmitType::MAIL); - if ($this->handler->mailerTool !== '' && !\file_exists(\explode(' ', $this->handler->mailerTool)[0])) { + if ($this->handler->mailerTool !== '' && !file_exists(explode(' ', $this->handler->mailerTool)[0])) { self::markTestSkipped(); } @@ -352,7 +352,7 @@ class MailHandlerTest extends \PHPUnit\Framework\TestCase { $this->handler->setMailer(SubmitType::SENDMAIL); - if ($this->handler->mailerTool !== '' && !\file_exists(\explode(' ', $this->handler->mailerTool)[0])) { + if ($this->handler->mailerTool !== '' && !file_exists(explode(' ', $this->handler->mailerTool)[0])) { self::markTestSkipped(); } diff --git a/tests/Message/Socket/PacketTypeTest.php b/tests/Message/Socket/PacketTypeTest.php index b94ecd9e3..6df6daf8b 100644 --- a/tests/Message/Socket/PacketTypeTest.php +++ b/tests/Message/Socket/PacketTypeTest.php @@ -36,7 +36,7 @@ class PacketTypeTest extends \PHPUnit\Framework\TestCase */ public function testUnique() : void { - self::assertEquals(PacketType::getConstants(), \array_unique(PacketType::getConstants())); + self::assertEquals(PacketType::getConstants(), array_unique(PacketType::getConstants())); } /** diff --git a/tests/Model/Message/DomActionTest.php b/tests/Model/Message/DomActionTest.php index 495e683f0..69d0bfa5b 100644 --- a/tests/Model/Message/DomActionTest.php +++ b/tests/Model/Message/DomActionTest.php @@ -36,7 +36,7 @@ class DomActionTest extends \PHPUnit\Framework\TestCase */ public function testUnique() : void { - self::assertEquals(DomAction::getConstants(), \array_unique(DomAction::getConstants())); + self::assertEquals(DomAction::getConstants(), array_unique(DomAction::getConstants())); } /** diff --git a/tests/Model/Message/DomTest.php b/tests/Model/Message/DomTest.php index 09858b7d1..757a1056b 100644 --- a/tests/Model/Message/DomTest.php +++ b/tests/Model/Message/DomTest.php @@ -73,7 +73,7 @@ class DomTest extends \PHPUnit\Framework\TestCase 'content' => 'msg', ], $obj->toArray()); - self::assertEquals(\json_encode([ + self::assertEquals(json_encode([ 'type' => 'dom', 'time' => 3, 'selector' => '#sel', diff --git a/tests/Model/Message/FormValidationTest.php b/tests/Model/Message/FormValidationTest.php index c96ff9e88..77caa4f35 100644 --- a/tests/Model/Message/FormValidationTest.php +++ b/tests/Model/Message/FormValidationTest.php @@ -56,7 +56,7 @@ class FormValidationTest extends \PHPUnit\Framework\TestCase $obj = new FormValidation($arr); self::assertEquals(['type' => 'validation', 'validation' => $arr], $obj->toArray()); - self::assertEquals(\json_encode(['type' => 'validation', 'validation' => $arr]), $obj->serialize()); + self::assertEquals(json_encode(['type' => 'validation', 'validation' => $arr]), $obj->serialize()); self::assertEquals(['type' => 'validation', 'validation' => $arr], $obj->jsonSerialize()); $obj2 = new FormValidation(); diff --git a/tests/Model/Message/NotifyTest.php b/tests/Model/Message/NotifyTest.php index 9495b08ee..3862629c1 100644 --- a/tests/Model/Message/NotifyTest.php +++ b/tests/Model/Message/NotifyTest.php @@ -77,7 +77,7 @@ class NotifyTest extends \PHPUnit\Framework\TestCase 'level' => NotifyType::ERROR, ], $obj->toArray()); - self::assertEquals(\json_encode([ + self::assertEquals(json_encode([ 'type' => 'notify', 'time' => 3, 'stay' => 5, diff --git a/tests/Model/Message/NotifyTypeTest.php b/tests/Model/Message/NotifyTypeTest.php index f838ec24a..0f993ffc4 100644 --- a/tests/Model/Message/NotifyTypeTest.php +++ b/tests/Model/Message/NotifyTypeTest.php @@ -36,7 +36,7 @@ class NotifyTypeTest extends \PHPUnit\Framework\TestCase */ public function testUnique() : void { - self::assertEquals(NotifyType::getConstants(), \array_unique(NotifyType::getConstants())); + self::assertEquals(NotifyType::getConstants(), array_unique(NotifyType::getConstants())); } /** diff --git a/tests/Model/Message/RedirectTest.php b/tests/Model/Message/RedirectTest.php index 7c25bcd1b..ef5595308 100644 --- a/tests/Model/Message/RedirectTest.php +++ b/tests/Model/Message/RedirectTest.php @@ -59,7 +59,7 @@ class RedirectTest extends \PHPUnit\Framework\TestCase $obj = new Redirect('url', true); self::assertEquals(['type' => 'redirect', 'time' => 0, 'uri' => 'url', 'new' => true], $obj->toArray()); - self::assertEquals(\json_encode(['type' => 'redirect', 'time' => 0, 'uri' => 'url', 'new' => true]), $obj->serialize()); + self::assertEquals(json_encode(['type' => 'redirect', 'time' => 0, 'uri' => 'url', 'new' => true]), $obj->serialize()); self::assertEquals(['type' => 'redirect', 'time' => 0, 'uri' => 'url', 'new' => true], $obj->jsonSerialize()); $obj->setDelay(6); diff --git a/tests/Model/Message/ReloadTest.php b/tests/Model/Message/ReloadTest.php index b93334aa2..c67d698b5 100644 --- a/tests/Model/Message/ReloadTest.php +++ b/tests/Model/Message/ReloadTest.php @@ -55,7 +55,7 @@ class ReloadTest extends \PHPUnit\Framework\TestCase $obj = new Reload(5); self::assertEquals(['type' => 'reload', 'time' => 5], $obj->toArray()); - self::assertEquals(\json_encode(['type' => 'reload', 'time' => 5]), $obj->serialize()); + self::assertEquals(json_encode(['type' => 'reload', 'time' => 5]), $obj->serialize()); self::assertEquals(['type' => 'reload', 'time' => 5], $obj->jsonSerialize()); $obj->setDelay(6); diff --git a/tests/Module/ModuleAbstractTest.php b/tests/Module/ModuleAbstractTest.php index f31853ad0..8b8583cae 100644 --- a/tests/Module/ModuleAbstractTest.php +++ b/tests/Module/ModuleAbstractTest.php @@ -45,11 +45,11 @@ class ModuleAbstractTest extends \PHPUnit\Framework\TestCase { public const PATH = __DIR__ . '/Test'; - const VERSION = '1.2.3'; + public const VERSION = '1.2.3'; - const NAME = 'Test'; + public const NAME = 'Test'; - const ID = 2; + public const ID = 2; protected static array $dependencies = [1, 2]; @@ -137,30 +137,30 @@ class ModuleAbstractTest extends \PHPUnit\Framework\TestCase public function createWithCallable() : string { - \ob_start(); + ob_start(); $this->createModel(1, null, function() : void { echo 1; }, '', '127.0.0.1'); - return \ob_get_clean(); + return ob_get_clean(); } public function createsWithCallable() : string { - \ob_start(); + ob_start(); $this->createModels(1, [null, null], function() : void { echo 1; }, '', '127.0.0.1'); - return \ob_get_clean(); + return ob_get_clean(); } public function updateWithCallable() : string { - \ob_start(); + ob_start(); $this->updateModel(1, null, null, function() : void { echo 1; }, '', '127.0.0.1'); - return \ob_get_clean(); + return ob_get_clean(); } public function deleteWithCallable() : string { - \ob_start(); + ob_start(); $this->deleteModel(1, null, function() : void { echo 1; }, '', '127.0.0.1'); - return \ob_get_clean(); + return ob_get_clean(); } }; } diff --git a/tests/Module/ModuleInfoTest.php b/tests/Module/ModuleInfoTest.php index d3969d054..bcf1a1c43 100644 --- a/tests/Module/ModuleInfoTest.php +++ b/tests/Module/ModuleInfoTest.php @@ -35,7 +35,7 @@ class ModuleInfoTest extends \PHPUnit\Framework\TestCase $info = new ModuleInfo(__DIR__ . '/info-test.json'); $info->load(); - $jarray = \json_decode(\file_get_contents(__DIR__ . '/info-test.json'), true); + $jarray = json_decode(file_get_contents(__DIR__ . '/info-test.json'), true); self::assertEquals($jarray, $info->get()); self::assertEquals($jarray['name']['id'], $info->getId()); @@ -57,7 +57,7 @@ class ModuleInfoTest extends \PHPUnit\Framework\TestCase */ public function testChange() : void { - $jarray = \json_decode(\file_get_contents(__DIR__ . '/info-test.json'), true); + $jarray = json_decode(file_get_contents(__DIR__ . '/info-test.json'), true); $info = new ModuleInfo(__DIR__ . '/info-test.json'); $info->load(); diff --git a/tests/Module/ModuleManagerTest.php b/tests/Module/ModuleManagerTest.php index 628b1cc90..2fbed6b5a 100644 --- a/tests/Module/ModuleManagerTest.php +++ b/tests/Module/ModuleManagerTest.php @@ -127,7 +127,7 @@ class ModuleManagerTest extends \PHPUnit\Framework\TestCase $active = $this->moduleManager->getActiveModules(); /** @var string $last */ - $last = \end($active); + $last = end($active); self::assertTrue($this->moduleManager->isActive($last['name']['internal'])); self::assertFalse($this->moduleManager->isActive('Invalid')); @@ -193,7 +193,7 @@ class ModuleManagerTest extends \PHPUnit\Framework\TestCase foreach ($load as $val) { foreach ($val['pid'] as $pid) { $queryLoad->values( - \sha1(\str_replace('/', '', $pid)), + sha1(str_replace('/', '', $pid)), (int) $val['type'], $val['from'], $val['for'], diff --git a/tests/Module/NullModuleTest.php b/tests/Module/NullModuleTest.php index c5f065bef..b09e2f6c4 100644 --- a/tests/Module/NullModuleTest.php +++ b/tests/Module/NullModuleTest.php @@ -60,6 +60,6 @@ final class NullModuleTest extends \PHPUnit\Framework\TestCase $this->module->invalidMethodCall(); $path = TestUtils::getMember(FileLogger::getInstance(), 'path'); - self::assertStringContainsString('Expected module/controller but got NullModule.', \file_get_contents($path)); + self::assertStringContainsString('Expected module/controller but got NullModule.', file_get_contents($path)); } } diff --git a/tests/Module/PackageManagerTest.php b/tests/Module/PackageManagerTest.php index 0fa533265..8a3657d0f 100644 --- a/tests/Module/PackageManagerTest.php +++ b/tests/Module/PackageManagerTest.php @@ -29,48 +29,48 @@ class PackageManagerTest extends \PHPUnit\Framework\TestCase { public static function setUpBeforeClass() : void { - if (\is_file(__DIR__ . '/testPackage.zip')) { - \unlink(__DIR__ . '/testPackage.zip'); + if (is_file(__DIR__ . '/testPackage.zip')) { + unlink(__DIR__ . '/testPackage.zip'); } - if (\is_file(__DIR__ . '/testPackageExtracted')) { - \array_map('unlink', \glob(__DIR__ . '/testPackageExtracted/testSubPackage/*')); - \rmdir(__DIR__ . '/testPackageExtracted/testSubPackage'); - \array_map('unlink', \glob(__DIR__ . '/testPackageExtracted/*')); + if (is_file(__DIR__ . '/testPackageExtracted')) { + array_map('unlink', glob(__DIR__ . '/testPackageExtracted/testSubPackage/*')); + rmdir(__DIR__ . '/testPackageExtracted/testSubPackage'); + array_map('unlink', glob(__DIR__ . '/testPackageExtracted/*')); } - if (\is_file(__DIR__ . '/public.key')) { - \unlink(__DIR__ . '/public.key'); + if (is_file(__DIR__ . '/public.key')) { + unlink(__DIR__ . '/public.key'); } // create keys - $alice_sign_kp = \sodium_crypto_sign_keypair(); + $alice_sign_kp = sodium_crypto_sign_keypair(); - $alice_sign_secretkey = \sodium_crypto_sign_secretkey($alice_sign_kp); - $alice_sign_publickey = \sodium_crypto_sign_publickey($alice_sign_kp); + $alice_sign_secretkey = sodium_crypto_sign_secretkey($alice_sign_kp); + $alice_sign_publickey = sodium_crypto_sign_publickey($alice_sign_kp); // create signature $files = Directory::list(__DIR__ . '/testPackage', '*', true); - $state = \sodium_crypto_generichash_init(); + $state = sodium_crypto_generichash_init(); foreach ($files as $file) { - if ($file === 'package.cert' || \is_dir(__DIR__ . '/testPackage' . '/' . $file)) { + if ($file === 'package.cert' || is_dir(__DIR__ . '/testPackage' . '/' . $file)) { continue; } - $contents = \file_get_contents(__DIR__ . '/testPackage' . '/' . $file); + $contents = file_get_contents(__DIR__ . '/testPackage' . '/' . $file); if ($contents === false) { throw new \Exception(); } - \sodium_crypto_generichash_update($state, $contents); + sodium_crypto_generichash_update($state, $contents); } - $hash = \sodium_crypto_generichash_final($state); - $signature = \sodium_crypto_sign_detached($hash, $alice_sign_secretkey); + $hash = sodium_crypto_generichash_final($state); + $signature = sodium_crypto_sign_detached($hash, $alice_sign_secretkey); - \file_put_contents(__DIR__ . '/testPackage/package.cert', $signature); - \file_put_contents(__DIR__ . '/public.key', $alice_sign_publickey); + file_put_contents(__DIR__ . '/testPackage/package.cert', $signature); + file_put_contents(__DIR__ . '/public.key', $alice_sign_publickey); // create zip Zip::pack( @@ -86,19 +86,19 @@ class PackageManagerTest extends \PHPUnit\Framework\TestCase */ public function testPackageValidInstall() : void { - if (\is_dir(__DIR__ . '/dummyModule')) { + if (is_dir(__DIR__ . '/dummyModule')) { Directory::delete(__DIR__ . '/dummyModule'); } - \chmod(__DIR__ . '/testPackage/testSubPackage/run.batch', 0777); - \chmod(__DIR__ . '/testPackage/testSubPackage/run.sh', 0777); + chmod(__DIR__ . '/testPackage/testSubPackage/run.batch', 0777); + chmod(__DIR__ . '/testPackage/testSubPackage/run.sh', 0777); Directory::copy(__DIR__ . '/testModulePackage', __DIR__ . '/dummyModule'); $package = new PackageManager( __DIR__ . '/testPackage.zip', __DIR__ . '/dummyModule/', - \file_get_contents(__DIR__ . '/public.key') + file_get_contents(__DIR__ . '/public.key') ); $package->extract(__DIR__ . '/testPackageExtracted'); @@ -108,34 +108,34 @@ class PackageManagerTest extends \PHPUnit\Framework\TestCase $package->load(); $package->install(); - self::assertGreaterThan(100, \filesize(__DIR__ . '/dummyModule/README.md')); - self::assertEquals('To copy!', \file_get_contents(__DIR__ . '/dummyModule/Replace.md')); + self::assertGreaterThan(100, filesize(__DIR__ . '/dummyModule/README.md')); + self::assertEquals('To copy!', file_get_contents(__DIR__ . '/dummyModule/Replace.md')); - self::assertFalse(\is_dir(__DIR__ . '/dummyModule/toMove')); - self::assertTrue(\is_dir(__DIR__ . '/dummyModule/moveHere')); - self::assertTrue(\is_file(__DIR__ . '/dummyModule/moveHere/a.md')); - self::assertTrue(\is_file(__DIR__ . '/dummyModule/moveHere/sub/b.txt')); + self::assertFalse(is_dir(__DIR__ . '/dummyModule/toMove')); + self::assertTrue(is_dir(__DIR__ . '/dummyModule/moveHere')); + self::assertTrue(is_file(__DIR__ . '/dummyModule/moveHere/a.md')); + self::assertTrue(is_file(__DIR__ . '/dummyModule/moveHere/sub/b.txt')); - self::assertTrue(\is_file(__DIR__ . '/dummyModule/externalCopy.md')); + self::assertTrue(is_file(__DIR__ . '/dummyModule/externalCopy.md')); - self::assertTrue(\is_dir(__DIR__ . '/dummyModule/toCopy')); - self::assertTrue(\is_dir(__DIR__ . '/dummyModule/copyHere')); - self::assertTrue(\is_file(__DIR__ . '/dummyModule/copyHere/a.md')); - self::assertTrue(\is_file(__DIR__ . '/dummyModule/copyHere/sub/b.txt')); + self::assertTrue(is_dir(__DIR__ . '/dummyModule/toCopy')); + self::assertTrue(is_dir(__DIR__ . '/dummyModule/copyHere')); + self::assertTrue(is_file(__DIR__ . '/dummyModule/copyHere/a.md')); + self::assertTrue(is_file(__DIR__ . '/dummyModule/copyHere/sub/b.txt')); - self::assertFalse(\is_dir(__DIR__ . '/dummyModule/Remove')); + self::assertFalse(is_dir(__DIR__ . '/dummyModule/Remove')); - \sleep(1); + sleep(1); - self::assertEquals('php script', \file_get_contents(__DIR__ . '/dummyModule/phpscript.md')); + self::assertEquals('php script', file_get_contents(__DIR__ . '/dummyModule/phpscript.md')); - if (\is_executable(__DIR__ . '/testPackageExtracted/testSubPackage/run.sh') - && \is_executable(__DIR__ . '/testPackageExtracted/testSubPackage/run.batch') + if (is_executable(__DIR__ . '/testPackageExtracted/testSubPackage/run.sh') + && is_executable(__DIR__ . '/testPackageExtracted/testSubPackage/run.batch') ) { - self::assertEquals('cmd script', \file_get_contents(__DIR__ . '/dummyModule/cmdscript.md')); + self::assertEquals('cmd script', file_get_contents(__DIR__ . '/dummyModule/cmdscript.md')); } - if (\is_dir(__DIR__ . '/dummyModule')) { + if (is_dir(__DIR__ . '/dummyModule')) { Directory::delete(__DIR__ . '/dummyModule'); } } @@ -152,7 +152,7 @@ class PackageManagerTest extends \PHPUnit\Framework\TestCase $package = new PackageManager( __DIR__ . '/testPackage.zip', '/invalid', - \file_get_contents(__DIR__ . '/public.key') + file_get_contents(__DIR__ . '/public.key') ); $package->load(); @@ -170,7 +170,7 @@ class PackageManagerTest extends \PHPUnit\Framework\TestCase $package = new PackageManager( __DIR__ . '/testPackage.zip', '/invalid', - \file_get_contents(__DIR__ . '/public.key') . ' ' + file_get_contents(__DIR__ . '/public.key') . ' ' ); $package->install(); @@ -186,7 +186,7 @@ class PackageManagerTest extends \PHPUnit\Framework\TestCase $package = new PackageManager( __DIR__ . '/testPackage.zip', '/invalid', - \file_get_contents(__DIR__ . '/public.key') . ' ' + file_get_contents(__DIR__ . '/public.key') . ' ' ); $package->extract(__DIR__ . '/testPackageExtracted'); @@ -204,11 +204,11 @@ class PackageManagerTest extends \PHPUnit\Framework\TestCase $package = new PackageManager( __DIR__ . '/testPackage.zip', '/invalid', - \file_get_contents(__DIR__ . '/public.key') + file_get_contents(__DIR__ . '/public.key') ); $package->extract(__DIR__ . '/testPackageExtracted'); - \file_put_contents(__DIR__ . '/testPackageExtracted/info.json', ' ', \FILE_APPEND); + file_put_contents(__DIR__ . '/testPackageExtracted/info.json', ' ', \FILE_APPEND); self::assertFalse($package->isValid()); } @@ -223,7 +223,7 @@ class PackageManagerTest extends \PHPUnit\Framework\TestCase $package = new PackageManager( __DIR__ . '/testPackage.zip', '/invalid', - \file_get_contents(__DIR__ . '/public.key') + file_get_contents(__DIR__ . '/public.key') ); $package->extract(__DIR__ . '/testPackageExtracted'); @@ -235,21 +235,21 @@ class PackageManagerTest extends \PHPUnit\Framework\TestCase public static function tearDownAfterClass() : void { - if (\is_file(__DIR__ . '/testPackage.zip')) { - \unlink(__DIR__ . '/testPackage.zip'); + if (is_file(__DIR__ . '/testPackage.zip')) { + unlink(__DIR__ . '/testPackage.zip'); } - if (\is_dir(__DIR__ . '/testPackageExtracted')) { - \array_map('unlink', \glob(__DIR__ . '/testPackageExtracted/testSubPackage/*')); - \rmdir(__DIR__ . '/testPackageExtracted/testSubPackage'); - \array_map('unlink', \glob(__DIR__ . '/testPackageExtracted/*')); - \rmdir(__DIR__ . '/testPackageExtracted'); + if (is_dir(__DIR__ . '/testPackageExtracted')) { + array_map('unlink', glob(__DIR__ . '/testPackageExtracted/testSubPackage/*')); + rmdir(__DIR__ . '/testPackageExtracted/testSubPackage'); + array_map('unlink', glob(__DIR__ . '/testPackageExtracted/*')); + rmdir(__DIR__ . '/testPackageExtracted'); } - if (\is_file(__DIR__ . '/public.key')) { - \unlink(__DIR__ . '/public.key'); + if (is_file(__DIR__ . '/public.key')) { + unlink(__DIR__ . '/public.key'); } - \file_put_contents(__DIR__ . '/testPackage/package.cert', ''); + file_put_contents(__DIR__ . '/testPackage/package.cert', ''); } } diff --git a/tests/Module/UninstallerAbstractTest.php b/tests/Module/UninstallerAbstractTest.php index b7a5ddc90..73b13f728 100644 --- a/tests/Module/UninstallerAbstractTest.php +++ b/tests/Module/UninstallerAbstractTest.php @@ -51,6 +51,6 @@ class UninstallerAbstractTest extends \PHPUnit\Framework\TestCase new ModuleInfo(__DIR__) ); - self::assertFalse(\file_exists($this->uninstaller::PATH . '/Install/db.json')); + self::assertFalse(file_exists($this->uninstaller::PATH . '/Install/db.json')); } } diff --git a/tests/Module/testPackage/testSubPackage/run.php b/tests/Module/testPackage/testSubPackage/run.php index 5079d7196..c02a7e6d5 100644 --- a/tests/Module/testPackage/testSubPackage/run.php +++ b/tests/Module/testPackage/testSubPackage/run.php @@ -1,4 +1,4 @@ ignore(__DIR__ . '/PreloadTest/Sub/Preload3.php') @@ -41,9 +41,9 @@ class PreloaderTest extends \PHPUnit\Framework\TestCase ->includePath(__DIR__ . '/PreloadTest/Sub/Preload3.php') ->load(); - $includes = \get_included_files(); - self::assertTrue(\in_array(\realpath(__DIR__ . '/PreloadTest/Preload1.php'), $includes)); - self::assertTrue(\in_array(\realpath(__DIR__ . '/PreloadTest/Sub/Preload2.php'), $includes)); - self::assertFalse(\in_array(\realpath(__DIR__ . '/PreloadTest/Sub/Preload3.php'), $includes)); + $includes = get_included_files(); + self::assertTrue(\in_array(realpath(__DIR__ . '/PreloadTest/Preload1.php'), $includes)); + self::assertTrue(\in_array(realpath(__DIR__ . '/PreloadTest/Sub/Preload2.php'), $includes)); + self::assertFalse(\in_array(realpath(__DIR__ . '/PreloadTest/Sub/Preload3.php'), $includes)); } } diff --git a/tests/Router/RouteVerbTest.php b/tests/Router/RouteVerbTest.php index 71fb7a3f2..ec1bb03ce 100644 --- a/tests/Router/RouteVerbTest.php +++ b/tests/Router/RouteVerbTest.php @@ -43,6 +43,6 @@ class RouteVerbTest extends \PHPUnit\Framework\TestCase public function testEnumUnique() : void { $values = RouteVerb::getConstants(); - self::assertEquals(\count($values), \array_sum(\array_count_values($values))); + self::assertEquals(\count($values), array_sum(array_count_values($values))); } } diff --git a/tests/Security/PhpCodeTest.php b/tests/Security/PhpCodeTest.php index 13b95bdbd..c58be4338 100644 --- a/tests/Security/PhpCodeTest.php +++ b/tests/Security/PhpCodeTest.php @@ -35,7 +35,7 @@ class PhpCodeTest extends \PHPUnit\Framework\TestCase self::assertTrue( PhpCode::hasUnicode( PhpCode::normalizeSource( - \file_get_contents(__DIR__ . '/Sample/hasUnicode.php') + file_get_contents(__DIR__ . '/Sample/hasUnicode.php') ) ) ); @@ -51,7 +51,7 @@ class PhpCodeTest extends \PHPUnit\Framework\TestCase self::assertFalse( PhpCode::hasUnicode( PhpCode::normalizeSource( - \file_get_contents(__DIR__ . '/Sample/noUnicode.php') + file_get_contents(__DIR__ . '/Sample/noUnicode.php') ) ) ); @@ -78,7 +78,7 @@ class PhpCodeTest extends \PHPUnit\Framework\TestCase self::assertTrue( PhpCode::hasDeprecatedFunction( PhpCode::normalizeSource( - \file_get_contents(__DIR__ . '/Sample/hasDeprecated.php') + file_get_contents(__DIR__ . '/Sample/hasDeprecated.php') ) ) ); @@ -94,7 +94,7 @@ class PhpCodeTest extends \PHPUnit\Framework\TestCase self::assertFalse( PhpCode::hasDeprecatedFunction( PhpCode::normalizeSource( - \file_get_contents(__DIR__ . '/Sample/noDeprecated.php') + file_get_contents(__DIR__ . '/Sample/noDeprecated.php') ) ) ); @@ -107,7 +107,7 @@ class PhpCodeTest extends \PHPUnit\Framework\TestCase */ public function testFileIntegrity() : void { - self::assertTrue(PhpCode::validateFileIntegrity(__DIR__ . '/Sample/hasDeprecated.php', \md5_file(__DIR__ . '/Sample/hasDeprecated.php'))); + self::assertTrue(PhpCode::validateFileIntegrity(__DIR__ . '/Sample/hasDeprecated.php', md5_file(__DIR__ . '/Sample/hasDeprecated.php'))); } /** @@ -117,7 +117,7 @@ class PhpCodeTest extends \PHPUnit\Framework\TestCase */ public function testFileInvalidIntegrity() : void { - self::assertFalse(PhpCode::validateFileIntegrity(__DIR__ . '/Sample/hasUnicode.php', \md5_file(__DIR__ . '/Sample/hasDeprecated.php'))); + self::assertFalse(PhpCode::validateFileIntegrity(__DIR__ . '/Sample/hasUnicode.php', md5_file(__DIR__ . '/Sample/hasDeprecated.php'))); } /** diff --git a/tests/Socket/Client/ClientTest.php b/tests/Socket/Client/ClientTest.php index 818b80164..1c2e63f1e 100644 --- a/tests/Socket/Client/ClientTest.php +++ b/tests/Socket/Client/ClientTest.php @@ -36,12 +36,12 @@ class ClientTest extends \PHPUnit\Framework\TestCase public static function setUpBeforeClass() : void { - if (\is_file(__DIR__ . '/client.log')) { - \unlink(__DIR__ . '/client.log'); + if (is_file(__DIR__ . '/client.log')) { + unlink(__DIR__ . '/client.log'); } - if (\is_file(__DIR__ . '/server.log')) { - \unlink(__DIR__ . '/server.log'); + if (is_file(__DIR__ . '/server.log')) { + unlink(__DIR__ . '/server.log'); } } @@ -75,8 +75,8 @@ class ClientTest extends \PHPUnit\Framework\TestCase protected function tearDown() : void { - \unlink(__DIR__ . '/client.log'); - \unlink(__DIR__ . '/server.log'); + unlink(__DIR__ . '/client.log'); + unlink(__DIR__ . '/server.log'); } /** @@ -88,9 +88,9 @@ class ClientTest extends \PHPUnit\Framework\TestCase self::markTestIncomplete(); return; $pipes = []; - $process = \proc_open('php ClientTestHelper.php', [1 => ['pipe', 'w'], 2 => ['pipe', 'w']], $pipes, __DIR__); + $process = proc_open('php ClientTestHelper.php', [1 => ['pipe', 'w'], 2 => ['pipe', 'w']], $pipes, __DIR__); - \sleep(5); + sleep(5); $socket = new Client($this->app); $socket->create('127.0.0.1', $GLOBALS['CONFIG']['socket']['master']['port']); @@ -113,13 +113,13 @@ class ClientTest extends \PHPUnit\Framework\TestCase . 'Doing handshake...' . "\n" . 'Handshake succeeded.' . "\n" . 'Is shutdown...' . "\n", - \file_get_contents(__DIR__ . '/server.log') + file_get_contents(__DIR__ . '/server.log') ); foreach ($pipes as $pipe) { - \fclose($pipe); + fclose($pipe); } - \proc_close($process); + proc_close($process); } } diff --git a/tests/Socket/Server/ServerTest.php b/tests/Socket/Server/ServerTest.php index c3637f610..b9ec7689f 100644 --- a/tests/Socket/Server/ServerTest.php +++ b/tests/Socket/Server/ServerTest.php @@ -36,12 +36,12 @@ class ServerTest extends \PHPUnit\Framework\TestCase public static function setUpBeforeClass() : void { - if (\is_file(__DIR__ . '/client.log')) { - \unlink(__DIR__ . '/client.log'); + if (is_file(__DIR__ . '/client.log')) { + unlink(__DIR__ . '/client.log'); } - if (\is_file(__DIR__ . '/server.log')) { - \unlink(__DIR__ . '/server.log'); + if (is_file(__DIR__ . '/server.log')) { + unlink(__DIR__ . '/server.log'); } } @@ -75,8 +75,8 @@ class ServerTest extends \PHPUnit\Framework\TestCase protected function tearDown() : void { - \unlink(__DIR__ . '/client.log'); - \unlink(__DIR__ . '/server.log'); + unlink(__DIR__ . '/client.log'); + unlink(__DIR__ . '/server.log'); } /** @@ -86,7 +86,7 @@ class ServerTest extends \PHPUnit\Framework\TestCase public function testSetupTCPSocket() : void { $pipes = []; - $process = \proc_open('php ServerTestHelper.php', [1 => ['pipe', 'w'], 2 => ['pipe', 'w']], $pipes, __DIR__); + $process = proc_open('php ServerTestHelper.php', [1 => ['pipe', 'w'], 2 => ['pipe', 'w']], $pipes, __DIR__); $socket = new Server($this->app); $socket->create('127.0.0.1', $GLOBALS['CONFIG']['socket']['master']['port']); @@ -96,7 +96,7 @@ class ServerTest extends \PHPUnit\Framework\TestCase $socket->run(); - self::assertTrue(\is_file(__DIR__ . '/server.log')); + self::assertTrue(is_file(__DIR__ . '/server.log')); self::assertEquals( 'Creating socket...' . "\n" . 'Binding socket...' . "\n" @@ -107,19 +107,19 @@ class ServerTest extends \PHPUnit\Framework\TestCase . 'Doing handshake...' . "\n" . 'Handshake succeeded.' . "\n" . 'Is shutdown...' . "\n", - \file_get_contents(__DIR__ . '/server.log') + file_get_contents(__DIR__ . '/server.log') ); - self::assertTrue(\is_file(__DIR__ . '/client.log')); - $client = \file_get_contents(__DIR__ . '/client.log'); + self::assertTrue(is_file(__DIR__ . '/client.log')); + $client = file_get_contents(__DIR__ . '/client.log'); self::assertStringContainsString('Sending: handshake', $client); self::assertStringContainsString('Sending: help', $client); self::assertStringContainsString('Sending: shutdown', $client); foreach ($pipes as $pipe) { - \fclose($pipe); + fclose($pipe); } - \proc_close($process); + proc_close($process); } } diff --git a/tests/Socket/Server/ServerTestHelper.php b/tests/Socket/Server/ServerTestHelper.php index ec3c5cf56..352ba8b03 100644 --- a/tests/Socket/Server/ServerTestHelper.php +++ b/tests/Socket/Server/ServerTestHelper.php @@ -17,20 +17,20 @@ namespace phpOMS\tests\Socket\Server; require_once __DIR__ . '/../../../Autoloader.php'; $config = require_once __DIR__ . '/../../../../config.php'; -\sleep(5); +sleep(5); function handleSocketError($sock) : void { - if (\is_resource($sock) && ($err = \socket_last_error($sock)) !== 0) { - \file_put_contents(__DIR__ . '/client.log', \socket_strerror($err) . "\n", \FILE_APPEND); - \socket_clear_error(); + if (\is_resource($sock) && ($err = socket_last_error($sock)) !== 0) { + file_put_contents(__DIR__ . '/client.log', socket_strerror($err) . "\n", \FILE_APPEND); + socket_clear_error(); } } try { - $sock = @\socket_create(\AF_INET, \SOCK_STREAM, \SOL_TCP); - \socket_set_nonblock($sock); - @\socket_connect($sock, '127.0.0.1', $config['socket']['master']['port']); + $sock = @socket_create(\AF_INET, \SOCK_STREAM, \SOL_TCP); + socket_set_nonblock($sock); + @socket_connect($sock, '127.0.0.1', $config['socket']['master']['port']); handleSocketError($sock); $msgs = [ @@ -40,11 +40,11 @@ try { ]; foreach ($msgs as $msg) { - \file_put_contents(__DIR__ . '/client.log', 'Sending: ' . $msg . "\n", \FILE_APPEND); - @\socket_write($sock, $msg, \strlen($msg)); + file_put_contents(__DIR__ . '/client.log', 'Sending: ' . $msg . "\n", \FILE_APPEND); + @socket_write($sock, $msg, \strlen($msg)); handleSocketError($sock); - $data = @\socket_read($sock, 1024); + $data = @socket_read($sock, 1024); handleSocketError($sock); /* Server no data */ @@ -53,15 +53,15 @@ try { } /* Normalize */ - $data = \trim($data); + $data = trim($data); - \file_put_contents(__DIR__ . '/client.log', 'Receiving' . $data . "\n", \FILE_APPEND); + file_put_contents(__DIR__ . '/client.log', 'Receiving' . $data . "\n", \FILE_APPEND); } handleSocketError($sock); - \socket_close($sock); + socket_close($sock); } catch (\Throwable $e) { - \file_put_contents(__DIR__ . '/client.log', $e->getMessage(), \FILE_APPEND); + file_put_contents(__DIR__ . '/client.log', $e->getMessage(), \FILE_APPEND); } handleSocketError($sock); diff --git a/tests/Stdlib/Base/AddressTypeTest.php b/tests/Stdlib/Base/AddressTypeTest.php index 5a5c71e1a..f1add2182 100644 --- a/tests/Stdlib/Base/AddressTypeTest.php +++ b/tests/Stdlib/Base/AddressTypeTest.php @@ -36,7 +36,7 @@ class AddressTypeTest extends \PHPUnit\Framework\TestCase */ public function testUnique() : void { - self::assertEquals(AddressType::getConstants(), \array_unique(AddressType::getConstants())); + self::assertEquals(AddressType::getConstants(), array_unique(AddressType::getConstants())); } /** diff --git a/tests/Stdlib/Base/EnumDemo.php b/tests/Stdlib/Base/EnumDemo.php index a76b55158..aca60df3c 100644 --- a/tests/Stdlib/Base/EnumDemo.php +++ b/tests/Stdlib/Base/EnumDemo.php @@ -18,7 +18,7 @@ use phpOMS\Stdlib\Base\Enum; final class EnumDemo extends Enum { - const ENUM1 = 1; + public const ENUM1 = 1; - const ENUM2 = ';l'; + public const ENUM2 = ';l'; } diff --git a/tests/Stdlib/Base/HeapTest.php b/tests/Stdlib/Base/HeapTest.php index c01de88da..ecf3cd56e 100644 --- a/tests/Stdlib/Base/HeapTest.php +++ b/tests/Stdlib/Base/HeapTest.php @@ -84,7 +84,7 @@ class HeapTest extends \PHPUnit\Framework\TestCase { $heap = new Heap(); for ($i = 0; $i < 10; ++$i) { - $heap->push(\mt_rand()); + $heap->push(mt_rand()); } $sorted = []; @@ -93,7 +93,7 @@ class HeapTest extends \PHPUnit\Framework\TestCase } $sortedFunction = $sorted; - \sort($sortedFunction); + sort($sortedFunction); self::assertEquals($sortedFunction, $sorted); } @@ -107,7 +107,7 @@ class HeapTest extends \PHPUnit\Framework\TestCase { $heap = new Heap(function($a, $b) { return ($a <=> $b) * -1; }); for ($i = 0; $i < 10; ++$i) { - $heap->push(\mt_rand()); + $heap->push(mt_rand()); } $sorted = []; @@ -116,9 +116,9 @@ class HeapTest extends \PHPUnit\Framework\TestCase } $sortedFunction = $sorted; - \sort($sortedFunction); + sort($sortedFunction); - self::assertEquals(\array_reverse($sortedFunction), $sorted); + self::assertEquals(array_reverse($sortedFunction), $sorted); } /** @@ -167,7 +167,7 @@ class HeapTest extends \PHPUnit\Framework\TestCase self::assertEquals(1, $heap->pushpop(6)); $heapArray = $heap->toArray(); - \sort($heapArray); + sort($heapArray); self::assertEquals([2, 3, 4, 5, 6], $heapArray); } diff --git a/tests/Stdlib/Base/LocationTest.php b/tests/Stdlib/Base/LocationTest.php index deaea99d0..42321a8f7 100644 --- a/tests/Stdlib/Base/LocationTest.php +++ b/tests/Stdlib/Base/LocationTest.php @@ -215,7 +215,7 @@ class LocationTest extends \PHPUnit\Framework\TestCase $this->location->setGeo(['lat' => 12.1, 'long' => 11.2,]); self::assertEquals($expected, $this->location->jsonSerialize()); - self::assertEquals(\json_encode($this->location->jsonSerialize()), $this->location->serialize()); + self::assertEquals(json_encode($this->location->jsonSerialize()), $this->location->serialize()); } /** @@ -237,7 +237,7 @@ class LocationTest extends \PHPUnit\Framework\TestCase ], ]; - $this->location->unserialize(\json_encode($expected)); - self::assertEquals(\json_encode($expected), $this->location->serialize()); + $this->location->unserialize(json_encode($expected)); + self::assertEquals(json_encode($expected), $this->location->serialize()); } } diff --git a/tests/Stdlib/Base/PhoneTypeTest.php b/tests/Stdlib/Base/PhoneTypeTest.php index 2f8afbe51..45a942232 100644 --- a/tests/Stdlib/Base/PhoneTypeTest.php +++ b/tests/Stdlib/Base/PhoneTypeTest.php @@ -36,7 +36,7 @@ class PhoneTypeTest extends \PHPUnit\Framework\TestCase */ public function testUnique() : void { - self::assertEquals(PhoneType::getConstants(), \array_unique(PhoneType::getConstants())); + self::assertEquals(PhoneType::getConstants(), array_unique(PhoneType::getConstants())); } /** diff --git a/tests/Stdlib/Base/SmartDateTimeTest.php b/tests/Stdlib/Base/SmartDateTimeTest.php index f546ee936..5c4a378a2 100644 --- a/tests/Stdlib/Base/SmartDateTimeTest.php +++ b/tests/Stdlib/Base/SmartDateTimeTest.php @@ -112,7 +112,7 @@ class SmartDateTimeTest extends \PHPUnit\Framework\TestCase $expected = new \DateTime('now'); $obj = SmartDateTime::createFromDateTime($expected); - self::assertEquals(\date("Y-m-t", \strtotime($expected->format('Y-m-d'))), $obj->getEndOfMonth()->format('Y-m-d')); + self::assertEquals(date("Y-m-t", strtotime($expected->format('Y-m-d'))), $obj->getEndOfMonth()->format('Y-m-d')); } /** @@ -125,7 +125,7 @@ class SmartDateTimeTest extends \PHPUnit\Framework\TestCase $expected = new \DateTime('now'); $obj = SmartDateTime::createFromDateTime($expected); - self::assertEquals(\date("Y-m-01", \strtotime($expected->format('Y-m-d'))), $obj->getStartOfMonth()->format('Y-m-d')); + self::assertEquals(date("Y-m-01", strtotime($expected->format('Y-m-d'))), $obj->getStartOfMonth()->format('Y-m-d')); } /** @@ -205,8 +205,8 @@ class SmartDateTimeTest extends \PHPUnit\Framework\TestCase $expected = new \DateTime('now'); $obj = SmartDateTime::createFromDateTime($expected); - self::assertEquals(\date('w', $expected->getTimestamp()), SmartDateTime::dayOfWeek((int) $expected->format('Y'), (int) $expected->format('m'), (int) $expected->format('d'))); - self::assertEquals(\date('w', $expected->getTimestamp()), $obj->getDayOfWeek()); + self::assertEquals(date('w', $expected->getTimestamp()), SmartDateTime::dayOfWeek((int) $expected->format('Y'), (int) $expected->format('m'), (int) $expected->format('d'))); + self::assertEquals(date('w', $expected->getTimestamp()), $obj->getDayOfWeek()); } /** diff --git a/tests/Stdlib/Map/KeyTypeTest.php b/tests/Stdlib/Map/KeyTypeTest.php index f6d83f89b..c9433f4f5 100644 --- a/tests/Stdlib/Map/KeyTypeTest.php +++ b/tests/Stdlib/Map/KeyTypeTest.php @@ -36,7 +36,7 @@ class KeyTypeTest extends \PHPUnit\Framework\TestCase */ public function testUnique() : void { - self::assertEquals(KeyType::getConstants(), \array_unique(KeyType::getConstants())); + self::assertEquals(KeyType::getConstants(), array_unique(KeyType::getConstants())); } /** diff --git a/tests/Stdlib/Map/OrderTypeTest.php b/tests/Stdlib/Map/OrderTypeTest.php index 0694471f2..d4bdb1594 100644 --- a/tests/Stdlib/Map/OrderTypeTest.php +++ b/tests/Stdlib/Map/OrderTypeTest.php @@ -36,7 +36,7 @@ class OrderTypeTest extends \PHPUnit\Framework\TestCase */ public function testUnique() : void { - self::assertEquals(OrderType::getConstants(), \array_unique(OrderType::getConstants())); + self::assertEquals(OrderType::getConstants(), array_unique(OrderType::getConstants())); } /** diff --git a/tests/Stdlib/Queue/PriorityModeTest.php b/tests/Stdlib/Queue/PriorityModeTest.php index 7f6475524..13109704c 100644 --- a/tests/Stdlib/Queue/PriorityModeTest.php +++ b/tests/Stdlib/Queue/PriorityModeTest.php @@ -36,7 +36,7 @@ class PriorityModeTest extends \PHPUnit\Framework\TestCase */ public function testUnique() : void { - self::assertEquals(PriorityMode::getConstants(), \array_unique(PriorityMode::getConstants())); + self::assertEquals(PriorityMode::getConstants(), array_unique(PriorityMode::getConstants())); } /** diff --git a/tests/Stdlib/Queue/PriorityQueueTest.php b/tests/Stdlib/Queue/PriorityQueueTest.php index fcdb438a4..80175217c 100644 --- a/tests/Stdlib/Queue/PriorityQueueTest.php +++ b/tests/Stdlib/Queue/PriorityQueueTest.php @@ -151,7 +151,7 @@ class PriorityQueueTest extends \PHPUnit\Framework\TestCase ['data' => 'c', 'priority' => 1], ['data' => 'b', 'priority' => 4], ['data' => 'a', 'priority' => 3], - ], \array_values($queue->getAll()) + ], array_values($queue->getAll()) ); } diff --git a/tests/System/CharsetTypeTest.php b/tests/System/CharsetTypeTest.php index 4cb5f0599..0f5086bfe 100644 --- a/tests/System/CharsetTypeTest.php +++ b/tests/System/CharsetTypeTest.php @@ -38,7 +38,7 @@ class CharsetTypeTest extends \PHPUnit\Framework\TestCase */ public function testUnique() : void { - self::assertEquals(CharsetType::getConstants(), \array_unique(CharsetType::getConstants())); + self::assertEquals(CharsetType::getConstants(), array_unique(CharsetType::getConstants())); } /** diff --git a/tests/System/File/ContentPutModeTest.php b/tests/System/File/ContentPutModeTest.php index 17d4897e7..dd7025a24 100644 --- a/tests/System/File/ContentPutModeTest.php +++ b/tests/System/File/ContentPutModeTest.php @@ -36,7 +36,7 @@ class ContentPutModeTest extends \PHPUnit\Framework\TestCase */ public function testUnique() : void { - self::assertEquals(ContentPutMode::getConstants(), \array_unique(ContentPutMode::getConstants())); + self::assertEquals(ContentPutMode::getConstants(), array_unique(ContentPutMode::getConstants())); } /** diff --git a/tests/System/File/ExtensionTypeTest.php b/tests/System/File/ExtensionTypeTest.php index 2c142ea20..974098dce 100644 --- a/tests/System/File/ExtensionTypeTest.php +++ b/tests/System/File/ExtensionTypeTest.php @@ -36,7 +36,7 @@ class ExtensionTypeTest extends \PHPUnit\Framework\TestCase */ public function testUnique() : void { - self::assertEquals(ExtensionType::getConstants(), \array_unique(ExtensionType::getConstants())); + self::assertEquals(ExtensionType::getConstants(), array_unique(ExtensionType::getConstants())); } /** diff --git a/tests/System/File/FileUtilsTest.php b/tests/System/File/FileUtilsTest.php index bfd543eee..ad03ca09c 100644 --- a/tests/System/File/FileUtilsTest.php +++ b/tests/System/File/FileUtilsTest.php @@ -54,7 +54,7 @@ class FileUtilsTest extends \PHPUnit\Framework\TestCase */ public function testAbsolute() : void { - self::assertEquals(\realpath(__DIR__ . '/..'), FileUtils::absolute(__DIR__ . '/..')); + self::assertEquals(realpath(__DIR__ . '/..'), FileUtils::absolute(__DIR__ . '/..')); self::assertEquals('/test/ative', FileUtils::absolute('/test/path/for/../rel/../../ative')); } @@ -75,18 +75,18 @@ class FileUtilsTest extends \PHPUnit\Framework\TestCase */ public function testChangeFileEncoding() : void { - if (\is_file(__DIR__ . '/UTF-8.txt')) { - \unlink(__DIR__ . '/UTF-8.txt'); + if (is_file(__DIR__ . '/UTF-8.txt')) { + unlink(__DIR__ . '/UTF-8.txt'); } FileUtils::changeFileEncoding(__DIR__ . '/Windows-1252.txt', __DIR__ . '/UTF-8.txt', 'UTF-8', 'Windows-1252'); self::assertFileExists(__DIR__ . '/UTF-8.txt'); - self::assertNotEquals("This is a test file with some¶\ncontent Ø Æ.", \file_get_contents(__DIR__ . '/Windows-1252.txt')); - self::assertEquals("This is a test file with some¶\ncontent Ø Æ.", \file_get_contents(__DIR__ . '/UTF-8.txt')); + self::assertNotEquals("This is a test file with some¶\ncontent Ø Æ.", file_get_contents(__DIR__ . '/Windows-1252.txt')); + self::assertEquals("This is a test file with some¶\ncontent Ø Æ.", file_get_contents(__DIR__ . '/UTF-8.txt')); - if (\is_file(__DIR__ . '/UTF-8.txt')) { - \unlink(__DIR__ . '/UTF-8.txt'); + if (is_file(__DIR__ . '/UTF-8.txt')) { + unlink(__DIR__ . '/UTF-8.txt'); } } @@ -98,14 +98,14 @@ class FileUtilsTest extends \PHPUnit\Framework\TestCase public function testPathInfo() : void { self::assertEquals(__DIR__, FileUtils::mb_pathinfo(__DIR__ . '/FileUtilsTest.php', \PATHINFO_DIRNAME)); - self::assertEquals(\basename(__DIR__ . '/FileUtilsTest.php'), FileUtils::mb_pathinfo(__DIR__ . '/FileUtilsTest.php', \PATHINFO_BASENAME)); + self::assertEquals(basename(__DIR__ . '/FileUtilsTest.php'), FileUtils::mb_pathinfo(__DIR__ . '/FileUtilsTest.php', \PATHINFO_BASENAME)); self::assertEquals('php', FileUtils::mb_pathinfo(__DIR__ . '/FileUtilsTest.php', \PATHINFO_EXTENSION)); self::assertEquals('FileUtilsTest', FileUtils::mb_pathinfo(__DIR__ . '/FileUtilsTest.php', \PATHINFO_FILENAME)); self::assertEquals( [ 'dirname' => __DIR__, - 'basename' => \basename(__DIR__ . '/FileUtilsTest.php'), + 'basename' => basename(__DIR__ . '/FileUtilsTest.php'), 'extension' => 'php', 'filename' => 'FileUtilsTest', ], diff --git a/tests/System/File/Ftp/DirectoryTest.php b/tests/System/File/Ftp/DirectoryTest.php index 78f1b9c56..8afceb4c4 100644 --- a/tests/System/File/Ftp/DirectoryTest.php +++ b/tests/System/File/Ftp/DirectoryTest.php @@ -24,7 +24,7 @@ use phpOMS\Uri\HttpUri; */ class DirectoryTest extends \PHPUnit\Framework\TestCase { - const BASE = 'ftp://test:123456@127.0.0.1:20'; + public const BASE = 'ftp://test:123456@127.0.0.1:20'; private static $con = null; @@ -44,11 +44,11 @@ class DirectoryTest extends \PHPUnit\Framework\TestCase ); } else { try { - $mkdir = \ftp_mkdir(self::$con, '0xFF'); - \ftp_rmdir(self::$con, '0xFF'); + $mkdir = ftp_mkdir(self::$con, '0xFF'); + ftp_rmdir(self::$con, '0xFF'); - $put = \ftp_put(self::$con, '0x00'); - \ftp_delete(self::$con, '0x00'); + $put = ftp_put(self::$con, '0x00'); + ftp_delete(self::$con, '0x00'); if (!$mkdir || !$put) { throw new \Exception(); @@ -88,9 +88,9 @@ class DirectoryTest extends \PHPUnit\Framework\TestCase { $dirPath = __DIR__ . '/test'; self::assertTrue(Directory::create(self::$con, $dirPath)); - self::assertTrue(\is_dir($dirPath)); + self::assertTrue(is_dir($dirPath)); - \rmdir($dirPath); + rmdir($dirPath); } /** @@ -115,7 +115,7 @@ class DirectoryTest extends \PHPUnit\Framework\TestCase self::assertTrue(Directory::create(self::$con, $dirPath)); self::assertFalse(Directory::create(self::$con, $dirPath)); - \rmdir($dirPath); + rmdir($dirPath); } /** @@ -189,7 +189,7 @@ class DirectoryTest extends \PHPUnit\Framework\TestCase { $dirPath = __DIR__ . '/test'; - self::assertEquals(\str_replace('\\', '/', \realpath(__DIR__)), Directory::parent($dirPath)); + self::assertEquals(str_replace('\\', '/', realpath(__DIR__)), Directory::parent($dirPath)); } /** @@ -595,14 +595,14 @@ class DirectoryTest extends \PHPUnit\Framework\TestCase $dir = new Directory(new HttpUri(self::BASE . __DIR__), '*', true, self::$con); $dir->addNode(new Directory(new HttpUri(self::BASE . __DIR__ . '/nodedir'))); - self::assertTrue(\is_dir(__DIR__ . '/nodedir')); - \rmdir(__DIR__ . '/nodedir'); + self::assertTrue(is_dir(__DIR__ . '/nodedir')); + rmdir(__DIR__ . '/nodedir'); $dir = new Directory(new HttpUri(self::BASE . __DIR__ . '/nodedir2'), '*', true, self::$con); $dir->createNode(); - self::assertTrue(\is_dir(__DIR__ . '/nodedir2')); - \rmdir(__DIR__ . '/nodedir2'); + self::assertTrue(is_dir(__DIR__ . '/nodedir2')); + rmdir(__DIR__ . '/nodedir2'); } /** @@ -614,11 +614,11 @@ class DirectoryTest extends \PHPUnit\Framework\TestCase $dir = new Directory(new HttpUri(self::BASE . __DIR__), '*', true, self::$con); $dir->addNode(new Directory(new HttpUri(self::BASE . __DIR__ . '/nodedir'))); - self::assertTrue(\is_dir(__DIR__ . '/nodedir')); + self::assertTrue(is_dir(__DIR__ . '/nodedir')); self::assertTrue($dir->getNode('nodedir')->deleteNode()); - \clearstatcache(); - self::assertFalse(\is_dir(__DIR__ . '/nodedir')); + clearstatcache(); + self::assertFalse(is_dir(__DIR__ . '/nodedir')); } /** @@ -631,10 +631,10 @@ class DirectoryTest extends \PHPUnit\Framework\TestCase $dir->addNode(new Directory(new HttpUri(self::BASE . __DIR__ . '/nodedir'))); $dir->getNode('nodedir')->copyNode(__DIR__ . '/nodedir2'); - self::assertTrue(\is_dir(__DIR__ . '/nodedir2')); + self::assertTrue(is_dir(__DIR__ . '/nodedir2')); - \rmdir(__DIR__ . '/nodedir'); - \rmdir(__DIR__ . '/nodedir2'); + rmdir(__DIR__ . '/nodedir'); + rmdir(__DIR__ . '/nodedir2'); } /** @@ -647,10 +647,10 @@ class DirectoryTest extends \PHPUnit\Framework\TestCase $dir->addNode(new Directory(new HttpUri(self::BASE . __DIR__ . '/nodedir'))); $dir->getNode('nodedir')->moveNode(__DIR__ . '/nodedir2'); - self::assertFalse(\is_dir(__DIR__ . '/nodedir')); - self::assertTrue(\is_dir(__DIR__ . '/nodedir2')); + self::assertFalse(is_dir(__DIR__ . '/nodedir')); + self::assertTrue(is_dir(__DIR__ . '/nodedir2')); - \rmdir(__DIR__ . '/nodedir2'); + rmdir(__DIR__ . '/nodedir2'); } /** @@ -734,13 +734,13 @@ class DirectoryTest extends \PHPUnit\Framework\TestCase $dir = new Directory(new HttpUri(self::BASE . __DIR__), '*', true, self::$con); $dir[] = new Directory(new HttpUri(self::BASE . __DIR__ . '/nodedir')); - self::assertTrue(\is_dir(__DIR__ . '/nodedir')); - \rmdir(__DIR__ . '/nodedir'); + self::assertTrue(is_dir(__DIR__ . '/nodedir')); + rmdir(__DIR__ . '/nodedir'); $dir['nodedir'] = new Directory(new HttpUri(self::BASE . __DIR__ . '/nodedir')); - self::assertTrue(\is_dir(__DIR__ . '/nodedir')); - \rmdir(__DIR__ . '/nodedir'); + self::assertTrue(is_dir(__DIR__ . '/nodedir')); + rmdir(__DIR__ . '/nodedir'); } /** @@ -752,11 +752,11 @@ class DirectoryTest extends \PHPUnit\Framework\TestCase $dir = new Directory(new HttpUri(self::BASE . __DIR__), '*', true, self::$con); $dir->addNode(new Directory(new HttpUri(self::BASE . __DIR__ . '/nodedir'))); - self::assertTrue(\is_dir(__DIR__ . '/nodedir')); + self::assertTrue(is_dir(__DIR__ . '/nodedir')); unset($dir['nodedir']); - \clearstatcache(); - self::assertFalse(\is_dir(__DIR__ . '/nodedir')); + clearstatcache(); + self::assertFalse(is_dir(__DIR__ . '/nodedir')); } /** @@ -785,7 +785,7 @@ class DirectoryTest extends \PHPUnit\Framework\TestCase $now = new \DateTime('now'); self::assertEquals($now->format('Y-m-d'), $dir->getCreatedAt()->format('Y-m-d')); - \rmdir($dirPath); + rmdir($dirPath); } /** @@ -802,7 +802,7 @@ class DirectoryTest extends \PHPUnit\Framework\TestCase $now = new \DateTime('now'); self::assertEquals($now->format('Y-m-d'), $dir->getChangedAt()->format('Y-m-d')); - \rmdir($dirPath); + rmdir($dirPath); } /** diff --git a/tests/System/File/Ftp/FileTest.php b/tests/System/File/Ftp/FileTest.php index 22327e3ec..035de1553 100644 --- a/tests/System/File/Ftp/FileTest.php +++ b/tests/System/File/Ftp/FileTest.php @@ -26,7 +26,7 @@ use phpOMS\Uri\HttpUri; */ class FileTest extends \PHPUnit\Framework\TestCase { - const BASE = 'ftp://test:123456@127.0.0.1:20'; + public const BASE = 'ftp://test:123456@127.0.0.1:20'; private static $con = null; @@ -46,11 +46,11 @@ class FileTest extends \PHPUnit\Framework\TestCase ); } else { try { - $mkdir = \ftp_mkdir(self::$con, '0xFF'); - \ftp_rmdir(self::$con, '0xFF'); + $mkdir = ftp_mkdir(self::$con, '0xFF'); + ftp_rmdir(self::$con, '0xFF'); - $put = \ftp_put(self::$con, '0x00'); - \ftp_delete(self::$con, '0x00'); + $put = ftp_put(self::$con, '0x00'); + ftp_delete(self::$con, '0x00'); if (!$mkdir || !$put) { throw new \Exception(); @@ -90,8 +90,8 @@ class FileTest extends \PHPUnit\Framework\TestCase { $testFile = __DIR__ . '/test.txt'; self::assertTrue(File::create(self::$con, $testFile)); - self::assertTrue(\is_file($testFile)); - self::assertEquals('', \file_get_contents($testFile)); + self::assertTrue(is_file($testFile)); + self::assertEquals('', file_get_contents($testFile)); File::delete(self::$con, $testFile); } @@ -106,7 +106,7 @@ class FileTest extends \PHPUnit\Framework\TestCase $testFile = __DIR__ . '/test.txt'; self::assertTrue(File::create(self::$con, $testFile)); self::assertFalse(File::create(self::$con, $testFile)); - self::assertTrue(\is_file($testFile)); + self::assertTrue(is_file($testFile)); File::delete(self::$con, $testFile); } @@ -120,8 +120,8 @@ class FileTest extends \PHPUnit\Framework\TestCase { $testFile = __DIR__ . '/test.txt'; self::assertTrue(File::put(self::$con, $testFile, 'test', ContentPutMode::CREATE)); - self::assertTrue(\is_file($testFile)); - self::assertEquals('test', \file_get_contents($testFile)); + self::assertTrue(is_file($testFile)); + self::assertEquals('test', file_get_contents($testFile)); File::delete(self::$con, $testFile); } @@ -135,7 +135,7 @@ class FileTest extends \PHPUnit\Framework\TestCase { $testFile = __DIR__ . '/test.txt'; self::assertFalse(File::put(self::$con, $testFile, 'test', ContentPutMode::REPLACE)); - self::assertfalse(\is_file($testFile)); + self::assertfalse(is_file($testFile)); } /** @@ -147,7 +147,7 @@ class FileTest extends \PHPUnit\Framework\TestCase { $testFile = __DIR__ . '/test.txt'; self::assertFalse(File::put(self::$con, $testFile, 'test', ContentPutMode::APPEND)); - self::assertfalse(\is_file($testFile)); + self::assertfalse(is_file($testFile)); } /** @@ -159,7 +159,7 @@ class FileTest extends \PHPUnit\Framework\TestCase { $testFile = __DIR__ . '/test.txt'; self::assertFalse(File::put(self::$con, $testFile, 'test', ContentPutMode::PREPEND)); - self::assertfalse(\is_file($testFile)); + self::assertfalse(is_file($testFile)); } /** @@ -184,7 +184,7 @@ class FileTest extends \PHPUnit\Framework\TestCase self::assertTrue(File::put(self::$con, $testFile, 'test', ContentPutMode::CREATE)); self::assertTrue(File::put(self::$con, $testFile, 'test2', ContentPutMode::REPLACE)); - self::assertEquals('test2', \file_get_contents($testFile)); + self::assertEquals('test2', file_get_contents($testFile)); File::delete(self::$con, $testFile); } @@ -200,7 +200,7 @@ class FileTest extends \PHPUnit\Framework\TestCase self::assertTrue(File::put(self::$con, $testFile, 'test', ContentPutMode::CREATE)); self::assertTrue(File::set(self::$con, $testFile, 'test2')); - self::assertEquals('test2', \file_get_contents($testFile)); + self::assertEquals('test2', file_get_contents($testFile)); File::delete(self::$con, $testFile); } @@ -216,7 +216,7 @@ class FileTest extends \PHPUnit\Framework\TestCase self::assertTrue(File::put(self::$con, $testFile, 'test', ContentPutMode::CREATE)); self::assertTrue(File::put(self::$con, $testFile, 'test2', ContentPutMode::APPEND)); - self::assertEquals('testtest2', \file_get_contents($testFile)); + self::assertEquals('testtest2', file_get_contents($testFile)); File::delete(self::$con, $testFile); } @@ -232,7 +232,7 @@ class FileTest extends \PHPUnit\Framework\TestCase self::assertTrue(File::put(self::$con, $testFile, 'test', ContentPutMode::CREATE)); self::assertTrue(File::append(self::$con, $testFile, 'test2')); - self::assertEquals('testtest2', \file_get_contents($testFile)); + self::assertEquals('testtest2', file_get_contents($testFile)); File::delete(self::$con, $testFile); } @@ -248,7 +248,7 @@ class FileTest extends \PHPUnit\Framework\TestCase self::assertTrue(File::put(self::$con, $testFile, 'test', ContentPutMode::CREATE)); self::assertTrue(File::put(self::$con, $testFile, 'test2', ContentPutMode::PREPEND)); - self::assertEquals('test2test', \file_get_contents($testFile)); + self::assertEquals('test2test', file_get_contents($testFile)); File::delete(self::$con, $testFile); } @@ -264,7 +264,7 @@ class FileTest extends \PHPUnit\Framework\TestCase self::assertTrue(File::put(self::$con, $testFile, 'test', ContentPutMode::CREATE)); self::assertTrue(File::prepend(self::$con, $testFile, 'test2')); - self::assertEquals('test2test', \file_get_contents($testFile)); + self::assertEquals('test2test', file_get_contents($testFile)); File::delete(self::$con, $testFile); } @@ -292,7 +292,7 @@ class FileTest extends \PHPUnit\Framework\TestCase { $testFile = __DIR__ . '/test.txt'; - self::assertEquals(\str_replace('\\', '/', \realpath(__DIR__ . '/../')), File::parent($testFile)); + self::assertEquals(str_replace('\\', '/', realpath(__DIR__ . '/../')), File::parent($testFile)); } /** @@ -340,7 +340,7 @@ class FileTest extends \PHPUnit\Framework\TestCase { $testFile = __DIR__ . '/test.txt'; - self::assertEquals(\basename(\realpath(__DIR__)), File::dirname($testFile)); + self::assertEquals(basename(realpath(__DIR__)), File::dirname($testFile)); } /** @@ -352,7 +352,7 @@ class FileTest extends \PHPUnit\Framework\TestCase { $testFile = __DIR__ . '/test.txt'; - self::assertEquals(\realpath(__DIR__), File::dirpath($testFile)); + self::assertEquals(realpath(__DIR__), File::dirpath($testFile)); } /** @@ -702,15 +702,15 @@ class FileTest extends \PHPUnit\Framework\TestCase public function testNodeInputOutput() : void { $testFile = __DIR__ . '/test.txt'; - if (\is_file($testFile)) { - \unlink($testFile); + if (is_file($testFile)) { + unlink($testFile); } $file = new File(new HttpUri(self::BASE . $testFile), self::$con); self::assertTrue($file->setContent('test')); self::assertEquals('test', $file->getContent()); - \unlink($testFile); + unlink($testFile); } /** @@ -720,8 +720,8 @@ class FileTest extends \PHPUnit\Framework\TestCase public function testNodeReplace() : void { $testFile = __DIR__ . '/test.txt'; - if (\is_file($testFile)) { - \unlink($testFile); + if (is_file($testFile)) { + unlink($testFile); } $file = new File(new HttpUri(self::BASE . $testFile), self::$con); @@ -729,7 +729,7 @@ class FileTest extends \PHPUnit\Framework\TestCase self::assertTrue($file->setContent('test2')); self::assertEquals('test2', $file->getContent()); - \unlink($testFile); + unlink($testFile); } /** @@ -739,8 +739,8 @@ class FileTest extends \PHPUnit\Framework\TestCase public function testNodeAppend() : void { $testFile = __DIR__ . '/test.txt'; - if (\is_file($testFile)) { - \unlink($testFile); + if (is_file($testFile)) { + unlink($testFile); } $file = new File(new HttpUri(self::BASE . $testFile), self::$con); @@ -748,7 +748,7 @@ class FileTest extends \PHPUnit\Framework\TestCase self::assertTrue($file->appendContent('2')); self::assertEquals('test2', $file->getContent()); - \unlink($testFile); + unlink($testFile); } /** @@ -758,8 +758,8 @@ class FileTest extends \PHPUnit\Framework\TestCase public function testNodePrepend() : void { $testFile = __DIR__ . '/test.txt'; - if (\is_file($testFile)) { - \unlink($testFile); + if (is_file($testFile)) { + unlink($testFile); } $file = new File(new HttpUri(self::BASE . $testFile), self::$con); @@ -767,7 +767,7 @@ class FileTest extends \PHPUnit\Framework\TestCase self::assertTrue($file->prependContent('2')); self::assertEquals('2test', $file->getContent()); - \unlink($testFile); + unlink($testFile); } /** @@ -789,8 +789,8 @@ class FileTest extends \PHPUnit\Framework\TestCase public function testNodeCreatedAt() : void { $testFile = __DIR__ . '/test.txt'; - if (\is_file($testFile)) { - \unlink($testFile); + if (is_file($testFile)) { + unlink($testFile); } $file = new File(new HttpUri(self::BASE . $testFile), self::$con); @@ -800,7 +800,7 @@ class FileTest extends \PHPUnit\Framework\TestCase $now = new \DateTime('now'); self::assertEquals($now->format('Y-m-d'), $file->getCreatedAt()->format('Y-m-d')); - \unlink($testFile); + unlink($testFile); } /** @@ -810,8 +810,8 @@ class FileTest extends \PHPUnit\Framework\TestCase public function testNodeChangedAt() : void { $testFile = __DIR__ . '/test.txt'; - if (\is_file($testFile)) { - \unlink($testFile); + if (is_file($testFile)) { + unlink($testFile); } $file = new File(new HttpUri(self::BASE . $testFile), self::$con); @@ -821,7 +821,7 @@ class FileTest extends \PHPUnit\Framework\TestCase $now = new \DateTime('now'); self::assertEquals($now->format('Y-m-d'), $file->getChangedAt()->format('Y-m-d')); - \unlink($testFile); + unlink($testFile); } /** @@ -915,16 +915,16 @@ class FileTest extends \PHPUnit\Framework\TestCase public function testNodeCreate() : void { $testFile = __DIR__ . '/test.txt'; - if (\is_file($testFile)) { - \unlink($testFile); + if (is_file($testFile)) { + unlink($testFile); } $file = new File(new HttpUri(self::BASE . $testFile), self::$con); $file->createNode(); - self::assertTrue(\is_file($testFile)); + self::assertTrue(is_file($testFile)); - \unlink($testFile); + unlink($testFile); } /** @@ -934,18 +934,18 @@ class FileTest extends \PHPUnit\Framework\TestCase public function testNodeDelete() : void { $testFile = __DIR__ . '/test.txt'; - if (\is_file($testFile)) { - \unlink($testFile); + if (is_file($testFile)) { + unlink($testFile); } $file = new File(new HttpUri(self::BASE . $testFile), self::$con); $file->createNode(); - self::assertTrue(\is_file($testFile)); + self::assertTrue(is_file($testFile)); self::assertTrue($file->deleteNode()); - \clearstatcache(); - self::assertFalse(\is_file($testFile)); + clearstatcache(); + self::assertFalse(is_file($testFile)); } /** @@ -955,19 +955,19 @@ class FileTest extends \PHPUnit\Framework\TestCase public function testNodeCopy() : void { $testFile = __DIR__ . '/test.txt'; - if (\is_file($testFile)) { - \unlink($testFile); + if (is_file($testFile)) { + unlink($testFile); } $file = new File(new HttpUri(self::BASE . $testFile), self::$con); $file->createNode(); self::assertTrue($file->copyNode(__DIR__ . '/test2.txt')); - self::assertTrue(\is_file($testFile)); - self::assertTrue(\is_file(__DIR__ . '/test2.txt')); + self::assertTrue(is_file($testFile)); + self::assertTrue(is_file(__DIR__ . '/test2.txt')); - \unlink($testFile); - \unlink(__DIR__ . '/test2.txt'); + unlink($testFile); + unlink(__DIR__ . '/test2.txt'); } /** @@ -977,18 +977,18 @@ class FileTest extends \PHPUnit\Framework\TestCase public function testNodeMove() : void { $testFile = __DIR__ . '/test.txt'; - if (\is_file($testFile)) { - \unlink($testFile); + if (is_file($testFile)) { + unlink($testFile); } $file = new File(new HttpUri(self::BASE . $testFile), self::$con); $file->createNode(); self::assertTrue($file->moveNode(__DIR__ . '/test2.txt')); - self::assertFalse(\is_file($testFile)); - self::assertTrue(\is_file(__DIR__ . '/test2.txt')); + self::assertFalse(is_file($testFile)); + self::assertTrue(is_file(__DIR__ . '/test2.txt')); - \unlink(__DIR__ . '/test2.txt'); + unlink(__DIR__ . '/test2.txt'); } /** diff --git a/tests/System/File/Ftp/FtpStorageTest.php b/tests/System/File/Ftp/FtpStorageTest.php index 1976d7bc5..9fcce16e7 100644 --- a/tests/System/File/Ftp/FtpStorageTest.php +++ b/tests/System/File/Ftp/FtpStorageTest.php @@ -27,7 +27,7 @@ use phpOMS\Uri\HttpUri; */ class FtpStorageTest extends \PHPUnit\Framework\TestCase { - const BASE = 'ftp://test:123456@127.0.0.1:20'; + public const BASE = 'ftp://test:123456@127.0.0.1:20'; private static $con = null; @@ -47,11 +47,11 @@ class FtpStorageTest extends \PHPUnit\Framework\TestCase ); } else { try { - $mkdir = \ftp_mkdir(self::$con, '0xFF'); - \ftp_rmdir(self::$con, '0xFF'); + $mkdir = ftp_mkdir(self::$con, '0xFF'); + ftp_rmdir(self::$con, '0xFF'); - $put = \ftp_put(self::$con, '0x00'); - \ftp_delete(self::$con, '0x00'); + $put = ftp_put(self::$con, '0x00'); + ftp_delete(self::$con, '0x00'); if (!$mkdir || !$put) { throw new \Exception(); @@ -75,7 +75,7 @@ class FtpStorageTest extends \PHPUnit\Framework\TestCase { $dirPath = __DIR__ . '/test'; self::assertTrue(FtpStorage::create($dirPath)); - self::assertTrue(\is_dir($dirPath)); + self::assertTrue(is_dir($dirPath)); Directory::delete(self::$con, $dirPath); } @@ -166,7 +166,7 @@ class FtpStorageTest extends \PHPUnit\Framework\TestCase { $dirPath = __DIR__ . '/test'; - self::assertEquals(\str_replace('\\', '/', \realpath(__DIR__)), FtpStorage::parent($dirPath)); + self::assertEquals(str_replace('\\', '/', realpath(__DIR__)), FtpStorage::parent($dirPath)); } /** @@ -448,10 +448,10 @@ class FtpStorageTest extends \PHPUnit\Framework\TestCase { $testFile = __DIR__ . '/test.txt'; self::assertTrue(FtpStorage::create($testFile)); - self::assertTrue(\is_file($testFile)); - self::assertEquals('', \file_get_contents($testFile)); + self::assertTrue(is_file($testFile)); + self::assertEquals('', file_get_contents($testFile)); - \unlink($testFile); + unlink($testFile); } /** @@ -464,9 +464,9 @@ class FtpStorageTest extends \PHPUnit\Framework\TestCase $testFile = __DIR__ . '/test.txt'; self::assertTrue(FtpStorage::create($testFile)); self::assertFalse(FtpStorage::create($testFile)); - self::assertTrue(\is_file($testFile)); + self::assertTrue(is_file($testFile)); - \unlink($testFile); + unlink($testFile); } /** @@ -478,10 +478,10 @@ class FtpStorageTest extends \PHPUnit\Framework\TestCase { $testFile = __DIR__ . '/test.txt'; self::assertTrue(FtpStorage::put($testFile, 'test', ContentPutMode::CREATE)); - self::assertTrue(\is_file($testFile)); - self::assertEquals('test', \file_get_contents($testFile)); + self::assertTrue(is_file($testFile)); + self::assertEquals('test', file_get_contents($testFile)); - \unlink($testFile); + unlink($testFile); } /** @@ -493,7 +493,7 @@ class FtpStorageTest extends \PHPUnit\Framework\TestCase { $testFile = __DIR__ . '/test.txt'; self::assertFalse(FtpStorage::put($testFile, 'test', ContentPutMode::REPLACE)); - self::assertfalse(\is_file($testFile)); + self::assertfalse(is_file($testFile)); } /** @@ -505,7 +505,7 @@ class FtpStorageTest extends \PHPUnit\Framework\TestCase { $testFile = __DIR__ . '/test.txt'; self::assertFalse(FtpStorage::put($testFile, 'test', ContentPutMode::APPEND)); - self::assertfalse(\is_file($testFile)); + self::assertfalse(is_file($testFile)); } /** @@ -517,7 +517,7 @@ class FtpStorageTest extends \PHPUnit\Framework\TestCase { $testFile = __DIR__ . '/test.txt'; self::assertFalse(FtpStorage::put($testFile, 'test', ContentPutMode::PREPEND)); - self::assertfalse(\is_file($testFile)); + self::assertfalse(is_file($testFile)); } /** @@ -542,9 +542,9 @@ class FtpStorageTest extends \PHPUnit\Framework\TestCase self::assertTrue(FtpStorage::put($testFile, 'test', ContentPutMode::CREATE)); self::assertTrue(FtpStorage::put($testFile, 'test2', ContentPutMode::REPLACE)); - self::assertEquals('test2', \file_get_contents($testFile)); + self::assertEquals('test2', file_get_contents($testFile)); - \unlink($testFile); + unlink($testFile); } /** @@ -558,9 +558,9 @@ class FtpStorageTest extends \PHPUnit\Framework\TestCase self::assertTrue(FtpStorage::put($testFile, 'test', ContentPutMode::CREATE)); self::assertTrue(FtpStorage::set($testFile, 'test2')); - self::assertEquals('test2', \file_get_contents($testFile)); + self::assertEquals('test2', file_get_contents($testFile)); - \unlink($testFile); + unlink($testFile); } /** @@ -574,9 +574,9 @@ class FtpStorageTest extends \PHPUnit\Framework\TestCase self::assertTrue(FtpStorage::put($testFile, 'test', ContentPutMode::CREATE)); self::assertTrue(FtpStorage::put($testFile, 'test2', ContentPutMode::APPEND)); - self::assertEquals('testtest2', \file_get_contents($testFile)); + self::assertEquals('testtest2', file_get_contents($testFile)); - \unlink($testFile); + unlink($testFile); } /** @@ -590,9 +590,9 @@ class FtpStorageTest extends \PHPUnit\Framework\TestCase self::assertTrue(FtpStorage::put($testFile, 'test', ContentPutMode::CREATE)); self::assertTrue(FtpStorage::append($testFile, 'test2')); - self::assertEquals('testtest2', \file_get_contents($testFile)); + self::assertEquals('testtest2', file_get_contents($testFile)); - \unlink($testFile); + unlink($testFile); } /** @@ -606,9 +606,9 @@ class FtpStorageTest extends \PHPUnit\Framework\TestCase self::assertTrue(FtpStorage::put($testFile, 'test', ContentPutMode::CREATE)); self::assertTrue(FtpStorage::put($testFile, 'test2', ContentPutMode::PREPEND)); - self::assertEquals('test2test', \file_get_contents($testFile)); + self::assertEquals('test2test', file_get_contents($testFile)); - \unlink($testFile); + unlink($testFile); } /** @@ -622,9 +622,9 @@ class FtpStorageTest extends \PHPUnit\Framework\TestCase self::assertTrue(FtpStorage::put($testFile, 'test', ContentPutMode::CREATE)); self::assertTrue(FtpStorage::prepend($testFile, 'test2')); - self::assertEquals('test2test', \file_get_contents($testFile)); + self::assertEquals('test2test', file_get_contents($testFile)); - \unlink($testFile); + unlink($testFile); } /** @@ -638,7 +638,7 @@ class FtpStorageTest extends \PHPUnit\Framework\TestCase self::assertTrue(FtpStorage::put($testFile, 'test', ContentPutMode::CREATE)); self::assertEquals('test', FtpStorage::get($testFile)); - \unlink($testFile); + unlink($testFile); } /** @@ -650,7 +650,7 @@ class FtpStorageTest extends \PHPUnit\Framework\TestCase { $testFile = __DIR__ . '/test.txt'; - self::assertEquals(\str_replace('\\', '/', \realpath(__DIR__ . '/../')), FtpStorage::parent($testFile)); + self::assertEquals(str_replace('\\', '/', realpath(__DIR__ . '/../')), FtpStorage::parent($testFile)); } /** @@ -698,7 +698,7 @@ class FtpStorageTest extends \PHPUnit\Framework\TestCase { $testFile = __DIR__ . '/test.txt'; - self::assertEquals(\basename(\realpath(__DIR__)), FtpStorage::dirname($testFile)); + self::assertEquals(basename(realpath(__DIR__)), FtpStorage::dirname($testFile)); } /** @@ -710,7 +710,7 @@ class FtpStorageTest extends \PHPUnit\Framework\TestCase { $testFile = __DIR__ . '/test.txt'; - self::assertEquals(\realpath(__DIR__), FtpStorage::dirpath($testFile)); + self::assertEquals(realpath(__DIR__), FtpStorage::dirpath($testFile)); } /** @@ -738,7 +738,7 @@ class FtpStorageTest extends \PHPUnit\Framework\TestCase $now = new \DateTime('now'); self::assertEquals($now->format('Y-m-d'), FtpStorage::created($testFile)->format('Y-m-d')); - \unlink($testFile); + unlink($testFile); } /** @@ -754,7 +754,7 @@ class FtpStorageTest extends \PHPUnit\Framework\TestCase $now = new \DateTime('now'); self::assertEquals($now->format('Y-m-d'), FtpStorage::changed($testFile)->format('Y-m-d')); - \unlink($testFile); + unlink($testFile); } /** @@ -795,7 +795,7 @@ class FtpStorageTest extends \PHPUnit\Framework\TestCase self::assertGreaterThan(0, FtpStorage::size($testFile)); - \unlink($testFile); + unlink($testFile); } /** @@ -810,7 +810,7 @@ class FtpStorageTest extends \PHPUnit\Framework\TestCase self::assertGreaterThan(0, FtpStorage::permission($testFile)); - \unlink($testFile); + unlink($testFile); } /** diff --git a/tests/System/File/Local/DirectoryTest.php b/tests/System/File/Local/DirectoryTest.php index a10b17b0b..4044a88e2 100644 --- a/tests/System/File/Local/DirectoryTest.php +++ b/tests/System/File/Local/DirectoryTest.php @@ -32,9 +32,9 @@ class DirectoryTest extends \PHPUnit\Framework\TestCase { $dirPath = __DIR__ . '/test'; self::assertTrue(Directory::create($dirPath)); - self::assertTrue(\is_dir($dirPath)); + self::assertTrue(is_dir($dirPath)); - \rmdir($dirPath); + rmdir($dirPath); } /** @@ -59,7 +59,7 @@ class DirectoryTest extends \PHPUnit\Framework\TestCase self::assertTrue(Directory::create($dirPath)); self::assertFalse(Directory::create($dirPath)); - \rmdir($dirPath); + rmdir($dirPath); } /** @@ -73,9 +73,9 @@ class DirectoryTest extends \PHPUnit\Framework\TestCase self::assertTrue(Directory::create($dirPath, 0755, true)); self::assertTrue(Directory::exists($dirPath)); - \rmdir(__DIR__ . '/test/sub/path'); - \rmdir(__DIR__ . '/test/sub'); - \rmdir(__DIR__ . '/test'); + rmdir(__DIR__ . '/test/sub/path'); + rmdir(__DIR__ . '/test/sub'); + rmdir(__DIR__ . '/test'); } /** @@ -133,7 +133,7 @@ class DirectoryTest extends \PHPUnit\Framework\TestCase { $dirPath = __DIR__ . '/test'; - self::assertEquals(\str_replace('\\', '/', \realpath(__DIR__)), Directory::parent($dirPath)); + self::assertEquals(str_replace('\\', '/', realpath(__DIR__)), Directory::parent($dirPath)); } /** @@ -162,7 +162,7 @@ class DirectoryTest extends \PHPUnit\Framework\TestCase $now = new \DateTime('now'); self::assertEquals($now->format('Y-m-d'), Directory::created($dirPath)->format('Y-m-d')); - \rmdir($dirPath); + rmdir($dirPath); } /** @@ -179,7 +179,7 @@ class DirectoryTest extends \PHPUnit\Framework\TestCase $now = new \DateTime('now'); self::assertEquals($now->format('Y-m-d'), Directory::changed($dirPath)->format('Y-m-d')); - \rmdir($dirPath); + rmdir($dirPath); } /** @@ -320,7 +320,7 @@ class DirectoryTest extends \PHPUnit\Framework\TestCase self::assertFileExists(__DIR__ . '/parent/newdirtest/sub/path/test3.txt'); Directory::move(__DIR__ . '/parent/newdirtest', $dirTestPath); - \rmdir(__DIR__ . '/parent'); + rmdir(__DIR__ . '/parent'); } /** @@ -398,7 +398,7 @@ class DirectoryTest extends \PHPUnit\Framework\TestCase { $dirTestPath = __DIR__ . '/dirtest'; self::assertCount(6, Directory::list($dirTestPath, '*', true)); - self::assertEquals([], \array_diff(['sub/test2.txt', 'sub/test4.md', 'sub/path/test3.txt'], Directory::list($dirTestPath, 'test[0-9]+.*', true))); + self::assertEquals([], array_diff(['sub/test2.txt', 'sub/test4.md', 'sub/path/test3.txt'], Directory::list($dirTestPath, 'test[0-9]+.*', true))); self::assertCount(2, Directory::list($dirTestPath, '*', false)); } @@ -547,14 +547,14 @@ class DirectoryTest extends \PHPUnit\Framework\TestCase $dir = new Directory(__DIR__); $dir->addNode(new Directory(__DIR__ . '/nodedir')); - self::assertTrue(\is_dir(__DIR__ . '/nodedir')); - \rmdir(__DIR__ . '/nodedir'); + self::assertTrue(is_dir(__DIR__ . '/nodedir')); + rmdir(__DIR__ . '/nodedir'); $dir = new Directory(__DIR__ . '/nodedir2'); $dir->createNode(); - self::assertTrue(\is_dir(__DIR__ . '/nodedir2')); - \rmdir(__DIR__ . '/nodedir2'); + self::assertTrue(is_dir(__DIR__ . '/nodedir2')); + rmdir(__DIR__ . '/nodedir2'); } /** @@ -566,9 +566,9 @@ class DirectoryTest extends \PHPUnit\Framework\TestCase $dir = new Directory(__DIR__); $dir->addNode(new Directory(__DIR__ . '/nodedir')); - self::assertTrue(\is_dir(__DIR__ . '/nodedir')); + self::assertTrue(is_dir(__DIR__ . '/nodedir')); self::assertTrue($dir->getNode('nodedir')->deleteNode()); - self::assertFalse(\is_dir(__DIR__ . '/nodedir')); + self::assertFalse(is_dir(__DIR__ . '/nodedir')); } /** @@ -581,10 +581,10 @@ class DirectoryTest extends \PHPUnit\Framework\TestCase $dir->addNode(new Directory(__DIR__ . '/nodedir')); $dir->getNode('nodedir')->copyNode(__DIR__ . '/nodedir2'); - self::assertTrue(\is_dir(__DIR__ . '/nodedir2')); + self::assertTrue(is_dir(__DIR__ . '/nodedir2')); - \rmdir(__DIR__ . '/nodedir'); - \rmdir(__DIR__ . '/nodedir2'); + rmdir(__DIR__ . '/nodedir'); + rmdir(__DIR__ . '/nodedir2'); } /** @@ -597,10 +597,10 @@ class DirectoryTest extends \PHPUnit\Framework\TestCase $dir->addNode(new Directory(__DIR__ . '/nodedir')); $dir->getNode('nodedir')->moveNode(__DIR__ . '/nodedir2'); - self::assertFalse(\is_dir(__DIR__ . '/nodedir')); - self::assertTrue(\is_dir(__DIR__ . '/nodedir2')); + self::assertFalse(is_dir(__DIR__ . '/nodedir')); + self::assertTrue(is_dir(__DIR__ . '/nodedir2')); - \rmdir(__DIR__ . '/nodedir2'); + rmdir(__DIR__ . '/nodedir2'); } /** @@ -684,13 +684,13 @@ class DirectoryTest extends \PHPUnit\Framework\TestCase $dir = new Directory(__DIR__); $dir[] = new Directory(__DIR__ . '/nodedir'); - self::assertTrue(\is_dir(__DIR__ . '/nodedir')); - \rmdir(__DIR__ . '/nodedir'); + self::assertTrue(is_dir(__DIR__ . '/nodedir')); + rmdir(__DIR__ . '/nodedir'); $dir['nodedir'] = new Directory(__DIR__ . '/nodedir'); - self::assertTrue(\is_dir(__DIR__ . '/nodedir')); - \rmdir(__DIR__ . '/nodedir'); + self::assertTrue(is_dir(__DIR__ . '/nodedir')); + rmdir(__DIR__ . '/nodedir'); } /** @@ -702,9 +702,9 @@ class DirectoryTest extends \PHPUnit\Framework\TestCase $dir = new Directory(__DIR__); $dir->addNode(new Directory(__DIR__ . '/nodedir')); - self::assertTrue(\is_dir(__DIR__ . '/nodedir')); + self::assertTrue(is_dir(__DIR__ . '/nodedir')); unset($dir['nodedir']); - self::assertFalse(\is_dir(__DIR__ . '/nodedir')); + self::assertFalse(is_dir(__DIR__ . '/nodedir')); } /** @@ -733,7 +733,7 @@ class DirectoryTest extends \PHPUnit\Framework\TestCase $now = new \DateTime('now'); self::assertEquals($now->format('Y-m-d'), $dir->getCreatedAt()->format('Y-m-d')); - \rmdir($dirPath); + rmdir($dirPath); } /** @@ -750,7 +750,7 @@ class DirectoryTest extends \PHPUnit\Framework\TestCase $now = new \DateTime('now'); self::assertEquals($now->format('Y-m-d'), $dir->getChangedAt()->format('Y-m-d')); - \rmdir($dirPath); + rmdir($dirPath); } /** diff --git a/tests/System/File/Local/FileTest.php b/tests/System/File/Local/FileTest.php index 8ad1c02c2..bd266b9ae 100644 --- a/tests/System/File/Local/FileTest.php +++ b/tests/System/File/Local/FileTest.php @@ -32,20 +32,20 @@ class FileTest extends \PHPUnit\Framework\TestCase public function testStaticCreate() : void { $testFile = __DIR__ . '/path/test.txt'; - if (\is_file($testFile)) { - \unlink($testFile); + if (is_file($testFile)) { + unlink($testFile); } - if (\is_file(__DIR__ . '/path')) { - \rmdir(__DIR__ . '/path'); + if (is_file(__DIR__ . '/path')) { + rmdir(__DIR__ . '/path'); } self::assertTrue(File::create($testFile)); - self::assertTrue(\is_file($testFile)); - self::assertEquals('', \file_get_contents($testFile)); + self::assertTrue(is_file($testFile)); + self::assertEquals('', file_get_contents($testFile)); - \unlink($testFile); - \rmdir(__DIR__ . '/path'); + unlink($testFile); + rmdir(__DIR__ . '/path'); } /** @@ -56,15 +56,15 @@ class FileTest extends \PHPUnit\Framework\TestCase public function testInvalidStaticCreate() : void { $testFile = __DIR__ . '/test.txt'; - if (\is_file($testFile)) { - \unlink($testFile); + if (is_file($testFile)) { + unlink($testFile); } self::assertTrue(File::create($testFile)); self::assertFalse(File::create($testFile)); - self::assertTrue(\is_file($testFile)); + self::assertTrue(is_file($testFile)); - \unlink($testFile); + unlink($testFile); } /** @@ -75,20 +75,20 @@ class FileTest extends \PHPUnit\Framework\TestCase public function testStaticPut() : void { $testFile = __DIR__ . '/path/test.txt'; - if (\is_file($testFile)) { - \unlink($testFile); + if (is_file($testFile)) { + unlink($testFile); } - if (\is_file(__DIR__ . '/path')) { - \rmdir(__DIR__ . '/path'); + if (is_file(__DIR__ . '/path')) { + rmdir(__DIR__ . '/path'); } self::assertTrue(File::put($testFile, 'test', ContentPutMode::CREATE)); - self::assertTrue(\is_file($testFile)); - self::assertEquals('test', \file_get_contents($testFile)); + self::assertTrue(is_file($testFile)); + self::assertEquals('test', file_get_contents($testFile)); - \unlink($testFile); - \rmdir(__DIR__ . '/path'); + unlink($testFile); + rmdir(__DIR__ . '/path'); } /** @@ -99,12 +99,12 @@ class FileTest extends \PHPUnit\Framework\TestCase public function testInvalidStaticCreateReplace() : void { $testFile = __DIR__ . '/test.txt'; - if (\is_file($testFile)) { - \unlink($testFile); + if (is_file($testFile)) { + unlink($testFile); } self::assertFalse(File::put($testFile, 'test', ContentPutMode::REPLACE)); - self::assertfalse(\is_file($testFile)); + self::assertfalse(is_file($testFile)); } /** @@ -115,12 +115,12 @@ class FileTest extends \PHPUnit\Framework\TestCase public function testInvalidStaticCreateAppend() : void { $testFile = __DIR__ . '/test.txt'; - if (\is_file($testFile)) { - \unlink($testFile); + if (is_file($testFile)) { + unlink($testFile); } self::assertFalse(File::put($testFile, 'test', ContentPutMode::APPEND)); - self::assertfalse(\is_file($testFile)); + self::assertfalse(is_file($testFile)); } /** @@ -131,12 +131,12 @@ class FileTest extends \PHPUnit\Framework\TestCase public function testInvalidStaticCreatePrepend() : void { $testFile = __DIR__ . '/test.txt'; - if (\is_file($testFile)) { - \unlink($testFile); + if (is_file($testFile)) { + unlink($testFile); } self::assertFalse(File::put($testFile, 'test', ContentPutMode::PREPEND)); - self::assertfalse(\is_file($testFile)); + self::assertfalse(is_file($testFile)); } /** @@ -158,16 +158,16 @@ class FileTest extends \PHPUnit\Framework\TestCase public function testStaticReplace() : void { $testFile = __DIR__ . '/test.txt'; - if (\is_file($testFile)) { - \unlink($testFile); + if (is_file($testFile)) { + unlink($testFile); } self::assertTrue(File::put($testFile, 'test', ContentPutMode::CREATE)); self::assertTrue(File::put($testFile, 'test2', ContentPutMode::REPLACE)); - self::assertEquals('test2', \file_get_contents($testFile)); + self::assertEquals('test2', file_get_contents($testFile)); - \unlink($testFile); + unlink($testFile); } /** @@ -178,16 +178,16 @@ class FileTest extends \PHPUnit\Framework\TestCase public function testStaticSetAlias() : void { $testFile = __DIR__ . '/test.txt'; - if (\is_file($testFile)) { - \unlink($testFile); + if (is_file($testFile)) { + unlink($testFile); } self::assertTrue(File::put($testFile, 'test', ContentPutMode::CREATE)); self::assertTrue(File::set($testFile, 'test2')); - self::assertEquals('test2', \file_get_contents($testFile)); + self::assertEquals('test2', file_get_contents($testFile)); - \unlink($testFile); + unlink($testFile); } /** @@ -198,16 +198,16 @@ class FileTest extends \PHPUnit\Framework\TestCase public function testStaticAppend() : void { $testFile = __DIR__ . '/test.txt'; - if (\is_file($testFile)) { - \unlink($testFile); + if (is_file($testFile)) { + unlink($testFile); } self::assertTrue(File::put($testFile, 'test', ContentPutMode::CREATE)); self::assertTrue(File::put($testFile, 'test2', ContentPutMode::APPEND)); - self::assertEquals('testtest2', \file_get_contents($testFile)); + self::assertEquals('testtest2', file_get_contents($testFile)); - \unlink($testFile); + unlink($testFile); } /** @@ -218,16 +218,16 @@ class FileTest extends \PHPUnit\Framework\TestCase public function testStaticAppendAlias() : void { $testFile = __DIR__ . '/test.txt'; - if (\is_file($testFile)) { - \unlink($testFile); + if (is_file($testFile)) { + unlink($testFile); } self::assertTrue(File::put($testFile, 'test', ContentPutMode::CREATE)); self::assertTrue(File::append($testFile, 'test2')); - self::assertEquals('testtest2', \file_get_contents($testFile)); + self::assertEquals('testtest2', file_get_contents($testFile)); - \unlink($testFile); + unlink($testFile); } /** @@ -238,16 +238,16 @@ class FileTest extends \PHPUnit\Framework\TestCase public function testStaticPrepend() : void { $testFile = __DIR__ . '/test.txt'; - if (\is_file($testFile)) { - \unlink($testFile); + if (is_file($testFile)) { + unlink($testFile); } self::assertTrue(File::put($testFile, 'test', ContentPutMode::CREATE)); self::assertTrue(File::put($testFile, 'test2', ContentPutMode::PREPEND)); - self::assertEquals('test2test', \file_get_contents($testFile)); + self::assertEquals('test2test', file_get_contents($testFile)); - \unlink($testFile); + unlink($testFile); } /** @@ -258,16 +258,16 @@ class FileTest extends \PHPUnit\Framework\TestCase public function testStaticPrependAlias() : void { $testFile = __DIR__ . '/test.txt'; - if (\is_file($testFile)) { - \unlink($testFile); + if (is_file($testFile)) { + unlink($testFile); } self::assertTrue(File::put($testFile, 'test', ContentPutMode::CREATE)); self::assertTrue(File::prepend($testFile, 'test2')); - self::assertEquals('test2test', \file_get_contents($testFile)); + self::assertEquals('test2test', file_get_contents($testFile)); - \unlink($testFile); + unlink($testFile); } /** @@ -278,14 +278,14 @@ class FileTest extends \PHPUnit\Framework\TestCase public function testStaticGet() : void { $testFile = __DIR__ . '/test.txt'; - if (\is_file($testFile)) { - \unlink($testFile); + if (is_file($testFile)) { + unlink($testFile); } self::assertTrue(File::put($testFile, 'test', ContentPutMode::CREATE)); self::assertEquals('test', File::get($testFile)); - \unlink($testFile); + unlink($testFile); } /** @@ -297,7 +297,7 @@ class FileTest extends \PHPUnit\Framework\TestCase { $testFile = __DIR__ . '/test.txt'; - self::assertEquals(\str_replace('\\', '/', \realpath(__DIR__ . '/../')), File::parent($testFile)); + self::assertEquals(str_replace('\\', '/', realpath(__DIR__ . '/../')), File::parent($testFile)); } /** @@ -345,7 +345,7 @@ class FileTest extends \PHPUnit\Framework\TestCase { $testFile = __DIR__ . '/test.txt'; - self::assertEquals(\basename(\realpath(__DIR__)), File::dirname($testFile)); + self::assertEquals(basename(realpath(__DIR__)), File::dirname($testFile)); } /** @@ -357,7 +357,7 @@ class FileTest extends \PHPUnit\Framework\TestCase { $testFile = __DIR__ . '/test.txt'; - self::assertEquals(\realpath(__DIR__), File::dirpath($testFile)); + self::assertEquals(realpath(__DIR__), File::dirpath($testFile)); } /** @@ -385,7 +385,7 @@ class FileTest extends \PHPUnit\Framework\TestCase $now = new \DateTime('now'); self::assertEquals($now->format('Y-m-d'), File::created($testFile)->format('Y-m-d')); - \unlink($testFile); + unlink($testFile); } /** @@ -401,7 +401,7 @@ class FileTest extends \PHPUnit\Framework\TestCase $now = new \DateTime('now'); self::assertEquals($now->format('Y-m-d'), File::changed($testFile)->format('Y-m-d')); - \unlink($testFile); + unlink($testFile); } /** @@ -438,15 +438,15 @@ class FileTest extends \PHPUnit\Framework\TestCase public function testStaticSize() : void { $testFile = __DIR__ . '/test.txt'; - if (\is_file($testFile)) { - \unlink($testFile); + if (is_file($testFile)) { + unlink($testFile); } File::put($testFile, 'test', ContentPutMode::CREATE); self::assertGreaterThan(0, File::size($testFile)); - \unlink($testFile); + unlink($testFile); } /** @@ -457,15 +457,15 @@ class FileTest extends \PHPUnit\Framework\TestCase public function testStaticPermission() : void { $testFile = __DIR__ . '/test.txt'; - if (\is_file($testFile)) { - \unlink($testFile); + if (is_file($testFile)) { + unlink($testFile); } File::put($testFile, 'test', ContentPutMode::CREATE); self::assertGreaterThan(0, File::permission($testFile)); - \unlink($testFile); + unlink($testFile); } /** @@ -504,8 +504,8 @@ class FileTest extends \PHPUnit\Framework\TestCase public function testStaticCopy() : void { $testFile = __DIR__ . '/test.txt'; - if (\is_file($testFile)) { - \unlink($testFile); + if (is_file($testFile)) { + unlink($testFile); } $newPath = __DIR__ . '/sub/path/testing.txt'; @@ -516,11 +516,11 @@ class FileTest extends \PHPUnit\Framework\TestCase self::assertTrue(File::exists($newPath)); self::assertEquals('test', File::get($newPath)); - \unlink($newPath); - \rmdir(__DIR__ . '/sub/path/'); - \rmdir(__DIR__ . '/sub/'); + unlink($newPath); + rmdir(__DIR__ . '/sub/path/'); + rmdir(__DIR__ . '/sub/'); - \unlink($testFile); + unlink($testFile); } /** @@ -531,13 +531,13 @@ class FileTest extends \PHPUnit\Framework\TestCase public function testInvalidStaticCopy() : void { $testFile = __DIR__ . '/test.txt'; - if (\is_file($testFile)) { - \unlink($testFile); + if (is_file($testFile)) { + unlink($testFile); } $newPath = __DIR__ . '/test2.txt'; - if (\is_file($newPath)) { - \unlink($newPath); + if (is_file($newPath)) { + unlink($newPath); } File::put($testFile, 'test', ContentPutMode::CREATE); @@ -546,8 +546,8 @@ class FileTest extends \PHPUnit\Framework\TestCase self::assertFalse(File::copy($testFile, $newPath)); self::assertEquals('test2', File::get($newPath)); - \unlink($newPath); - \unlink($testFile); + unlink($newPath); + unlink($testFile); } /** @@ -558,13 +558,13 @@ class FileTest extends \PHPUnit\Framework\TestCase public function testStaticCopyOverwrite() : void { $testFile = __DIR__ . '/test.txt'; - if (\is_file($testFile)) { - \unlink($testFile); + if (is_file($testFile)) { + unlink($testFile); } $newPath = __DIR__ . '/test2.txt'; - if (\is_file($newPath)) { - \unlink($newPath); + if (is_file($newPath)) { + unlink($newPath); } File::put($testFile, 'test', ContentPutMode::CREATE); @@ -573,8 +573,8 @@ class FileTest extends \PHPUnit\Framework\TestCase self::assertTrue(File::copy($testFile, $newPath, true)); self::assertEquals('test', File::get($newPath)); - \unlink($newPath); - \unlink($testFile); + unlink($newPath); + unlink($testFile); } /** @@ -585,8 +585,8 @@ class FileTest extends \PHPUnit\Framework\TestCase public function testStaticMove() : void { $testFile = __DIR__ . '/test.txt'; - if (\is_file($testFile)) { - \unlink($testFile); + if (is_file($testFile)) { + unlink($testFile); } $newPath = __DIR__ . '/sub/path/testing.txt'; @@ -598,9 +598,9 @@ class FileTest extends \PHPUnit\Framework\TestCase self::assertTrue(File::exists($newPath)); self::assertEquals('test', File::get($newPath)); - \unlink($newPath); - \rmdir(__DIR__ . '/sub/path/'); - \rmdir(__DIR__ . '/sub/'); + unlink($newPath); + rmdir(__DIR__ . '/sub/path/'); + rmdir(__DIR__ . '/sub/'); } /** @@ -611,8 +611,8 @@ class FileTest extends \PHPUnit\Framework\TestCase public function testInvalidStaticMove() : void { $testFile = __DIR__ . '/test.txt'; - if (\is_file($testFile)) { - \unlink($testFile); + if (is_file($testFile)) { + unlink($testFile); } $newPath = __DIR__ . '/test2.txt'; @@ -624,8 +624,8 @@ class FileTest extends \PHPUnit\Framework\TestCase self::assertTrue(File::exists($testFile)); self::assertEquals('test2', File::get($newPath)); - \unlink($newPath); - \unlink($testFile); + unlink($newPath); + unlink($testFile); } /** @@ -636,8 +636,8 @@ class FileTest extends \PHPUnit\Framework\TestCase public function testStaticMoveOverwrite() : void { $testFile = __DIR__ . '/test.txt'; - if (\is_file($testFile)) { - \unlink($testFile); + if (is_file($testFile)) { + unlink($testFile); } $newPath = __DIR__ . '/test2.txt'; @@ -649,7 +649,7 @@ class FileTest extends \PHPUnit\Framework\TestCase self::assertFalse(File::exists($testFile)); self::assertEquals('test', File::get($newPath)); - \unlink($newPath); + unlink($newPath); } /** @@ -756,15 +756,15 @@ class FileTest extends \PHPUnit\Framework\TestCase public function testNodeInputOutput() : void { $testFile = __DIR__ . '/test.txt'; - if (\is_file($testFile)) { - \unlink($testFile); + if (is_file($testFile)) { + unlink($testFile); } $file = new File($testFile); self::assertTrue($file->setContent('test')); self::assertEquals('test', $file->getContent()); - \unlink($testFile); + unlink($testFile); } /** @@ -774,8 +774,8 @@ class FileTest extends \PHPUnit\Framework\TestCase public function testNodeReplace() : void { $testFile = __DIR__ . '/test.txt'; - if (\is_file($testFile)) { - \unlink($testFile); + if (is_file($testFile)) { + unlink($testFile); } $file = new File($testFile); @@ -783,7 +783,7 @@ class FileTest extends \PHPUnit\Framework\TestCase self::assertTrue($file->setContent('test2')); self::assertEquals('test2', $file->getContent()); - \unlink($testFile); + unlink($testFile); } /** @@ -793,8 +793,8 @@ class FileTest extends \PHPUnit\Framework\TestCase public function testNodeAppend() : void { $testFile = __DIR__ . '/test.txt'; - if (\is_file($testFile)) { - \unlink($testFile); + if (is_file($testFile)) { + unlink($testFile); } $file = new File($testFile); @@ -802,7 +802,7 @@ class FileTest extends \PHPUnit\Framework\TestCase self::assertTrue($file->appendContent('2')); self::assertEquals('test2', $file->getContent()); - \unlink($testFile); + unlink($testFile); } /** @@ -812,8 +812,8 @@ class FileTest extends \PHPUnit\Framework\TestCase public function testNodePrepend() : void { $testFile = __DIR__ . '/test.txt'; - if (\is_file($testFile)) { - \unlink($testFile); + if (is_file($testFile)) { + unlink($testFile); } $file = new File($testFile); @@ -821,7 +821,7 @@ class FileTest extends \PHPUnit\Framework\TestCase self::assertTrue($file->prependContent('2')); self::assertEquals('2test', $file->getContent()); - \unlink($testFile); + unlink($testFile); } /** @@ -843,8 +843,8 @@ class FileTest extends \PHPUnit\Framework\TestCase public function testNodeCreatedAt() : void { $testFile = __DIR__ . '/test.txt'; - if (\is_file($testFile)) { - \unlink($testFile); + if (is_file($testFile)) { + unlink($testFile); } $file = new File($testFile); @@ -854,7 +854,7 @@ class FileTest extends \PHPUnit\Framework\TestCase $now = new \DateTime('now'); self::assertEquals($now->format('Y-m-d'), $file->createdAt->format('Y-m-d')); - \unlink($testFile); + unlink($testFile); } /** @@ -864,8 +864,8 @@ class FileTest extends \PHPUnit\Framework\TestCase public function testNodeChangedAt() : void { $testFile = __DIR__ . '/test.txt'; - if (\is_file($testFile)) { - \unlink($testFile); + if (is_file($testFile)) { + unlink($testFile); } $file = new File($testFile); @@ -875,7 +875,7 @@ class FileTest extends \PHPUnit\Framework\TestCase $now = new \DateTime('now'); self::assertEquals($now->format('Y-m-d'), $file->getChangedAt()->format('Y-m-d')); - \unlink($testFile); + unlink($testFile); } /** @@ -969,16 +969,16 @@ class FileTest extends \PHPUnit\Framework\TestCase public function testNodeCreate() : void { $testFile = __DIR__ . '/test.txt'; - if (\is_file($testFile)) { - \unlink($testFile); + if (is_file($testFile)) { + unlink($testFile); } $file = new File($testFile); $file->createNode(); - self::assertTrue(\is_file($testFile)); + self::assertTrue(is_file($testFile)); - \unlink($testFile); + unlink($testFile); } /** @@ -988,16 +988,16 @@ class FileTest extends \PHPUnit\Framework\TestCase public function testNodeDelete() : void { $testFile = __DIR__ . '/test.txt'; - if (\is_file($testFile)) { - \unlink($testFile); + if (is_file($testFile)) { + unlink($testFile); } $file = new File($testFile); $file->createNode(); - self::assertTrue(\is_file($testFile)); + self::assertTrue(is_file($testFile)); self::assertTrue($file->deleteNode()); - self::assertFalse(\is_file($testFile)); + self::assertFalse(is_file($testFile)); } /** @@ -1007,19 +1007,19 @@ class FileTest extends \PHPUnit\Framework\TestCase public function testNodeCopy() : void { $testFile = __DIR__ . '/test.txt'; - if (\is_file($testFile)) { - \unlink($testFile); + if (is_file($testFile)) { + unlink($testFile); } $file = new File($testFile); $file->createNode(); self::assertTrue($file->copyNode(__DIR__ . '/test2.txt')); - self::assertTrue(\is_file($testFile)); - self::assertTrue(\is_file(__DIR__ . '/test2.txt')); + self::assertTrue(is_file($testFile)); + self::assertTrue(is_file(__DIR__ . '/test2.txt')); - \unlink($testFile); - \unlink(__DIR__ . '/test2.txt'); + unlink($testFile); + unlink(__DIR__ . '/test2.txt'); } /** @@ -1029,18 +1029,18 @@ class FileTest extends \PHPUnit\Framework\TestCase public function testNodeMove() : void { $testFile = __DIR__ . '/test.txt'; - if (\is_file($testFile)) { - \unlink($testFile); + if (is_file($testFile)) { + unlink($testFile); } $file = new File($testFile); $file->createNode(); self::assertTrue($file->moveNode(__DIR__ . '/test2.txt')); - self::assertFalse(\is_file($testFile)); - self::assertTrue(\is_file(__DIR__ . '/test2.txt')); + self::assertFalse(is_file($testFile)); + self::assertTrue(is_file(__DIR__ . '/test2.txt')); - \unlink(__DIR__ . '/test2.txt'); + unlink(__DIR__ . '/test2.txt'); } /** diff --git a/tests/System/File/Local/LocalStorageTest.php b/tests/System/File/Local/LocalStorageTest.php index 20a47199a..2549e67a0 100644 --- a/tests/System/File/Local/LocalStorageTest.php +++ b/tests/System/File/Local/LocalStorageTest.php @@ -33,9 +33,9 @@ class LocalStorageTest extends \PHPUnit\Framework\TestCase { $dirPath = __DIR__ . '/test'; self::assertTrue(LocalStorage::create($dirPath)); - self::assertTrue(\is_dir($dirPath)); + self::assertTrue(is_dir($dirPath)); - \rmdir($dirPath); + rmdir($dirPath); } /** @@ -60,7 +60,7 @@ class LocalStorageTest extends \PHPUnit\Framework\TestCase self::assertTrue(LocalStorage::create($dirPath)); self::assertFalse(LocalStorage::create($dirPath)); - \rmdir($dirPath); + rmdir($dirPath); } /** @@ -74,9 +74,9 @@ class LocalStorageTest extends \PHPUnit\Framework\TestCase self::assertTrue(LocalStorage::create($dirPath, 0755, true)); self::assertTrue(LocalStorage::exists($dirPath)); - \rmdir(__DIR__ . '/test/sub/path'); - \rmdir(__DIR__ . '/test/sub'); - \rmdir(__DIR__ . '/test'); + rmdir(__DIR__ . '/test/sub/path'); + rmdir(__DIR__ . '/test/sub'); + rmdir(__DIR__ . '/test'); } /** @@ -124,7 +124,7 @@ class LocalStorageTest extends \PHPUnit\Framework\TestCase { $dirPath = __DIR__ . '/test'; - self::assertEquals(\str_replace('\\', '/', \realpath(__DIR__)), LocalStorage::parent($dirPath)); + self::assertEquals(str_replace('\\', '/', realpath(__DIR__)), LocalStorage::parent($dirPath)); } /** @@ -153,7 +153,7 @@ class LocalStorageTest extends \PHPUnit\Framework\TestCase $now = new \DateTime('now'); self::assertEquals($now->format('Y-m-d'), LocalStorage::created($dirPath)->format('Y-m-d')); - \rmdir($dirPath); + rmdir($dirPath); } /** @@ -170,7 +170,7 @@ class LocalStorageTest extends \PHPUnit\Framework\TestCase $now = new \DateTime('now'); self::assertEquals($now->format('Y-m-d'), LocalStorage::changed($dirPath)->format('Y-m-d')); - \rmdir($dirPath); + rmdir($dirPath); } /** @@ -402,10 +402,10 @@ class LocalStorageTest extends \PHPUnit\Framework\TestCase { $testFile = __DIR__ . '/test.txt'; self::assertTrue(LocalStorage::create($testFile)); - self::assertTrue(\is_file($testFile)); - self::assertEquals('', \file_get_contents($testFile)); + self::assertTrue(is_file($testFile)); + self::assertEquals('', file_get_contents($testFile)); - \unlink($testFile); + unlink($testFile); } /** @@ -418,9 +418,9 @@ class LocalStorageTest extends \PHPUnit\Framework\TestCase $testFile = __DIR__ . '/test.txt'; self::assertTrue(LocalStorage::create($testFile)); self::assertFalse(LocalStorage::create($testFile)); - self::assertTrue(\is_file($testFile)); + self::assertTrue(is_file($testFile)); - \unlink($testFile); + unlink($testFile); } /** @@ -432,10 +432,10 @@ class LocalStorageTest extends \PHPUnit\Framework\TestCase { $testFile = __DIR__ . '/test.txt'; self::assertTrue(LocalStorage::put($testFile, 'test', ContentPutMode::CREATE)); - self::assertTrue(\is_file($testFile)); - self::assertEquals('test', \file_get_contents($testFile)); + self::assertTrue(is_file($testFile)); + self::assertEquals('test', file_get_contents($testFile)); - \unlink($testFile); + unlink($testFile); } /** @@ -447,7 +447,7 @@ class LocalStorageTest extends \PHPUnit\Framework\TestCase { $testFile = __DIR__ . '/test.txt'; self::assertFalse(LocalStorage::put($testFile, 'test', ContentPutMode::REPLACE)); - self::assertfalse(\is_file($testFile)); + self::assertfalse(is_file($testFile)); } /** @@ -459,7 +459,7 @@ class LocalStorageTest extends \PHPUnit\Framework\TestCase { $testFile = __DIR__ . '/test.txt'; self::assertFalse(LocalStorage::put($testFile, 'test', ContentPutMode::APPEND)); - self::assertfalse(\is_file($testFile)); + self::assertfalse(is_file($testFile)); } /** @@ -471,7 +471,7 @@ class LocalStorageTest extends \PHPUnit\Framework\TestCase { $testFile = __DIR__ . '/test.txt'; self::assertFalse(LocalStorage::put($testFile, 'test', ContentPutMode::PREPEND)); - self::assertfalse(\is_file($testFile)); + self::assertfalse(is_file($testFile)); } /** @@ -496,9 +496,9 @@ class LocalStorageTest extends \PHPUnit\Framework\TestCase self::assertTrue(LocalStorage::put($testFile, 'test', ContentPutMode::CREATE)); self::assertTrue(LocalStorage::put($testFile, 'test2', ContentPutMode::REPLACE)); - self::assertEquals('test2', \file_get_contents($testFile)); + self::assertEquals('test2', file_get_contents($testFile)); - \unlink($testFile); + unlink($testFile); } /** @@ -512,9 +512,9 @@ class LocalStorageTest extends \PHPUnit\Framework\TestCase self::assertTrue(LocalStorage::put($testFile, 'test', ContentPutMode::CREATE)); self::assertTrue(LocalStorage::set($testFile, 'test2')); - self::assertEquals('test2', \file_get_contents($testFile)); + self::assertEquals('test2', file_get_contents($testFile)); - \unlink($testFile); + unlink($testFile); } /** @@ -528,9 +528,9 @@ class LocalStorageTest extends \PHPUnit\Framework\TestCase self::assertTrue(LocalStorage::put($testFile, 'test', ContentPutMode::CREATE)); self::assertTrue(LocalStorage::put($testFile, 'test2', ContentPutMode::APPEND)); - self::assertEquals('testtest2', \file_get_contents($testFile)); + self::assertEquals('testtest2', file_get_contents($testFile)); - \unlink($testFile); + unlink($testFile); } /** @@ -544,9 +544,9 @@ class LocalStorageTest extends \PHPUnit\Framework\TestCase self::assertTrue(LocalStorage::put($testFile, 'test', ContentPutMode::CREATE)); self::assertTrue(LocalStorage::append($testFile, 'test2')); - self::assertEquals('testtest2', \file_get_contents($testFile)); + self::assertEquals('testtest2', file_get_contents($testFile)); - \unlink($testFile); + unlink($testFile); } /** @@ -560,9 +560,9 @@ class LocalStorageTest extends \PHPUnit\Framework\TestCase self::assertTrue(LocalStorage::put($testFile, 'test', ContentPutMode::CREATE)); self::assertTrue(LocalStorage::put($testFile, 'test2', ContentPutMode::PREPEND)); - self::assertEquals('test2test', \file_get_contents($testFile)); + self::assertEquals('test2test', file_get_contents($testFile)); - \unlink($testFile); + unlink($testFile); } /** @@ -576,9 +576,9 @@ class LocalStorageTest extends \PHPUnit\Framework\TestCase self::assertTrue(LocalStorage::put($testFile, 'test', ContentPutMode::CREATE)); self::assertTrue(LocalStorage::prepend($testFile, 'test2')); - self::assertEquals('test2test', \file_get_contents($testFile)); + self::assertEquals('test2test', file_get_contents($testFile)); - \unlink($testFile); + unlink($testFile); } /** @@ -592,7 +592,7 @@ class LocalStorageTest extends \PHPUnit\Framework\TestCase self::assertTrue(LocalStorage::put($testFile, 'test', ContentPutMode::CREATE)); self::assertEquals('test', LocalStorage::get($testFile)); - \unlink($testFile); + unlink($testFile); } /** @@ -604,7 +604,7 @@ class LocalStorageTest extends \PHPUnit\Framework\TestCase { $testFile = __DIR__ . '/test.txt'; - self::assertEquals(\str_replace('\\', '/', \realpath(__DIR__ . '/../')), LocalStorage::parent($testFile)); + self::assertEquals(str_replace('\\', '/', realpath(__DIR__ . '/../')), LocalStorage::parent($testFile)); } /** @@ -652,7 +652,7 @@ class LocalStorageTest extends \PHPUnit\Framework\TestCase { $testFile = __DIR__ . '/test.txt'; - self::assertEquals(\basename(\realpath(__DIR__)), LocalStorage::dirname($testFile)); + self::assertEquals(basename(realpath(__DIR__)), LocalStorage::dirname($testFile)); } /** @@ -664,7 +664,7 @@ class LocalStorageTest extends \PHPUnit\Framework\TestCase { $testFile = __DIR__ . '/test.txt'; - self::assertEquals(\realpath(__DIR__), LocalStorage::dirpath($testFile)); + self::assertEquals(realpath(__DIR__), LocalStorage::dirpath($testFile)); } /** @@ -692,7 +692,7 @@ class LocalStorageTest extends \PHPUnit\Framework\TestCase $now = new \DateTime('now'); self::assertEquals($now->format('Y-m-d'), LocalStorage::created($testFile)->format('Y-m-d')); - \unlink($testFile); + unlink($testFile); } /** @@ -708,7 +708,7 @@ class LocalStorageTest extends \PHPUnit\Framework\TestCase $now = new \DateTime('now'); self::assertEquals($now->format('Y-m-d'), LocalStorage::changed($testFile)->format('Y-m-d')); - \unlink($testFile); + unlink($testFile); } /** @@ -749,7 +749,7 @@ class LocalStorageTest extends \PHPUnit\Framework\TestCase self::assertGreaterThan(0, LocalStorage::size($testFile)); - \unlink($testFile); + unlink($testFile); } /** @@ -764,7 +764,7 @@ class LocalStorageTest extends \PHPUnit\Framework\TestCase self::assertGreaterThan(0, LocalStorage::permission($testFile)); - \unlink($testFile); + unlink($testFile); } /** @@ -794,11 +794,11 @@ class LocalStorageTest extends \PHPUnit\Framework\TestCase self::assertTrue(LocalStorage::exists($newPath)); self::assertEquals('test', LocalStorage::get($newPath)); - \unlink($newPath); - \rmdir(__DIR__ . '/sub/path/'); - \rmdir(__DIR__ . '/sub/'); + unlink($newPath); + rmdir(__DIR__ . '/sub/path/'); + rmdir(__DIR__ . '/sub/'); - \unlink($testFile); + unlink($testFile); } /** @@ -817,8 +817,8 @@ class LocalStorageTest extends \PHPUnit\Framework\TestCase self::assertFalse(LocalStorage::copy($testFile, $newPath)); self::assertEquals('test2', LocalStorage::get($newPath)); - \unlink($newPath); - \unlink($testFile); + unlink($newPath); + unlink($testFile); } /** @@ -837,8 +837,8 @@ class LocalStorageTest extends \PHPUnit\Framework\TestCase self::assertTrue(LocalStorage::copy($testFile, $newPath, true)); self::assertEquals('test', LocalStorage::get($newPath)); - \unlink($newPath); - \unlink($testFile); + unlink($newPath); + unlink($testFile); } /** @@ -858,9 +858,9 @@ class LocalStorageTest extends \PHPUnit\Framework\TestCase self::assertTrue(LocalStorage::exists($newPath)); self::assertEquals('test', LocalStorage::get($newPath)); - \unlink($newPath); - \rmdir(__DIR__ . '/sub/path/'); - \rmdir(__DIR__ . '/sub/'); + unlink($newPath); + rmdir(__DIR__ . '/sub/path/'); + rmdir(__DIR__ . '/sub/'); } /** @@ -880,8 +880,8 @@ class LocalStorageTest extends \PHPUnit\Framework\TestCase self::assertTrue(LocalStorage::exists($testFile)); self::assertEquals('test2', LocalStorage::get($newPath)); - \unlink($newPath); - \unlink($testFile); + unlink($newPath); + unlink($testFile); } /** @@ -901,7 +901,7 @@ class LocalStorageTest extends \PHPUnit\Framework\TestCase self::assertFalse(LocalStorage::exists($testFile)); self::assertEquals('test', LocalStorage::get($newPath)); - \unlink($newPath); + unlink($newPath); } /** diff --git a/tests/System/MimeTypeTest.php b/tests/System/MimeTypeTest.php index 88d89b19c..fae665fe3 100644 --- a/tests/System/MimeTypeTest.php +++ b/tests/System/MimeTypeTest.php @@ -32,7 +32,7 @@ class MimeTypeTest extends \PHPUnit\Framework\TestCase $enums = MimeType::getConstants(); foreach ($enums as $key => $value) { - if (\stripos($value, '/') === false) { + if (stripos($value, '/') === false) { self::assertFalse(true); } } diff --git a/tests/System/SystemTypeTest.php b/tests/System/SystemTypeTest.php index 521c1488f..536079708 100644 --- a/tests/System/SystemTypeTest.php +++ b/tests/System/SystemTypeTest.php @@ -38,7 +38,7 @@ class SystemTypeTest extends \PHPUnit\Framework\TestCase */ public function testUnique() : void { - self::assertEquals(SystemType::getConstants(), \array_unique(SystemType::getConstants())); + self::assertEquals(SystemType::getConstants(), array_unique(SystemType::getConstants())); } /** diff --git a/tests/System/SystemUtilsTest.php b/tests/System/SystemUtilsTest.php index 9ec25d8a1..2ba3b1832 100644 --- a/tests/System/SystemUtilsTest.php +++ b/tests/System/SystemUtilsTest.php @@ -34,11 +34,11 @@ class SystemUtilsTest extends \PHPUnit\Framework\TestCase { self::assertGreaterThan(0, SystemUtils::getRAM()); - if (\stristr(\PHP_OS, 'WIN')) { + if (stristr(\PHP_OS, 'WIN')) { self::assertEquals(0, SystemUtils::getRAMUsage()); } - if (!\stristr(\PHP_OS, 'WIN')) { + if (!stristr(\PHP_OS, 'WIN')) { self::assertGreaterThan(0, SystemUtils::getRAMUsage()); } } diff --git a/tests/UnhandledHandlerTest.php b/tests/UnhandledHandlerTest.php index 70478fb1b..07138b3fd 100644 --- a/tests/UnhandledHandlerTest.php +++ b/tests/UnhandledHandlerTest.php @@ -26,11 +26,11 @@ class UnhandledHandlerTest extends \PHPUnit\Framework\TestCase */ public function testErrorHandling() : void { - \set_exception_handler(['\phpOMS\UnhandledHandler', 'exceptionHandler']); - \set_error_handler(['\phpOMS\UnhandledHandler', 'errorHandler']); - \register_shutdown_function(['\phpOMS\UnhandledHandler', 'shutdownHandler']); + set_exception_handler(['\phpOMS\UnhandledHandler', 'exceptionHandler']); + set_error_handler(['\phpOMS\UnhandledHandler', 'errorHandler']); + register_shutdown_function(['\phpOMS\UnhandledHandler', 'shutdownHandler']); - \trigger_error('', \E_USER_ERROR); + trigger_error('', \E_USER_ERROR); UnhandledHandler::shutdownHandler(); diff --git a/tests/Uri/UriSchemeTest.php b/tests/Uri/UriSchemeTest.php index ba6a8b3b8..c12a89da9 100644 --- a/tests/Uri/UriSchemeTest.php +++ b/tests/Uri/UriSchemeTest.php @@ -53,6 +53,6 @@ class UriSchemeTest extends \PHPUnit\Framework\TestCase public function testEnumUnique() : void { $values = UriScheme::getConstants(); - self::assertEquals(\count($values), \array_sum(\array_count_values($values))); + self::assertEquals(\count($values), array_sum(array_count_values($values))); } } diff --git a/tests/Utils/ArrayUtilsTest.php b/tests/Utils/ArrayUtilsTest.php index a4574f791..9dc71916b 100644 --- a/tests/Utils/ArrayUtilsTest.php +++ b/tests/Utils/ArrayUtilsTest.php @@ -265,7 +265,7 @@ class ArrayUtilsTest extends \PHPUnit\Framework\TestCase public function testArgGet() : void { if (ArrayUtils::getArg('--configuration', $_SERVER['argv']) !== null) { - self::assertTrue(\stripos(ArrayUtils::getArg('--configuration', $_SERVER['argv']), '.xml') !== false); + self::assertTrue(stripos(ArrayUtils::getArg('--configuration', $_SERVER['argv']), '.xml') !== false); } } diff --git a/tests/Utils/Barcode/C128aTest.php b/tests/Utils/Barcode/C128aTest.php index ba34c92f0..8ea6975ed 100644 --- a/tests/Utils/Barcode/C128aTest.php +++ b/tests/Utils/Barcode/C128aTest.php @@ -38,8 +38,8 @@ class C128aTest extends \PHPUnit\Framework\TestCase public function testImagePng() : void { $path = __DIR__ . '/c128a.png'; - if (\is_file($path)) { - \unlink($path); + if (is_file($path)) { + unlink($path); } $img = new C128a('ABCDEFG0123()+-', 200, 50); @@ -55,8 +55,8 @@ class C128aTest extends \PHPUnit\Framework\TestCase public function testImageJpg() : void { $path = __DIR__ . '/c128a.jpg'; - if (\is_file($path)) { - \unlink($path); + if (is_file($path)) { + unlink($path); } $img = new C128a('ABCDEFG0123()+-', 200, 50); @@ -72,8 +72,8 @@ class C128aTest extends \PHPUnit\Framework\TestCase public function testOrientationAndMargin() : void { $path = __DIR__ . '/c128a_vertical.png'; - if (\is_file($path)) { - \unlink($path); + if (is_file($path)) { + unlink($path); } $img = new C128a('ABCDEFG0123()+-', 50, 200, OrientationType::VERTICAL); diff --git a/tests/Utils/Barcode/C128bTest.php b/tests/Utils/Barcode/C128bTest.php index 4b2be9bc8..7f6833852 100644 --- a/tests/Utils/Barcode/C128bTest.php +++ b/tests/Utils/Barcode/C128bTest.php @@ -38,8 +38,8 @@ class C128bTest extends \PHPUnit\Framework\TestCase public function testImagePng() : void { $path = __DIR__ . '/c128b.png'; - if (\is_file($path)) { - \unlink($path); + if (is_file($path)) { + unlink($path); } $img = new C128b('ABcdeFG0123+-!@?', 200, 50); @@ -55,8 +55,8 @@ class C128bTest extends \PHPUnit\Framework\TestCase public function testImageJpg() : void { $path = __DIR__ . '/c128b.jpg'; - if (\is_file($path)) { - \unlink($path); + if (is_file($path)) { + unlink($path); } $img = new C128b('ABcdeFG0123+-!@?', 200, 50); @@ -72,8 +72,8 @@ class C128bTest extends \PHPUnit\Framework\TestCase public function testOrientationAndMargin() : void { $path = __DIR__ . '/c128b_vertical.png'; - if (\is_file($path)) { - \unlink($path); + if (is_file($path)) { + unlink($path); } $img = new C128b('ABcdeFG0123+-!@?', 50, 200, OrientationType::VERTICAL); diff --git a/tests/Utils/Barcode/C128cTest.php b/tests/Utils/Barcode/C128cTest.php index 1f2f1a9b2..8942a25f3 100644 --- a/tests/Utils/Barcode/C128cTest.php +++ b/tests/Utils/Barcode/C128cTest.php @@ -38,8 +38,8 @@ class C128cTest extends \PHPUnit\Framework\TestCase public function testImagePng() : void { $path = __DIR__ . '/c128c.png'; - if (\is_file($path)) { - \unlink($path); + if (is_file($path)) { + unlink($path); } $img = new C128c('412163', 200, 50); @@ -55,8 +55,8 @@ class C128cTest extends \PHPUnit\Framework\TestCase public function testImageJpg() : void { $path = __DIR__ . '/c128c.jpg'; - if (\is_file($path)) { - \unlink($path); + if (is_file($path)) { + unlink($path); } $img = new C128c('412163', 200, 50); @@ -72,8 +72,8 @@ class C128cTest extends \PHPUnit\Framework\TestCase public function testOrientationAndMargin() : void { $path = __DIR__ . '/c128c_vertical.png'; - if (\is_file($path)) { - \unlink($path); + if (is_file($path)) { + unlink($path); } $img = new C128c('412163', 50, 200, OrientationType::VERTICAL); diff --git a/tests/Utils/Barcode/C25Test.php b/tests/Utils/Barcode/C25Test.php index 93e39fbed..44cf37e82 100644 --- a/tests/Utils/Barcode/C25Test.php +++ b/tests/Utils/Barcode/C25Test.php @@ -38,8 +38,8 @@ class C25Test extends \PHPUnit\Framework\TestCase public function testImagePng() : void { $path = __DIR__ . '/c25.png'; - if (\is_file($path)) { - \unlink($path); + if (is_file($path)) { + unlink($path); } $img = new C25('1234567890', 150, 50); @@ -55,8 +55,8 @@ class C25Test extends \PHPUnit\Framework\TestCase public function testImageJpg() : void { $path = __DIR__ . '/c25.jpg'; - if (\is_file($path)) { - \unlink($path); + if (is_file($path)) { + unlink($path); } $img = new C25('1234567890', 150, 50); @@ -72,8 +72,8 @@ class C25Test extends \PHPUnit\Framework\TestCase public function testOrientationAndMargin() : void { $path = __DIR__ . '/c25_vertical.png'; - if (\is_file($path)) { - \unlink($path); + if (is_file($path)) { + unlink($path); } $img = new C25('1234567890', 50, 200, OrientationType::VERTICAL); diff --git a/tests/Utils/Barcode/C39Test.php b/tests/Utils/Barcode/C39Test.php index d098e5277..b2048487e 100644 --- a/tests/Utils/Barcode/C39Test.php +++ b/tests/Utils/Barcode/C39Test.php @@ -38,8 +38,8 @@ class C39Test extends \PHPUnit\Framework\TestCase public function testImagePng() : void { $path = __DIR__ . '/c39.png'; - if (\is_file($path)) { - \unlink($path); + if (is_file($path)) { + unlink($path); } $img = new C39('ABCDEFG0123+-', 150, 50); @@ -55,8 +55,8 @@ class C39Test extends \PHPUnit\Framework\TestCase public function testImageJpg() : void { $path = __DIR__ . '/c39.jpg'; - if (\is_file($path)) { - \unlink($path); + if (is_file($path)) { + unlink($path); } $img = new C39('ABCDEFG0123+-', 150, 50); @@ -72,8 +72,8 @@ class C39Test extends \PHPUnit\Framework\TestCase public function testOrientationAndMargin() : void { $path = __DIR__ . '/c39_vertical.png'; - if (\is_file($path)) { - \unlink($path); + if (is_file($path)) { + unlink($path); } $img = new C39('ABCDEFG0123+-', 50, 150, OrientationType::VERTICAL); diff --git a/tests/Utils/Barcode/CodebarTest.php b/tests/Utils/Barcode/CodebarTest.php index f1fbd92c5..abe682edc 100644 --- a/tests/Utils/Barcode/CodebarTest.php +++ b/tests/Utils/Barcode/CodebarTest.php @@ -38,8 +38,8 @@ class CodebarTest extends \PHPUnit\Framework\TestCase public function testImagePng() : void { $path = __DIR__ . '/codebar.png'; - if (\is_file($path)) { - \unlink($path); + if (is_file($path)) { + unlink($path); } $img = new Codebar('412163', 200, 50); @@ -55,8 +55,8 @@ class CodebarTest extends \PHPUnit\Framework\TestCase public function testImageJpg() : void { $path = __DIR__ . '/codebar.jpg'; - if (\is_file($path)) { - \unlink($path); + if (is_file($path)) { + unlink($path); } $img = new Codebar('412163', 200, 50); @@ -72,8 +72,8 @@ class CodebarTest extends \PHPUnit\Framework\TestCase public function testOrientationAndMargin() : void { $path = __DIR__ . '/ccodebar_vertical.png'; - if (\is_file($path)) { - \unlink($path); + if (is_file($path)) { + unlink($path); } $img = new Codebar('412163', 50, 200, OrientationType::VERTICAL); diff --git a/tests/Utils/Barcode/OrientationTypeTest.php b/tests/Utils/Barcode/OrientationTypeTest.php index 6557ceeae..70865d36b 100644 --- a/tests/Utils/Barcode/OrientationTypeTest.php +++ b/tests/Utils/Barcode/OrientationTypeTest.php @@ -36,7 +36,7 @@ class OrientationTypeTest extends \PHPUnit\Framework\TestCase */ public function testUnique() : void { - self::assertEquals(OrientationType::getConstants(), \array_unique(OrientationType::getConstants())); + self::assertEquals(OrientationType::getConstants(), array_unique(OrientationType::getConstants())); } /** diff --git a/tests/Utils/Converter/AngleTypeTest.php b/tests/Utils/Converter/AngleTypeTest.php index b5a654461..e465ce5e6 100644 --- a/tests/Utils/Converter/AngleTypeTest.php +++ b/tests/Utils/Converter/AngleTypeTest.php @@ -36,7 +36,7 @@ class AngleTypeTest extends \PHPUnit\Framework\TestCase */ public function testUnique() : void { - self::assertEquals(AngleType::getConstants(), \array_unique(AngleType::getConstants())); + self::assertEquals(AngleType::getConstants(), array_unique(AngleType::getConstants())); } /** diff --git a/tests/Utils/Converter/AreaTypeTest.php b/tests/Utils/Converter/AreaTypeTest.php index 30d55c24a..aa5053f0a 100644 --- a/tests/Utils/Converter/AreaTypeTest.php +++ b/tests/Utils/Converter/AreaTypeTest.php @@ -36,7 +36,7 @@ class AreaTypeTest extends \PHPUnit\Framework\TestCase */ public function testUnique() : void { - self::assertEquals(AreaType::getConstants(), \array_unique(AreaType::getConstants())); + self::assertEquals(AreaType::getConstants(), array_unique(AreaType::getConstants())); } /** diff --git a/tests/Utils/Converter/EnergyPowerTypeTest.php b/tests/Utils/Converter/EnergyPowerTypeTest.php index ced1437a6..73aa28a84 100644 --- a/tests/Utils/Converter/EnergyPowerTypeTest.php +++ b/tests/Utils/Converter/EnergyPowerTypeTest.php @@ -36,7 +36,7 @@ class EnergyPowerTypeTest extends \PHPUnit\Framework\TestCase */ public function testUnique() : void { - self::assertEquals(EnergyPowerType::getConstants(), \array_unique(EnergyPowerType::getConstants())); + self::assertEquals(EnergyPowerType::getConstants(), array_unique(EnergyPowerType::getConstants())); } /** diff --git a/tests/Utils/Converter/FileSizeTypeTest.php b/tests/Utils/Converter/FileSizeTypeTest.php index 1088ac9ad..e8e7fdb2f 100644 --- a/tests/Utils/Converter/FileSizeTypeTest.php +++ b/tests/Utils/Converter/FileSizeTypeTest.php @@ -38,7 +38,7 @@ class FileSizeTypeTest extends \PHPUnit\Framework\TestCase */ public function testUnique() : void { - self::assertEquals(FileSizeType::getConstants(), \array_unique(FileSizeType::getConstants())); + self::assertEquals(FileSizeType::getConstants(), array_unique(FileSizeType::getConstants())); } /** diff --git a/tests/Utils/Converter/IpTest.php b/tests/Utils/Converter/IpTest.php index 7e225632c..8753876fb 100644 --- a/tests/Utils/Converter/IpTest.php +++ b/tests/Utils/Converter/IpTest.php @@ -30,6 +30,6 @@ class IpTest extends \PHPUnit\Framework\TestCase */ public function testIp() : void { - self::assertTrue(\abs(1527532998.0 - Ip::ip2Float('91.12.77.198')) < 1); + self::assertTrue(abs(1527532998.0 - Ip::ip2Float('91.12.77.198')) < 1); } } diff --git a/tests/Utils/Converter/LengthTypeTest.php b/tests/Utils/Converter/LengthTypeTest.php index ea9ec2015..7d4690249 100644 --- a/tests/Utils/Converter/LengthTypeTest.php +++ b/tests/Utils/Converter/LengthTypeTest.php @@ -36,7 +36,7 @@ class LengthTypeTest extends \PHPUnit\Framework\TestCase */ public function testUnique() : void { - self::assertEquals(LengthType::getConstants(), \array_unique(LengthType::getConstants())); + self::assertEquals(LengthType::getConstants(), array_unique(LengthType::getConstants())); } /** diff --git a/tests/Utils/Converter/MeasurementTest.php b/tests/Utils/Converter/MeasurementTest.php index e1a2286f4..50f6283c7 100644 --- a/tests/Utils/Converter/MeasurementTest.php +++ b/tests/Utils/Converter/MeasurementTest.php @@ -45,7 +45,7 @@ class MeasurementTest extends \PHPUnit\Framework\TestCase foreach ($temps as $from) { foreach ($temps as $to) { - $rand = \mt_rand(0, 100); + $rand = mt_rand(0, 100); if ($rand - Measurement::convertTemperature(Measurement::convertTemperature($rand, $from, $to), $to, $from) >= 1) { self::assertTrue(false); } @@ -66,7 +66,7 @@ class MeasurementTest extends \PHPUnit\Framework\TestCase foreach ($weights as $from) { foreach ($weights as $to) { - $rand = \mt_rand(0, 100); + $rand = mt_rand(0, 100); if ($rand - Measurement::convertWeight(Measurement::convertWeight($rand, $from, $to), $to, $from) >= 1) { self::assertTrue(false); } @@ -87,7 +87,7 @@ class MeasurementTest extends \PHPUnit\Framework\TestCase foreach ($lengths as $from) { foreach ($lengths as $to) { - $rand = \mt_rand(0, 100); + $rand = mt_rand(0, 100); if ($rand - Measurement::convertLength(Measurement::convertLength($rand, $from, $to), $to, $from) >= 1) { self::assertTrue(false); } @@ -108,7 +108,7 @@ class MeasurementTest extends \PHPUnit\Framework\TestCase foreach ($areas as $from) { foreach ($areas as $to) { - $rand = \mt_rand(0, 100); + $rand = mt_rand(0, 100); if ($rand - Measurement::convertArea(Measurement::convertArea($rand, $from, $to), $to, $from) >= 1) { self::assertTrue(false); } @@ -129,7 +129,7 @@ class MeasurementTest extends \PHPUnit\Framework\TestCase foreach ($volumes as $from) { foreach ($volumes as $to) { - $rand = \mt_rand(0, 100); + $rand = mt_rand(0, 100); if ($rand - Measurement::convertVolume(Measurement::convertVolume($rand, $from, $to), $to, $from) >= 1) { self::assertTrue(false); } @@ -150,7 +150,7 @@ class MeasurementTest extends \PHPUnit\Framework\TestCase foreach ($speeds as $from) { foreach ($speeds as $to) { - $rand = \mt_rand(0, 100); + $rand = mt_rand(0, 100); if ($rand - Measurement::convertSpeed(Measurement::convertSpeed($rand, $from, $to), $to, $from) >= 1) { self::assertTrue(false); } @@ -171,7 +171,7 @@ class MeasurementTest extends \PHPUnit\Framework\TestCase foreach ($times as $from) { foreach ($times as $to) { - $rand = \mt_rand(0, 100); + $rand = mt_rand(0, 100); if ($rand - Measurement::convertTime(Measurement::convertTime($rand, $from, $to), $to, $from) >= 1) { self::assertTrue(false); } @@ -192,7 +192,7 @@ class MeasurementTest extends \PHPUnit\Framework\TestCase foreach ($angles as $from) { foreach ($angles as $to) { - $rand = \mt_rand(0, 100); + $rand = mt_rand(0, 100); if ($rand - Measurement::convertAngle(Measurement::convertAngle($rand, $from, $to), $to, $from) >= 1) { self::assertTrue(false); } @@ -213,7 +213,7 @@ class MeasurementTest extends \PHPUnit\Framework\TestCase foreach ($pressures as $from) { foreach ($pressures as $to) { - $rand = \mt_rand(0, 100); + $rand = mt_rand(0, 100); if ($rand - Measurement::convertPressure(Measurement::convertPressure($rand, $from, $to), $to, $from) >= 1) { self::assertTrue(false); } @@ -234,7 +234,7 @@ class MeasurementTest extends \PHPUnit\Framework\TestCase foreach ($energies as $from) { foreach ($energies as $to) { - $rand = \mt_rand(0, 100); + $rand = mt_rand(0, 100); if ($rand - Measurement::convertEnergy(Measurement::convertEnergy($rand, $from, $to), $to, $from) >= 1) { self::assertTrue(false); } @@ -255,7 +255,7 @@ class MeasurementTest extends \PHPUnit\Framework\TestCase foreach ($fileSizes as $from) { foreach ($fileSizes as $to) { - $rand = \mt_rand(0, 100); + $rand = mt_rand(0, 100); if ($rand - Measurement::convertFileSize(Measurement::convertFileSize($rand, $from, $to), $to, $from) >= 1) { self::assertTrue(false); } diff --git a/tests/Utils/Converter/NumericTest.php b/tests/Utils/Converter/NumericTest.php index 14ca332d7..6d40e1643 100644 --- a/tests/Utils/Converter/NumericTest.php +++ b/tests/Utils/Converter/NumericTest.php @@ -30,7 +30,7 @@ class NumericTest extends \PHPUnit\Framework\TestCase */ public function testArabicToRoman() : void { - $rand = \mt_rand(1, 9999); + $rand = mt_rand(1, 9999); self::assertEquals($rand, Numeric::romanToArabic(Numeric::arabicToRoman($rand))); self::assertEquals('VIII', Numeric::arabicToRoman(8)); diff --git a/tests/Utils/Converter/PressureTypeTest.php b/tests/Utils/Converter/PressureTypeTest.php index 4d9f44b24..210ca26f2 100644 --- a/tests/Utils/Converter/PressureTypeTest.php +++ b/tests/Utils/Converter/PressureTypeTest.php @@ -36,7 +36,7 @@ class PressureTypeTest extends \PHPUnit\Framework\TestCase */ public function testUnique() : void { - self::assertEquals(PressureType::getConstants(), \array_unique(PressureType::getConstants())); + self::assertEquals(PressureType::getConstants(), array_unique(PressureType::getConstants())); } /** diff --git a/tests/Utils/Converter/SpeedTypeTest.php b/tests/Utils/Converter/SpeedTypeTest.php index a7a9d1547..7c7742551 100644 --- a/tests/Utils/Converter/SpeedTypeTest.php +++ b/tests/Utils/Converter/SpeedTypeTest.php @@ -36,7 +36,7 @@ class SpeedTypeTest extends \PHPUnit\Framework\TestCase */ public function testUnique() : void { - self::assertEquals(SpeedType::getConstants(), \array_unique(SpeedType::getConstants())); + self::assertEquals(SpeedType::getConstants(), array_unique(SpeedType::getConstants())); } /** diff --git a/tests/Utils/Converter/TemperatureTypeTest.php b/tests/Utils/Converter/TemperatureTypeTest.php index ed17e9ee2..a833ff9e9 100644 --- a/tests/Utils/Converter/TemperatureTypeTest.php +++ b/tests/Utils/Converter/TemperatureTypeTest.php @@ -36,7 +36,7 @@ class TemperatureTypeTest extends \PHPUnit\Framework\TestCase */ public function testUnique() : void { - self::assertEquals(TemperatureType::getConstants(), \array_unique(TemperatureType::getConstants())); + self::assertEquals(TemperatureType::getConstants(), array_unique(TemperatureType::getConstants())); } /** diff --git a/tests/Utils/Converter/TimeTypeTest.php b/tests/Utils/Converter/TimeTypeTest.php index 8a0e48f56..ecf0e825a 100644 --- a/tests/Utils/Converter/TimeTypeTest.php +++ b/tests/Utils/Converter/TimeTypeTest.php @@ -36,7 +36,7 @@ class TimeTypeTest extends \PHPUnit\Framework\TestCase */ public function testUnique() : void { - self::assertEquals(TimeType::getConstants(), \array_unique(TimeType::getConstants())); + self::assertEquals(TimeType::getConstants(), array_unique(TimeType::getConstants())); } /** diff --git a/tests/Utils/Converter/VolumeTypeTest.php b/tests/Utils/Converter/VolumeTypeTest.php index 9e5f62b7d..7c618f9a1 100644 --- a/tests/Utils/Converter/VolumeTypeTest.php +++ b/tests/Utils/Converter/VolumeTypeTest.php @@ -36,7 +36,7 @@ class VolumeTypeTest extends \PHPUnit\Framework\TestCase */ public function testUnique() : void { - self::assertEquals(VolumeType::getConstants(), \array_unique(VolumeType::getConstants())); + self::assertEquals(VolumeType::getConstants(), array_unique(VolumeType::getConstants())); } /** diff --git a/tests/Utils/Converter/WeightTypeTest.php b/tests/Utils/Converter/WeightTypeTest.php index 82821d70c..1d4d0ca68 100644 --- a/tests/Utils/Converter/WeightTypeTest.php +++ b/tests/Utils/Converter/WeightTypeTest.php @@ -36,7 +36,7 @@ class WeightTypeTest extends \PHPUnit\Framework\TestCase */ public function testUnique() : void { - self::assertEquals(WeightType::getConstants(), \array_unique(WeightType::getConstants())); + self::assertEquals(WeightType::getConstants(), array_unique(WeightType::getConstants())); } /** diff --git a/tests/Utils/Encoding/Huffman/HuffmanTest.php b/tests/Utils/Encoding/Huffman/HuffmanTest.php index 4af8305d4..acfda0e82 100644 --- a/tests/Utils/Encoding/Huffman/HuffmanTest.php +++ b/tests/Utils/Encoding/Huffman/HuffmanTest.php @@ -43,7 +43,7 @@ class HuffmanTest extends \PHPUnit\Framework\TestCase $huff = new Huffman(); self::assertEquals( - \hex2bin('a42f5debafd35bee6a940f78f38638fb3f4d6fd13cc672cf01d61bb1ce59e03cdbe89e8e56b5d63aa61387d1ba10'), + hex2bin('a42f5debafd35bee6a940f78f38638fb3f4d6fd13cc672cf01d61bb1ce59e03cdbe89e8e56b5d63aa61387d1ba10'), $huff->encode('This is a test message in order to test the encoding and decoding of the Huffman algorithm.') ); @@ -52,7 +52,7 @@ class HuffmanTest extends \PHPUnit\Framework\TestCase self::assertEquals( 'This is a test message in order to test the encoding and decoding of the Huffman algorithm.', - $man->decode(\hex2bin('a42f5debafd35bee6a940f78f38638fb3f4d6fd13cc672cf01d61bb1ce59e03cdbe89e8e56b5d63aa61387d1ba10')) + $man->decode(hex2bin('a42f5debafd35bee6a940f78f38638fb3f4d6fd13cc672cf01d61bb1ce59e03cdbe89e8e56b5d63aa61387d1ba10')) ); } } diff --git a/tests/Utils/Encoding/XorEncodingTest.php b/tests/Utils/Encoding/XorEncodingTest.php index 539028f22..f368ca2e5 100644 --- a/tests/Utils/Encoding/XorEncodingTest.php +++ b/tests/Utils/Encoding/XorEncodingTest.php @@ -31,7 +31,7 @@ class XorEncodingTest extends \PHPUnit\Framework\TestCase public function testEncoding() : void { $test = XorEncoding::encode('This is a test.', 'abcd'); - self::assertEquals(\hex2bin('350a0a17410b10440042170112164d'), XorEncoding::encode('This is a test.', 'abcd')); - self::assertEquals('This is a test.', XorEncoding::decode(\hex2bin('350a0a17410b10440042170112164d'), 'abcd')); + self::assertEquals(hex2bin('350a0a17410b10440042170112164d'), XorEncoding::encode('This is a test.', 'abcd')); + self::assertEquals('This is a test.', XorEncoding::decode(hex2bin('350a0a17410b10440042170112164d'), 'abcd')); } } diff --git a/tests/Utils/Git/CommitTest.php b/tests/Utils/Git/CommitTest.php index 862d26b73..8b14de0fb 100644 --- a/tests/Utils/Git/CommitTest.php +++ b/tests/Utils/Git/CommitTest.php @@ -214,7 +214,7 @@ class CommitTest extends \PHPUnit\Framework\TestCase { $commit = new Commit(); - $commit->setRepository(new Repository(\realpath(__DIR__ . '/../../../'))); - self::assertEquals(\realpath(__DIR__ . '/../../../'), $commit->getRepository()->getPath()); + $commit->setRepository(new Repository(realpath(__DIR__ . '/../../../'))); + self::assertEquals(realpath(__DIR__ . '/../../../'), $commit->getRepository()->getPath()); } } diff --git a/tests/Utils/Git/RepositoryTest.php b/tests/Utils/Git/RepositoryTest.php index 413c30e24..fcea5f025 100644 --- a/tests/Utils/Git/RepositoryTest.php +++ b/tests/Utils/Git/RepositoryTest.php @@ -30,9 +30,9 @@ class RepositoryTest extends \PHPUnit\Framework\TestCase */ public function testDefault() : void { - $repo = new Repository(\realpath(__DIR__ . '/../../../')); - self::assertTrue('phpOMS' === $repo->getName() || 'build' === $repo->getName()); - self::assertEquals(\str_replace('\\', '/', \realpath(__DIR__ . '/../../../.git')), \str_replace('\\', '/', $repo->getDirectoryPath())); - self::assertEquals(\realpath(__DIR__ . '/../../../'), $repo->getPath()); + $repo = new Repository(realpath(__DIR__ . '/../../../')); + self::assertTrue($repo->getName() === 'phpOMS' || $repo->getName() === 'build'); + self::assertEquals(str_replace('\\', '/', realpath(__DIR__ . '/../../../.git')), str_replace('\\', '/', $repo->getDirectoryPath())); + self::assertEquals(realpath(__DIR__ . '/../../../'), $repo->getPath()); } } diff --git a/tests/Utils/IO/Csv/CsvSettingsTest.php b/tests/Utils/IO/Csv/CsvSettingsTest.php index c659fde3e..7fc66e490 100644 --- a/tests/Utils/IO/Csv/CsvSettingsTest.php +++ b/tests/Utils/IO/Csv/CsvSettingsTest.php @@ -30,10 +30,10 @@ class CsvSettingsTest extends \PHPUnit\Framework\TestCase */ public function testFileDelimiter() : void { - self::assertEquals(':', CsvSettings::getFileDelimiter(\fopen(__DIR__ . '/colon.csv', 'r'))); - self::assertEquals(',', CsvSettings::getFileDelimiter(\fopen(__DIR__ . '/comma.csv', 'r'))); - self::assertEquals('|', CsvSettings::getFileDelimiter(\fopen(__DIR__ . '/pipe.csv', 'r'))); - self::assertEquals(';', CsvSettings::getFileDelimiter(\fopen(__DIR__ . '/semicolon.csv', 'r'))); + self::assertEquals(':', CsvSettings::getFileDelimiter(fopen(__DIR__ . '/colon.csv', 'r'))); + self::assertEquals(',', CsvSettings::getFileDelimiter(fopen(__DIR__ . '/comma.csv', 'r'))); + self::assertEquals('|', CsvSettings::getFileDelimiter(fopen(__DIR__ . '/pipe.csv', 'r'))); + self::assertEquals(';', CsvSettings::getFileDelimiter(fopen(__DIR__ . '/semicolon.csv', 'r'))); } /** @@ -43,9 +43,9 @@ class CsvSettingsTest extends \PHPUnit\Framework\TestCase */ public function testStringDelimiter() : void { - self::assertEquals(':', CsvSettings::getStringDelimiter(\file_get_contents(__DIR__ . '/colon.csv'))); - self::assertEquals(',', CsvSettings::getStringDelimiter(\file_get_contents(__DIR__ . '/comma.csv'))); - self::assertEquals('|', CsvSettings::getStringDelimiter(\file_get_contents(__DIR__ . '/pipe.csv'))); - self::assertEquals(';', CsvSettings::getStringDelimiter(\file_get_contents(__DIR__ . '/semicolon.csv'))); + self::assertEquals(':', CsvSettings::getStringDelimiter(file_get_contents(__DIR__ . '/colon.csv'))); + self::assertEquals(',', CsvSettings::getStringDelimiter(file_get_contents(__DIR__ . '/comma.csv'))); + self::assertEquals('|', CsvSettings::getStringDelimiter(file_get_contents(__DIR__ . '/pipe.csv'))); + self::assertEquals(';', CsvSettings::getStringDelimiter(file_get_contents(__DIR__ . '/semicolon.csv'))); } } diff --git a/tests/Utils/IO/Spreadsheet/SpreadsheetDatabaseMapperTest.php b/tests/Utils/IO/Spreadsheet/SpreadsheetDatabaseMapperTest.php index 11a763be3..62a9f82e7 100644 --- a/tests/Utils/IO/Spreadsheet/SpreadsheetDatabaseMapperTest.php +++ b/tests/Utils/IO/Spreadsheet/SpreadsheetDatabaseMapperTest.php @@ -48,19 +48,19 @@ class SpreadsheetDatabaseMapperTest extends \PHPUnit\Framework\TestCase return; } - if (\is_file(__DIR__ . '/spreadsheet.db')) { - \unlink(__DIR__ . '/spreadsheet.db'); + if (is_file(__DIR__ . '/spreadsheet.db')) { + unlink(__DIR__ . '/spreadsheet.db'); } - \copy(__DIR__ . '/backup.db', __DIR__ . '/spreadsheet.db'); + copy(__DIR__ . '/backup.db', __DIR__ . '/spreadsheet.db'); $this->sqlite = new SQLiteConnection(['db' => 'sqlite', 'database' => __DIR__ . '/spreadsheet.db']); } protected function tearDown() : void { - if (\is_file(__DIR__ . '/spreadsheet.db')) { - \unlink(__DIR__ . '/spreadsheet.db'); + if (is_file(__DIR__ . '/spreadsheet.db')) { + unlink(__DIR__ . '/spreadsheet.db'); } } @@ -362,8 +362,8 @@ class SpreadsheetDatabaseMapperTest extends \PHPUnit\Framework\TestCase */ public function testSelectOds() : void { - if (\is_file(__DIR__ . '/select.ods')) { - \unlink(__DIR__ . '/select.ods'); + if (is_file(__DIR__ . '/select.ods')) { + unlink(__DIR__ . '/select.ods'); } $mapper = new SpreadsheetDatabaseMapper($this->sqlite, __DIR__ . '/insert.ods'); @@ -402,8 +402,8 @@ class SpreadsheetDatabaseMapperTest extends \PHPUnit\Framework\TestCase self::assertTrue($this->compareSelectInsertSheet(__DIR__ . '/select.ods', __DIR__ . '/insert.ods')); - if (\is_file(__DIR__ . '/select.ods')) { - \unlink(__DIR__ . '/select.ods'); + if (is_file(__DIR__ . '/select.ods')) { + unlink(__DIR__ . '/select.ods'); } } @@ -414,8 +414,8 @@ class SpreadsheetDatabaseMapperTest extends \PHPUnit\Framework\TestCase */ public function testSelectXls() : void { - if (\is_file(__DIR__ . '/select.xls')) { - \unlink(__DIR__ . '/select.xls'); + if (is_file(__DIR__ . '/select.xls')) { + unlink(__DIR__ . '/select.xls'); } $mapper = new SpreadsheetDatabaseMapper($this->sqlite, __DIR__ . '/insert.xls'); @@ -454,8 +454,8 @@ class SpreadsheetDatabaseMapperTest extends \PHPUnit\Framework\TestCase self::assertTrue($this->compareSelectInsertSheet(__DIR__ . '/select.xls', __DIR__ . '/insert.xls')); - if (\is_file(__DIR__ . '/select.xls')) { - \unlink(__DIR__ . '/select.xls'); + if (is_file(__DIR__ . '/select.xls')) { + unlink(__DIR__ . '/select.xls'); } } @@ -466,8 +466,8 @@ class SpreadsheetDatabaseMapperTest extends \PHPUnit\Framework\TestCase */ public function testSelectXlsx() : void { - if (\is_file(__DIR__ . '/select.xlsx')) { - \unlink(__DIR__ . '/select.xlsx'); + if (is_file(__DIR__ . '/select.xlsx')) { + unlink(__DIR__ . '/select.xlsx'); } $mapper = new SpreadsheetDatabaseMapper($this->sqlite, __DIR__ . '/insert.xlsx'); @@ -506,8 +506,8 @@ class SpreadsheetDatabaseMapperTest extends \PHPUnit\Framework\TestCase self::assertTrue($this->compareSelectInsertSheet(__DIR__ . '/select.xlsx', __DIR__ . '/insert.xlsx')); - if (\is_file(__DIR__ . '/select.xlsx')) { - \unlink(__DIR__ . '/select.xlsx'); + if (is_file(__DIR__ . '/select.xlsx')) { + unlink(__DIR__ . '/select.xlsx'); } } diff --git a/tests/Utils/IO/Zip/GzTest.php b/tests/Utils/IO/Zip/GzTest.php index 6f5b102c9..0ee8c70ae 100644 --- a/tests/Utils/IO/Zip/GzTest.php +++ b/tests/Utils/IO/Zip/GzTest.php @@ -37,16 +37,16 @@ class GzTest extends \PHPUnit\Framework\TestCase self::assertFileExists(__DIR__ . '/test.gz'); - $a = \file_get_contents(__DIR__ . '/test a.txt'); + $a = file_get_contents(__DIR__ . '/test a.txt'); - \unlink(__DIR__ . '/test a.txt'); + unlink(__DIR__ . '/test a.txt'); self::assertFileDoesNotExist(__DIR__ . '/test a.txt'); self::assertTrue(Gz::unpack(__DIR__ . '/test.gz', __DIR__ . '/test a.txt')); self::assertFileExists(__DIR__ . '/test a.txt'); - self::assertEquals($a, \file_get_contents(__DIR__ . '/test a.txt')); + self::assertEquals($a, file_get_contents(__DIR__ . '/test a.txt')); - \unlink(__DIR__ . '/test.gz'); + unlink(__DIR__ . '/test.gz'); } /** @@ -66,7 +66,7 @@ class GzTest extends \PHPUnit\Framework\TestCase __DIR__ . '/test.gz' )); - \unlink(__DIR__ . '/test.gz'); + unlink(__DIR__ . '/test.gz'); } /** @@ -93,6 +93,6 @@ class GzTest extends \PHPUnit\Framework\TestCase self::assertFalse(Gz::unpack(__DIR__ . '/test.gz', __DIR__ . '/test a.txt')); - \unlink(__DIR__ . '/test.gz'); + unlink(__DIR__ . '/test.gz'); } } diff --git a/tests/Utils/IO/Zip/TarGzTest.php b/tests/Utils/IO/Zip/TarGzTest.php index fca791136..1ee6009b2 100644 --- a/tests/Utils/IO/Zip/TarGzTest.php +++ b/tests/Utils/IO/Zip/TarGzTest.php @@ -50,19 +50,19 @@ class TarGzTest extends \PHPUnit\Framework\TestCase self::assertFileExists(__DIR__ . '/test.tar.gz'); - $a = \file_get_contents(__DIR__ . '/test a.txt'); - $b = \file_get_contents(__DIR__ . '/test b.md'); - $c = \file_get_contents(__DIR__ . '/test/test c.txt'); - $d = \file_get_contents(__DIR__ . '/test/test d.txt'); - $e = \file_get_contents(__DIR__ . '/test/sub/test e.txt'); + $a = file_get_contents(__DIR__ . '/test a.txt'); + $b = file_get_contents(__DIR__ . '/test b.md'); + $c = file_get_contents(__DIR__ . '/test/test c.txt'); + $d = file_get_contents(__DIR__ . '/test/test d.txt'); + $e = file_get_contents(__DIR__ . '/test/sub/test e.txt'); - \unlink(__DIR__ . '/test a.txt'); - \unlink(__DIR__ . '/test b.md'); - \unlink(__DIR__ . '/test/test c.txt'); - \unlink(__DIR__ . '/test/test d.txt'); - \unlink(__DIR__ . '/test/sub/test e.txt'); - \rmdir(__DIR__ . '/test/sub'); - \rmdir(__DIR__ . '/test'); + unlink(__DIR__ . '/test a.txt'); + unlink(__DIR__ . '/test b.md'); + unlink(__DIR__ . '/test/test c.txt'); + unlink(__DIR__ . '/test/test d.txt'); + unlink(__DIR__ . '/test/sub/test e.txt'); + rmdir(__DIR__ . '/test/sub'); + rmdir(__DIR__ . '/test'); self::assertTrue(TarGz::unpack(__DIR__ . '/test.tar.gz', __DIR__)); @@ -74,13 +74,13 @@ class TarGzTest extends \PHPUnit\Framework\TestCase self::assertFileExists(__DIR__ . '/test/sub'); self::assertFileExists(__DIR__ . '/test'); - self::assertEquals($a, \file_get_contents(__DIR__ . '/test a.txt')); - self::assertEquals($b, \file_get_contents(__DIR__ . '/test b.md')); - self::assertEquals($c, \file_get_contents(__DIR__ . '/test/test c.txt')); - self::assertEquals($d, \file_get_contents(__DIR__ . '/test/test d.txt')); - self::assertEquals($e, \file_get_contents(__DIR__ . '/test/sub/test e.txt')); + self::assertEquals($a, file_get_contents(__DIR__ . '/test a.txt')); + self::assertEquals($b, file_get_contents(__DIR__ . '/test b.md')); + self::assertEquals($c, file_get_contents(__DIR__ . '/test/test c.txt')); + self::assertEquals($d, file_get_contents(__DIR__ . '/test/test d.txt')); + self::assertEquals($e, file_get_contents(__DIR__ . '/test/sub/test e.txt')); - \unlink(__DIR__ . '/test.tar.gz'); + unlink(__DIR__ . '/test.tar.gz'); } /** @@ -108,7 +108,7 @@ class TarGzTest extends \PHPUnit\Framework\TestCase __DIR__ . '/test2.tar.gz' )); - \unlink(__DIR__ . '/test2.tar.gz'); + unlink(__DIR__ . '/test2.tar.gz'); self::assertFalse(TarGz::pack( [ @@ -148,7 +148,7 @@ class TarGzTest extends \PHPUnit\Framework\TestCase TarGz::unpack(__DIR__ . '/abc/test3.tar.gz', __DIR__); self::assertFalse(TarGz::unpack(__DIR__ . '/abc/test3.tar.gz', __DIR__)); - \unlink(__DIR__ . '/test3.tar.gz'); + unlink(__DIR__ . '/test3.tar.gz'); self::assertTrue(TarGz::pack( [ @@ -159,6 +159,6 @@ class TarGzTest extends \PHPUnit\Framework\TestCase __DIR__ . '/invalidunpack.tar.gz' )); self::assertFalse(TarGz::unpack(__DIR__ . '/invalidunpack.tar.gz', __DIR__)); - \unlink(__DIR__ . '/invalidunpack.tar.gz'); + unlink(__DIR__ . '/invalidunpack.tar.gz'); } } diff --git a/tests/Utils/IO/Zip/TarTest.php b/tests/Utils/IO/Zip/TarTest.php index 13004e015..309a017a2 100644 --- a/tests/Utils/IO/Zip/TarTest.php +++ b/tests/Utils/IO/Zip/TarTest.php @@ -51,19 +51,19 @@ class TarTest extends \PHPUnit\Framework\TestCase self::assertFileExists(__DIR__ . '/test.tar'); - $a = \file_get_contents(__DIR__ . '/test a.txt'); - $b = \file_get_contents(__DIR__ . '/test b.md'); - $c = \file_get_contents(__DIR__ . '/test/test c.txt'); - $d = \file_get_contents(__DIR__ . '/test/test d.txt'); - $e = \file_get_contents(__DIR__ . '/test/sub/test e.txt'); + $a = file_get_contents(__DIR__ . '/test a.txt'); + $b = file_get_contents(__DIR__ . '/test b.md'); + $c = file_get_contents(__DIR__ . '/test/test c.txt'); + $d = file_get_contents(__DIR__ . '/test/test d.txt'); + $e = file_get_contents(__DIR__ . '/test/sub/test e.txt'); - \unlink(__DIR__ . '/test a.txt'); - \unlink(__DIR__ . '/test b.md'); - \unlink(__DIR__ . '/test/test c.txt'); - \unlink(__DIR__ . '/test/test d.txt'); - \unlink(__DIR__ . '/test/sub/test e.txt'); - \rmdir(__DIR__ . '/test/sub'); - \rmdir(__DIR__ . '/test'); + unlink(__DIR__ . '/test a.txt'); + unlink(__DIR__ . '/test b.md'); + unlink(__DIR__ . '/test/test c.txt'); + unlink(__DIR__ . '/test/test d.txt'); + unlink(__DIR__ . '/test/sub/test e.txt'); + rmdir(__DIR__ . '/test/sub'); + rmdir(__DIR__ . '/test'); self::assertTrue(Tar::unpack(__DIR__ . '/test.tar', __DIR__)); @@ -75,13 +75,13 @@ class TarTest extends \PHPUnit\Framework\TestCase self::assertFileExists(__DIR__ . '/test/sub'); self::assertFileExists(__DIR__ . '/test'); - self::assertEquals($a, \file_get_contents(__DIR__ . '/test a.txt')); - self::assertEquals($b, \file_get_contents(__DIR__ . '/test b.md')); - self::assertEquals($c, \file_get_contents(__DIR__ . '/test/test c.txt')); - self::assertEquals($d, \file_get_contents(__DIR__ . '/test/test d.txt')); - self::assertEquals($e, \file_get_contents(__DIR__ . '/test/sub/test e.txt')); + self::assertEquals($a, file_get_contents(__DIR__ . '/test a.txt')); + self::assertEquals($b, file_get_contents(__DIR__ . '/test b.md')); + self::assertEquals($c, file_get_contents(__DIR__ . '/test/test c.txt')); + self::assertEquals($d, file_get_contents(__DIR__ . '/test/test d.txt')); + self::assertEquals($e, file_get_contents(__DIR__ . '/test/sub/test e.txt')); - \unlink(__DIR__ . '/test.tar'); + unlink(__DIR__ . '/test.tar'); /* @todo not working, somehow it cannot open the test.tar // second test @@ -147,7 +147,7 @@ class TarTest extends \PHPUnit\Framework\TestCase __DIR__ . '/test2.tar' )); - \unlink(__DIR__ . '/test2.tar'); + unlink(__DIR__ . '/test2.tar'); } /** @@ -179,6 +179,6 @@ class TarTest extends \PHPUnit\Framework\TestCase Tar::unpack(__DIR__ . '/abc/test3.tar', __DIR__); self::assertFalse(Tar::unpack(__DIR__ . '/abc/test3.tar', __DIR__)); - \unlink(__DIR__ . '/test3.tar'); + unlink(__DIR__ . '/test3.tar'); } } diff --git a/tests/Utils/IO/Zip/ZipTest.php b/tests/Utils/IO/Zip/ZipTest.php index f552ec567..e37709c40 100644 --- a/tests/Utils/IO/Zip/ZipTest.php +++ b/tests/Utils/IO/Zip/ZipTest.php @@ -52,19 +52,19 @@ class ZipTest extends \PHPUnit\Framework\TestCase self::assertFileExists(__DIR__ . '/test.zip'); - $a = \file_get_contents(__DIR__ . '/test a.txt'); - $b = \file_get_contents(__DIR__ . '/test b.md'); - $c = \file_get_contents(__DIR__ . '/test/test c.txt'); - $d = \file_get_contents(__DIR__ . '/test/test d.txt'); - $e = \file_get_contents(__DIR__ . '/test/sub/test e.txt'); + $a = file_get_contents(__DIR__ . '/test a.txt'); + $b = file_get_contents(__DIR__ . '/test b.md'); + $c = file_get_contents(__DIR__ . '/test/test c.txt'); + $d = file_get_contents(__DIR__ . '/test/test d.txt'); + $e = file_get_contents(__DIR__ . '/test/sub/test e.txt'); - \unlink(__DIR__ . '/test a.txt'); - \unlink(__DIR__ . '/test b.md'); - \unlink(__DIR__ . '/test/test c.txt'); - \unlink(__DIR__ . '/test/test d.txt'); - \unlink(__DIR__ . '/test/sub/test e.txt'); - \rmdir(__DIR__ . '/test/sub'); - \rmdir(__DIR__ . '/test'); + unlink(__DIR__ . '/test a.txt'); + unlink(__DIR__ . '/test b.md'); + unlink(__DIR__ . '/test/test c.txt'); + unlink(__DIR__ . '/test/test d.txt'); + unlink(__DIR__ . '/test/sub/test e.txt'); + rmdir(__DIR__ . '/test/sub'); + rmdir(__DIR__ . '/test'); self::assertTrue(Zip::unpack(__DIR__ . '/test.zip', __DIR__)); @@ -76,13 +76,13 @@ class ZipTest extends \PHPUnit\Framework\TestCase self::assertFileExists(__DIR__ . '/test/sub'); self::assertFileExists(__DIR__ . '/test'); - self::assertEquals($a, \file_get_contents(__DIR__ . '/test a.txt')); - self::assertEquals($b, \file_get_contents(__DIR__ . '/test b.md')); - self::assertEquals($c, \file_get_contents(__DIR__ . '/test/test c.txt')); - self::assertEquals($d, \file_get_contents(__DIR__ . '/test/test d.txt')); - self::assertEquals($e, \file_get_contents(__DIR__ . '/test/sub/test e.txt')); + self::assertEquals($a, file_get_contents(__DIR__ . '/test a.txt')); + self::assertEquals($b, file_get_contents(__DIR__ . '/test b.md')); + self::assertEquals($c, file_get_contents(__DIR__ . '/test/test c.txt')); + self::assertEquals($d, file_get_contents(__DIR__ . '/test/test d.txt')); + self::assertEquals($e, file_get_contents(__DIR__ . '/test/sub/test e.txt')); - \unlink(__DIR__ . '/test.zip'); + unlink(__DIR__ . '/test.zip'); // second test self::assertTrue(Zip::pack( @@ -92,15 +92,15 @@ class ZipTest extends \PHPUnit\Framework\TestCase self::assertTrue(Zip::unpack(__DIR__ . '/test.zip', __DIR__ . '/new_dir')); self::assertFileExists(__DIR__ . '/new_dir'); - self::assertEquals($c, \file_get_contents(__DIR__ . '/new_dir/test c.txt')); + self::assertEquals($c, file_get_contents(__DIR__ . '/new_dir/test c.txt')); - \unlink(__DIR__ . '/new_dir/test c.txt'); - \unlink(__DIR__ . '/new_dir/test d.txt'); - \unlink(__DIR__ . '/new_dir/sub/test e.txt'); - \rmdir(__DIR__ . '/new_dir/sub'); - \rmdir(__DIR__ . '/new_dir'); + unlink(__DIR__ . '/new_dir/test c.txt'); + unlink(__DIR__ . '/new_dir/test d.txt'); + unlink(__DIR__ . '/new_dir/sub/test e.txt'); + rmdir(__DIR__ . '/new_dir/sub'); + rmdir(__DIR__ . '/new_dir'); - \unlink(__DIR__ . '/test.zip'); + unlink(__DIR__ . '/test.zip'); } /** @@ -163,7 +163,7 @@ class ZipTest extends \PHPUnit\Framework\TestCase __DIR__ . '/test2.zip' )); - \unlink(__DIR__ . '/test2.zip'); + unlink(__DIR__ . '/test2.zip'); } /** @@ -195,6 +195,6 @@ class ZipTest extends \PHPUnit\Framework\TestCase Zip::unpack(__DIR__ . '/abc/test3.zip', __DIR__); self::assertFalse(Zip::unpack(__DIR__ . '/abc/test3.zip', __DIR__)); - \unlink(__DIR__ . '/test3.zip'); + unlink(__DIR__ . '/test3.zip'); } } diff --git a/tests/Utils/ImageUtilsTest.php b/tests/Utils/ImageUtilsTest.php index 90a690973..6660a7dc6 100644 --- a/tests/Utils/ImageUtilsTest.php +++ b/tests/Utils/ImageUtilsTest.php @@ -33,7 +33,7 @@ class ImageUtilsTest extends \PHPUnit\Framework\TestCase public function testImage() : void { self::assertEquals( - \file_get_contents(__DIR__ . '/logo.png'), + file_get_contents(__DIR__ . '/logo.png'), ImageUtils::decodeBase64Image( 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAjUAAAIUCAYAAADi5d0LAAAACXBIWXMAAAsTAAALEwEAmpwYAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH/w/qQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZTAKAEAGDLY2LjAFAtAGAnf+bTAICd+Jl7AQBblCEVAaCRACATZYhEAGg7AKzPVopFAFgwABRmS8Q5ANgtADBJV2ZIALC3AMDOEAuyAAgMADBRiIUpAAR7AGDIIyN4AISZABRG8lc88SuuEOcqAAB4mbI8uSQ5RYFbCC1xB1dXLh4ozkkXKxQ2YQJhmkAuwnmZGTKBNA/g88wAAKCR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OUvOQo6JLb6ROUiNiriQhB3ABdBrhfOfs+32P/0XzC+xzDyUp7S4QLt6zx13s3rOfzSFmzZozjSK5MH1jD26gaUsijzFnCDQISIQVxMjy7uU+Rl28h3r6M48to0dKlC/2OI+1O95tyvIZTqldk0/FfXojLtqEwbbmIIlWmn52fvagXA2QPcAdwxtG3tOqX8t4uEfz+4NZxohekYDT3H+A/+Ap3tXDVrUOo2SqEm1SrWl770penXN998c9U+16i4+eInv/RDnnv+Rd5z9RbedeW5dLSBityM9SbFwNi9FUzE0GPLFhdNIHYCvwB95+zFBo8TTcXvDSYhmkKdfr3H6Td0su9Hp4ISGX5xI/seOxsRoWNjFvgZRIyX6ylklOkKxw+O4+XuzV7+3/+g/L07DhGVINvR0DM//JUPYkdeIX/+ewEoXP6RJgecoX3EPZxaZyNaezY9N915zPf9wS20J6/b3vQr09/PnfO2+Fq8/v0zkHDypbFF44IbAOi56N1HfFbX+TfMDRc/9Ut1P9/UbZRCTapUcwLOXHrooYeW9HlaCVFkEWd5YuckBznAlWf1cO7GDtobkQbecrDjEhdXGAczOxu7kgTQXoSXGUZ7w0nw8RPAPdgy6uz/qBD7KWwZhl/qy/gdfc7btc6Wi/+G0mOx1ab5YmdG7/4vuMn9SDCJbl/bUi6rVKlWuv7/AJXLuNzWrssIAAAAAElFTkSuQmCC' ) diff --git a/tests/Utils/Parser/Markdown/MarkdownTest.php b/tests/Utils/Parser/Markdown/MarkdownTest.php index e43c3fba1..333707426 100644 --- a/tests/Utils/Parser/Markdown/MarkdownTest.php +++ b/tests/Utils/Parser/Markdown/MarkdownTest.php @@ -31,10 +31,10 @@ class MarkdownTest extends \PHPUnit\Framework\TestCase $files = Directory::list(__DIR__ . '/data'); foreach ($files as $file) { - $data = \explode('.', $file); + $data = explode('.', $file); if ($data[1] === 'md' - && (\file_get_contents(__DIR__ . '/data/' . $data[0] . '.html') !== ($parsed = Markdown::parse(\file_get_contents(__DIR__ . '/data/' . $data[0] . '.md')))) + && (file_get_contents(__DIR__ . '/data/' . $data[0] . '.html') !== ($parsed = Markdown::parse(file_get_contents(__DIR__ . '/data/' . $data[0] . '.md')))) ) { self::assertTrue(false, $file . "\n\n" . $parsed); } diff --git a/tests/Utils/RnG/DateTimeTest.php b/tests/Utils/RnG/DateTimeTest.php index b127ee4c3..ae210979f 100644 --- a/tests/Utils/RnG/DateTimeTest.php +++ b/tests/Utils/RnG/DateTimeTest.php @@ -34,8 +34,8 @@ class DateTimeTest extends \PHPUnit\Framework\TestCase $dateMin = new \DateTime(); $dateMax = new \DateTime(); - $min = \mt_rand(0, (int) (2147483647 / 2)); - $max = \mt_rand($min + 10, 2147483647); + $min = mt_rand(0, (int) (2147483647 / 2)); + $max = mt_rand($min + 10, 2147483647); $dateMin->setTimestamp($min); $dateMax->setTimestamp($max); diff --git a/tests/Utils/RnG/DistributionTypeTest.php b/tests/Utils/RnG/DistributionTypeTest.php index 173c02594..5d0e8a2f6 100644 --- a/tests/Utils/RnG/DistributionTypeTest.php +++ b/tests/Utils/RnG/DistributionTypeTest.php @@ -36,7 +36,7 @@ class DistributionTypeTest extends \PHPUnit\Framework\TestCase */ public function testUnique() : void { - self::assertEquals(DistributionType::getConstants(), \array_unique(DistributionType::getConstants())); + self::assertEquals(DistributionType::getConstants(), array_unique(DistributionType::getConstants())); } /** diff --git a/tests/Utils/TaskSchedule/CronTest.php b/tests/Utils/TaskSchedule/CronTest.php index df296e989..3006786a6 100644 --- a/tests/Utils/TaskSchedule/CronTest.php +++ b/tests/Utils/TaskSchedule/CronTest.php @@ -26,7 +26,7 @@ class CronTest extends \PHPUnit\Framework\TestCase { protected function setUp() : void { - if (\stripos(\PHP_OS, 'LINUX') === false) { + if (stripos(\PHP_OS, 'LINUX') === false) { $this->markTestSkipped( 'The OS is not linux.' ); diff --git a/tests/Utils/TaskSchedule/IntervalTest.php b/tests/Utils/TaskSchedule/IntervalTest.php index a3c4fec35..96d2c303a 100644 --- a/tests/Utils/TaskSchedule/IntervalTest.php +++ b/tests/Utils/TaskSchedule/IntervalTest.php @@ -42,7 +42,7 @@ class IntervalTest extends \PHPUnit\Framework\TestCase self::assertEquals([], $interval->getMonth()); self::assertEquals([], $interval->getDayOfWeek()); self::assertEquals([], $interval->getYear()); - self::assertEquals(\json_encode([ + self::assertEquals(json_encode([ 'start' => $dt->format('Y-m-d H:i:s'), 'end' => null, 'maxDuration' => 0, @@ -298,7 +298,7 @@ class IntervalTest extends \PHPUnit\Framework\TestCase $interval->addDayOfMonth(1, 3, 2); $interval->addDayOfWeek(1, 3, 2); - self::assertEquals(\json_encode([ + self::assertEquals(json_encode([ 'start' => '2015-08-14 00:00:00', 'end' => '2018-10-30 00:00:00', 'maxDuration' => 30, diff --git a/tests/Utils/TaskSchedule/SchedulerAbstractTest.php b/tests/Utils/TaskSchedule/SchedulerAbstractTest.php index 8e486089c..dd32bfa20 100644 --- a/tests/Utils/TaskSchedule/SchedulerAbstractTest.php +++ b/tests/Utils/TaskSchedule/SchedulerAbstractTest.php @@ -30,7 +30,7 @@ class SchedulerAbstractTest extends \PHPUnit\Framework\TestCase */ public function testDefault() : void { - self::assertTrue(SchedulerAbstract::getBin() === '' || \is_file(SchedulerAbstract::getBin())); + self::assertTrue(SchedulerAbstract::getBin() === '' || is_file(SchedulerAbstract::getBin())); } /** diff --git a/tests/Utils/TaskSchedule/TaskSchedulerTest.php b/tests/Utils/TaskSchedule/TaskSchedulerTest.php index 37611bba6..45fdc2512 100644 --- a/tests/Utils/TaskSchedule/TaskSchedulerTest.php +++ b/tests/Utils/TaskSchedule/TaskSchedulerTest.php @@ -26,7 +26,7 @@ class TaskSchedulerTest extends \PHPUnit\Framework\TestCase { protected function setUp() : void { - if (\stripos(\PHP_OS, 'WIN') === false) { + if (stripos(\PHP_OS, 'WIN') === false) { $this->markTestSkipped( 'The OS is not windows.' ); diff --git a/tests/Validation/Base/JsonTest.php b/tests/Validation/Base/JsonTest.php index 18ca1b7bc..e5d1c79f1 100644 --- a/tests/Validation/Base/JsonTest.php +++ b/tests/Validation/Base/JsonTest.php @@ -41,9 +41,9 @@ class JsonTest extends \PHPUnit\Framework\TestCase */ public function testJsonTemplate() : void { - $template = \json_decode(\file_get_contents(__DIR__ . '/json/template.json'), true); + $template = json_decode(file_get_contents(__DIR__ . '/json/template.json'), true); - $valid = \json_decode(\file_get_contents(__DIR__ . '/json/valid.json'), true); + $valid = json_decode(file_get_contents(__DIR__ . '/json/valid.json'), true); self::assertTrue(Json::validateTemplate($template, $valid)); self::assertTrue(Json::validateTemplate($template, $valid, true)); } @@ -55,9 +55,9 @@ class JsonTest extends \PHPUnit\Framework\TestCase */ public function testJsonTemplateAdditional() : void { - $template = \json_decode(\file_get_contents(__DIR__ . '/json/template.json'), true); + $template = json_decode(file_get_contents(__DIR__ . '/json/template.json'), true); - $additional = \json_decode(\file_get_contents(__DIR__ . '/json/additional.json'), true); + $additional = json_decode(file_get_contents(__DIR__ . '/json/additional.json'), true); self::assertTrue(Json::validateTemplate($template, $additional)); } @@ -68,9 +68,9 @@ class JsonTest extends \PHPUnit\Framework\TestCase */ public function testJsonTemplateInvalidAdditional() : void { - $template = \json_decode(\file_get_contents(__DIR__ . '/json/template.json'), true); + $template = json_decode(file_get_contents(__DIR__ . '/json/template.json'), true); - $additional = \json_decode(\file_get_contents(__DIR__ . '/json/additional.json'), true); + $additional = json_decode(file_get_contents(__DIR__ . '/json/additional.json'), true); self::assertFalse(Json::validateTemplate($template, $additional, true)); } @@ -81,9 +81,9 @@ class JsonTest extends \PHPUnit\Framework\TestCase */ public function testJsonTemplateInvalidMissing() : void { - $template = \json_decode(\file_get_contents(__DIR__ . '/json/template.json'), true); + $template = json_decode(file_get_contents(__DIR__ . '/json/template.json'), true); - $incomplete = \json_decode(\file_get_contents(__DIR__ . '/json/incomplete.json'), true); + $incomplete = json_decode(file_get_contents(__DIR__ . '/json/incomplete.json'), true); self::assertFalse(Json::validateTemplate($template, $incomplete)); } @@ -94,9 +94,9 @@ class JsonTest extends \PHPUnit\Framework\TestCase */ public function testInvalidJsonTemplate() : void { - $template = \json_decode(\file_get_contents(__DIR__ . '/json/template.json'), true); + $template = json_decode(file_get_contents(__DIR__ . '/json/template.json'), true); - $invalid = \json_decode(\file_get_contents(__DIR__ . '/json/invalid.json'), true); + $invalid = json_decode(file_get_contents(__DIR__ . '/json/invalid.json'), true); self::assertFalse(Json::validateTemplate($template, $invalid)); } } diff --git a/tests/Validation/Finance/IbanEnumTest.php b/tests/Validation/Finance/IbanEnumTest.php index cdd799e9c..cd6795823 100644 --- a/tests/Validation/Finance/IbanEnumTest.php +++ b/tests/Validation/Finance/IbanEnumTest.php @@ -31,9 +31,9 @@ class IbanEnumTest extends \PHPUnit\Framework\TestCase $ok = true; foreach ($enums as $enum) { - $temp = \substr($enum, 2); + $temp = substr($enum, 2); - if (\preg_match('/[^kbsxcinm0at\ ]/', $temp) === 1) { + if (preg_match('/[^kbsxcinm0at\ ]/', $temp) === 1) { $ok = false; break; diff --git a/tests/Validation/Finance/IbanErrorTypeTest.php b/tests/Validation/Finance/IbanErrorTypeTest.php index dd286003f..18e2424e7 100644 --- a/tests/Validation/Finance/IbanErrorTypeTest.php +++ b/tests/Validation/Finance/IbanErrorTypeTest.php @@ -36,7 +36,7 @@ class IbanErrorTypeTest extends \PHPUnit\Framework\TestCase */ public function testUnique() : void { - self::assertEquals(IbanErrorType::getConstants(), \array_unique(IbanErrorType::getConstants())); + self::assertEquals(IbanErrorType::getConstants(), array_unique(IbanErrorType::getConstants())); } /**