| Server IP : 103.243.232.44 / Your IP : 216.73.216.69 Web Server : LiteSpeed System : Linux server17213-10344.hostycare.online 5.14.0-687.38.1.el9_8.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Aug 12 17:19:12 EDT 2026 x86_64 User : iamakash ( 1400) PHP Version : 8.1.34 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /opt/cpanel/ea-wappspector/src/Matchers/ |
Upload File : |
<?php
declare(strict_types=1);
namespace Plesk\Wappspector\Matchers;
use League\Flysystem\Filesystem;
use Plesk\Wappspector\MatchResult\EmDash as MatchResult;
use Plesk\Wappspector\MatchResult\EmptyMatchResult;
use Plesk\Wappspector\MatchResult\MatchResultInterface;
class EmDash implements MatcherInterface
{
public function match(Filesystem $fs, string $path): MatchResultInterface
{
$packageJsonPath = rtrim($path, '/') . '/package.json';
if (!$fs->fileExists($packageJsonPath)) {
return new EmptyMatchResult();
}
$json = json_decode($fs->read($packageJsonPath), true);
return is_array($json) && (isset($json['emdash']) || isset($json['dependencies']['emdash']))
? new MatchResult($path)
: new EmptyMatchResult();
}
}