Skip to content

Commit feb22ee

Browse files
committed
Use revolt
1 parent 5e685b0 commit feb22ee

3 files changed

Lines changed: 17 additions & 8 deletions

File tree

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
The MIT License (MIT)
22

3-
Copyright (c) 2017 amphp
3+
Copyright (c) 2017-2021 amphp
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

composer.json

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,18 @@
1414
"Amp\\WindowsRegistry\\": "lib"
1515
}
1616
},
17+
"prefer-stable": true,
18+
"minimum-stability": "dev",
19+
"repositories": [
20+
{
21+
"type": "vcs",
22+
"url": "git@github.com:revolt-php/event-loop.git"
23+
}
24+
],
1725
"require": {
18-
"amphp/amp": "^3-dev",
19-
"amphp/byte-stream": "^2-dev",
20-
"amphp/process": "^2-dev"
26+
"amphp/amp": "dev-v3-revolt",
27+
"amphp/byte-stream": "dev-v2-revolt",
28+
"amphp/process": "dev-v2-revolt"
2129
},
2230
"require-dev": {
2331
"amphp/php-cs-fixer-config": "dev-master"

lib/WindowsRegistry.php

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@ public function read(string $key): ?string
1717

1818
$lines = $this->query($key);
1919

20-
$lines = \array_filter($lines, function ($line) {
20+
$lines = \array_filter($lines, static function ($line) {
2121
return '' !== $line && $line[0] === ' ';
2222
});
2323

24-
$values = \array_map(function ($line) {
24+
$values = \array_map(static function ($line) {
2525
return \preg_split("(\\s+)", \ltrim($line), 3);
2626
}, $lines);
2727

@@ -38,7 +38,8 @@ public function read(string $key): ?string
3838
}
3939

4040
if ($foundValue) {
41-
throw new KeyNotFoundException("Windows registry key '{$key}\\{$value}' was found, but could not be read correctly, got " . \var_export($foundValue, true));
41+
throw new KeyNotFoundException("Windows registry key '{$key}\\{$value}' was found, but could not be read correctly, got " . \var_export($foundValue,
42+
true));
4243
}
4344

4445
throw new KeyNotFoundException("Windows registry key '{$key}\\{$value}' not found.");
@@ -48,7 +49,7 @@ public function listKeys(string $key): array
4849
{
4950
$lines = $this->query($key);
5051

51-
$lines = \array_filter($lines, function ($line) {
52+
$lines = \array_filter($lines, static function ($line) {
5253
return '' !== $line && $line[0] !== ' ';
5354
});
5455

0 commit comments

Comments
 (0)