From 50ff113032a38da1352fef2ef9ec6205dca0eb44 Mon Sep 17 00:00:00 2001 From: arnoson Date: Thu, 28 Dec 2023 15:30:06 +0100 Subject: [PATCH] chore: cleanup --- composer.json | 1 - composer.lock | 57 +----------------------------------------------- lib/Analyzer.php | 10 --------- 3 files changed, 1 insertion(+), 67 deletions(-) diff --git a/composer.json b/composer.json index bc1aa7f..7e7dd7c 100644 --- a/composer.json +++ b/composer.json @@ -10,7 +10,6 @@ }, "require": { "getkirby/composer-installer": "^1.2", - "cbschuld/browser.php": "^1.9", "matomo/device-detector": "^6.1", "jaybizzle/crawler-detect": "^1.2" }, diff --git a/composer.lock b/composer.lock index 88896ee..697fc0c 100644 --- a/composer.lock +++ b/composer.lock @@ -4,63 +4,8 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "7ffc1d1e07c05b6e4f7ec559b7e05966", + "content-hash": "3f11875db78c489217463ff506fff0b5", "packages": [ - { - "name": "cbschuld/browser.php", - "version": "v1.9.6", - "source": { - "type": "git", - "url": "https://github.com/cbschuld/Browser.php.git", - "reference": "9d07d6410977d494d7b8ecc2f3c877645c5477d9" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/cbschuld/Browser.php/zipball/9d07d6410977d494d7b8ecc2f3c877645c5477d9", - "reference": "9d07d6410977d494d7b8ecc2f3c877645c5477d9", - "shasum": "" - }, - "require": { - "php": ">=7.2" - }, - "require-dev": { - "phpunit/phpunit": "^8" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.9.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/Browser.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Chris Schuld", - "email": "chris@chrisschuld.com", - "homepage": "https://chrisschuld.com" - } - ], - "description": "A PHP Class to detect a user's Browser. This encapsulation provides a breakdown of the browser and the version of the browser using the browser's user-agent string. This is not a guaranteed solution but provides an overall accurate way to detect what browser a user is using.", - "homepage": "https://chrisschuld.com/projects/browser-php-detecting-a-users-browser-from-php/", - "keywords": [ - "browser", - "detection", - "user agent" - ], - "support": { - "issues": "https://github.com/cbschuld/Browser.php/issues", - "source": "https://github.com/cbschuld/Browser.php/tree/master" - }, - "time": "2020-04-14T18:46:44+00:00" - }, { "name": "getkirby/composer-installer", "version": "1.2.1", diff --git a/lib/Analyzer.php b/lib/Analyzer.php index 9e7d11d..74a26cb 100644 --- a/lib/Analyzer.php +++ b/lib/Analyzer.php @@ -2,7 +2,6 @@ namespace arnoson\KirbyStats; -use Browser; use DeviceDetector\DeviceDetector; use Jaybizzle\CrawlerDetect\CrawlerDetect; @@ -72,15 +71,6 @@ protected function userAgent(): string { ($this->userAgent = $_SERVER['HTTP_USER_AGENT'] ?? null); } - /** - * Get the browser info. - * - * @return array|null - */ - protected function browser() { - return $this->browser ?? ($this->browser = new Browser($this->userAgent())); - } - /** * Get the host name (without port). *