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(); } }