Differential D25039 Diff 96 src/lint/linter/xhpast/rules/ArcanistPHPCompatibilityXHPASTLinterRule.php
Changeset View
Changeset View
Standalone View
Standalone View
src/lint/linter/xhpast/rules/ArcanistPHPCompatibilityXHPASTLinterRule.php
Show First 20 Lines • Show All 149 Lines • ▼ Show 20 Lines | foreach ($calls as $call) { | ||||
$version)); | $version)); | ||||
} | } | ||||
} | } | ||||
} | } | ||||
if ($this->windowsVersion) { | if ($this->windowsVersion) { | ||||
$windows = idx($compat_info['functions_windows'], $name); | $windows = idx($compat_info['functions_windows'], $name); | ||||
if ($windows === false) { | if ($windows === null) { | ||||
// This function has no special Windows considerations. | |||||
} else if ($windows === false) { | |||||
$this->raiseLintAtNode( | $this->raiseLintAtNode( | ||||
$node, | $node, | ||||
pht( | pht( | ||||
'This codebase targets PHP %s on Windows, '. | 'This codebase targets PHP %s on Windows, '. | ||||
'but `%s()` is not available there.', | 'but `%s()` is not available there.', | ||||
$this->windowsVersion, | $this->windowsVersion, | ||||
$name)); | $name)); | ||||
} else if (version_compare($windows, $this->windowsVersion, '>')) { | } else if (version_compare($windows, $this->windowsVersion, '>')) { | ||||
▲ Show 20 Lines • Show All 321 Lines • Show Last 20 Lines |
Content licensed under Creative Commons Attribution-ShareAlike 4.0 (CC-BY-SA) unless otherwise noted; code licensed under Apache 2.0 or other open source licenses. · CC BY-SA 4.0 · Apache 2.0