Skip to content

Commit 713b2c6

Browse files
Make use of arrow functions
1 parent 0f0ad22 commit 713b2c6

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

src/Runner/Installer.php

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -190,18 +190,12 @@ public function run(): void
190190
*/
191191
public function getHooksToInstall(): array
192192
{
193-
// callback to write bool true to all array entries
194193
// to make sure the user will be asked to confirm every hook installation
195194
// unless the user provided the force or skip option
196-
$callback = function () {
197-
return true;
198-
};
199-
// if a specific hook is set, the use has actively chosen it, so don't ask for permission anymore
195+
// if specific hooks are set, the use has actively chosen it, so don't ask for permission anymore
200196
return empty($this->hooksToHandle)
201-
? array_map($callback, Hooks::nativeHooks())
202-
: array_map(static function (): bool {
203-
return false;
204-
}, array_flip($this->hooksToHandle));
197+
? array_map(fn ($hook) => true, Hooks::nativeHooks())
198+
: array_map(fn ($hook) => false, array_flip($this->hooksToHandle));
205199
}
206200

207201
/**

0 commit comments

Comments
 (0)