src/StaticWebServer.php
public function getContentType($filePath)
    {
        $pathInfo = pathinfo($filePath);

        if (!isset($pathInfo['extension'])) {
            $extension = '';
        } else {
            $extension = $pathInfo['extension'];
        }

        $repository = new PhpRepository();
        $type = $repository->findType($extension);

        if ($type === null) {
            $type = 'text/plain';
        }

        return $type;
    }
public function getContentType($filePath)
    {
        $pathInfo = pathinfo($filePath);

        if (!isset($pathInfo['extension'])) {
            $extension = '';
        } else {
            $extension = $pathInfo['extension'];
        }

        $repository = new PhpRepository();
        $type = $repository->findType($extension);

        if ($type === null) {
            $type = 'text/plain';
        }

        return $type;
    }
@param string $filePath

@return string