Skip to content

Commit a0a2b72

Browse files
authored
Merge pull request #165 from editorconfig-checker/add-arm64
feat: add arm support
2 parents b730036 + 05347c2 commit a0a2b72

1 file changed

Lines changed: 10 additions & 10 deletions

File tree

src/EditorconfigChecker/Utilities.php

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,17 +11,17 @@ public static function getCurrentArch(): string
1111
{
1212
$arch = php_uname('m');
1313

14-
if ($arch === "x86_64") {
15-
$arch = "amd64";
16-
} elseif ($arch === "i386") {
17-
$arch = "386";
18-
} else {
19-
// TODO: Whats here?
20-
printf('ERROR: Unexpected, please contact the maintainer or provide a pull request :)%s', PHP_EOL);
21-
exit(1);
14+
switch ($arch) {
15+
case 'x86_64':
16+
return "amd64";
17+
case 'i386':
18+
return "386";
19+
case 'aarch64':
20+
return "arm64";
21+
default:
22+
printf('ERROR: Unexpected, please contact the maintainer or provide a pull request :)%s', PHP_EOL);
23+
exit(1);
2224
}
23-
24-
return $arch;
2525
}
2626

2727
/**

0 commit comments

Comments
 (0)