One Hat Cyber Team
Your IP :
216.73.216.55
Server IP :
5.189.175.239
Server :
Linux panel.gemx-ai.com 5.14.0-570.19.1.el9_6.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Jun 4 04:00:24 EDT 2025 x86_64
Server Software :
LiteSpeed
PHP Version :
8.2.28
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
opt
/
cpanel
/
ea-wappspector
/
src
/
Matchers
/
View File Name :
Composer.php
<?php namespace Plesk\Wappspector\Matchers; use JsonException; use League\Flysystem\Filesystem; use League\Flysystem\FilesystemException; use Plesk\Wappspector\MatchResult\Composer as MatchResult; use Plesk\Wappspector\MatchResult\EmptyMatchResult; use Plesk\Wappspector\MatchResult\MatchResultInterface; class Composer implements MatcherInterface { use UpLevelMatcherTrait; private function getPath(string $path): string { return rtrim($path, '/') . '/composer.json'; } /** * @throws FilesystemException */ protected function doMatch(Filesystem $fs, string $path): MatchResultInterface { $composerJsonFile = $this->getPath($path); if (!$fs->fileExists($composerJsonFile)) { return new EmptyMatchResult(); } $json = []; try { $json = json_decode($fs->read($composerJsonFile), true, 512, JSON_THROW_ON_ERROR); } catch (JsonException) { // ignore composer.json errors } return new MatchResult($path, $json['version'] ?? 'dev', $json['name'] ?? 'unknown'); } }