diff --git a/src/Helpers/Arr.php b/src/Helpers/Arr.php index cd4dd80..f5f7821 100644 --- a/src/Helpers/Arr.php +++ b/src/Helpers/Arr.php @@ -18,6 +18,7 @@ public static function mapToAssoc(array $items, callable $callback) return array_reduce($items, function (array $assoc, $item) use ($callback) { list($key, $value) = $callback($item); $assoc[$key] = $value; + return $assoc; }, []); } diff --git a/src/Url.php b/src/Url.php index 7b0b084..e457ba6 100644 --- a/src/Url.php +++ b/src/Url.php @@ -196,7 +196,7 @@ protected function sanitizeScheme(string $scheme): string { $scheme = strtolower($scheme); - if (! in_array($scheme, static::VALID_SCHEMES)) { + if (!in_array($scheme, static::VALID_SCHEMES)) { throw InvalidArgument::invalidScheme($scheme); } @@ -245,7 +245,7 @@ public function withDirname(string $dirname) { $dirname = trim($dirname, '/'); - if (! $this->getBasename()) { + if (!$this->getBasename()) { return $this->withPath($dirname); }