✏️ 正在编辑: EmDash.php
路径:
/opt/cpanel/ea-wappspector/src/Matchers/EmDash.php
提示:
您可以编辑任何文件(包括二进制文件),但请注意不当修改可能导致文件损坏。
<?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(); } }
💾 保存文件
← 返回文件管理器