| Server IP : 172.67.153.42 / Your IP : 216.73.217.138 Web Server : Apache System : Linux vps-850873.bgcolombia.com 3.10.0-1160.144.1.el7.tuxcare.els5.x86_64 #1 SMP Wed May 13 12:31:54 UTC 2026 x86_64 User : melizav ( 1018) PHP Version : 7.4.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON 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();
}
}