summaryrefslogtreecommitdiffstats
path: root/vendor/maxmind-db/reader/autoload.php
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--vendor/maxmind-db/reader/autoload.php14
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;
}