Add return types to anonymous functions
authorTim Düsterhus <duesterhus@woltlab.com>
Fri, 12 Feb 2021 09:38:34 +0000 (10:38 +0100)
committerTim Düsterhus <duesterhus@woltlab.com>
Fri, 12 Feb 2021 09:38:34 +0000 (10:38 +0100)
wcfsetup/install/files/lib/system/devtools/package/DevtoolsPackageArchive.class.php

index bbb540bce2bbeb95a928a1555246a6a26103006e..d1d64df7ee36785fc15a14b019ba69bf6f08f413 100644 (file)
@@ -41,7 +41,7 @@ class DevtoolsPackageArchive extends PackageArchive
         $it = new \RecursiveIteratorIterator(
             new \RecursiveCallbackFilterIterator(
                 new \RecursiveDirectoryIterator($projectDir),
-                static function (\SplFileInfo $current, string $key, \RecursiveDirectoryIterator $it) {
+                static function (\SplFileInfo $current, string $key, \RecursiveDirectoryIterator $it): bool {
                     // Skip '.' and '..'.
                     if ($it->isDot()) {
                         return false;
@@ -83,7 +83,7 @@ class DevtoolsPackageArchive extends PackageArchive
                 }
             )
         );
-        $readFiles = \array_map(static function (\SplFileInfo $f) {
+        $readFiles = \array_map(static function (\SplFileInfo $f): string {
             return $f->getPathname();
         }, \iterator_to_array($it));