diff options
author | Anton Luka Šijanec <anton@sijanec.eu> | 2024-05-27 13:08:29 +0200 |
---|---|---|
committer | Anton Luka Šijanec <anton@sijanec.eu> | 2024-05-27 13:08:29 +0200 |
commit | 75160b12821f7f4299cce7f0b69c83c1502ae071 (patch) | |
tree | 27e25e4ccaef45f0c58b22831164050d1af1d4db /vendor/maxmind-db/reader/autoload.php | |
parent | prvi-commit (diff) | |
download | 1ka-75160b12821f7f4299cce7f0b69c83c1502ae071.tar 1ka-75160b12821f7f4299cce7f0b69c83c1502ae071.tar.gz 1ka-75160b12821f7f4299cce7f0b69c83c1502ae071.tar.bz2 1ka-75160b12821f7f4299cce7f0b69c83c1502ae071.tar.lz 1ka-75160b12821f7f4299cce7f0b69c83c1502ae071.tar.xz 1ka-75160b12821f7f4299cce7f0b69c83c1502ae071.tar.zst 1ka-75160b12821f7f4299cce7f0b69c83c1502ae071.zip |
Diffstat (limited to '')
-rw-r--r-- | vendor/maxmind-db/reader/autoload.php | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/vendor/maxmind-db/reader/autoload.php b/vendor/maxmind-db/reader/autoload.php index c79126f..7dab1eb 100644 --- a/vendor/maxmind-db/reader/autoload.php +++ b/vendor/maxmind-db/reader/autoload.php @@ -1,5 +1,7 @@ <?php
+declare(strict_types=1);
+
/**
* PSR-4 autoloader implementation for the MaxMind\DB namespace.
* First we define the 'mmdb_autoload' function, and then we register
@@ -14,7 +16,7 @@ * @param string $class
* the name of the class to load
*/
-function mmdb_autoload($class)
+function mmdb_autoload($class): void
{
/*
* A project-specific mapping between the namespaces and where
@@ -26,16 +28,16 @@ function mmdb_autoload($class) $namespace_map = ['MaxMind\\Db\\' => __DIR__ . '/src/MaxMind/Db/'];
foreach ($namespace_map as $prefix => $dir) {
- /* First swap out the namespace prefix with a directory... */
+ // First swap out the namespace prefix with a directory...
$path = str_replace($prefix, $dir, $class);
- /* replace the namespace separator with a directory separator... */
+ // replace the namespace separator with a directory separator...
$path = str_replace('\\', '/', $path);
- /* and finally, add the PHP file extension to the result. */
- $path = $path . '.php';
+ // and finally, add the PHP file extension to the result.
+ $path .= '.php';
- /* $path should now contain the path to a PHP file defining $class */
+ // $path should now contain the path to a PHP file defining $class
if (file_exists($path)) {
include $path;
}
|