diff --git a/README.MD b/README.MD index 8bef363..28ad824 100644 --- a/README.MD +++ b/README.MD @@ -5,11 +5,10 @@ [![Latest Stable Version](https://poser.pugx.org/platine-php/user-agent/v)](https://packagist.org/packages/platine-php/user-agent) [![Latest Unstable Version](https://poser.pugx.org/platine-php/user-agent/v/unstable)](https://packagist.org/packages/platine-php/user-agent) [![Total Downloads](https://poser.pugx.org/platine-php/user-agent/downloads)](https://packagist.org/packages/platine-php/user-agent) -[![License](https://poser.pugx.org/platine-php/user-agent/license)](https://packagist.org/packages/platine-php/user-agent) -[![Build Status](https://img.shields.io/travis/com/platine-php/user-agent?style=flat-square)](https://travis-ci.com/platine-php/user-agent) +[![License](https://poser.pugx.org/platine-php/user-agent/license)](https://packagist.org/packages/platine-php/user-agent) [![Quality Score](https://img.shields.io/scrutinizer/g/platine-php/user-agent.svg?style=flat-square)](https://scrutinizer-ci.com/g/platine-php/user-agent) -[![Maintainability](https://api.codeclimate.com/v1/badges/58e97c75369f62eaa87e/maintainability)](https://codeclimate.com/github/platine-php/user-agent/maintainability) -[![Test Coverage](https://api.codeclimate.com/v1/badges/58e97c75369f62eaa87e/test_coverage)](https://codeclimate.com/github/platine-php/user-agent/test_coverage) +[![Codacy Badge](https://app.codacy.com/project/badge/Grade/de9d4291c12e4761a83f69a1446dd5b5)](https://app.codacy.com/gh/platine-php/user-agent/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_grade) +[![Codacy Badge](https://app.codacy.com/project/badge/Coverage/de9d4291c12e4761a83f69a1446dd5b5)](https://app.codacy.com/gh/platine-php/user-agent/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_coverage) ### Requirements - **PHP >= 7.4**, **PHP 8** @@ -23,5 +22,5 @@ composer require platine-php/user-agent ### License MIT License See [LICENSE.MD](LICENSE.MD) -### Documentation -Coming soon, be patient \ No newline at end of file +### Resources +- [Documentation](https://docs.platine-php.com/packages/user-agent) \ No newline at end of file diff --git a/composer.json b/composer.json index ed1da24..6cbd2e2 100644 --- a/composer.json +++ b/composer.json @@ -50,8 +50,6 @@ "sort-packages": true }, - - "scripts": { "test": "phpunit --colors=always", "static": "phpstan analyze", diff --git a/src/Detector/AbstractDetector.php b/src/Detector/AbstractDetector.php index 2af99a9..8dd858f 100644 --- a/src/Detector/AbstractDetector.php +++ b/src/Detector/AbstractDetector.php @@ -60,7 +60,6 @@ */ abstract class AbstractDetector { - /** * Data type and definitions */ diff --git a/src/Detector/BrowserDetector.php b/src/Detector/BrowserDetector.php index 078af41..c07084e 100644 --- a/src/Detector/BrowserDetector.php +++ b/src/Detector/BrowserDetector.php @@ -55,7 +55,6 @@ */ class BrowserDetector extends AbstractDetector { - /** * {@inheritdoc} */ diff --git a/src/Detector/CpuDetector.php b/src/Detector/CpuDetector.php index e03e617..bf417ee 100644 --- a/src/Detector/CpuDetector.php +++ b/src/Detector/CpuDetector.php @@ -55,7 +55,6 @@ */ class CpuDetector extends AbstractDetector { - /** * {@inheritdoc} */ diff --git a/src/Detector/DeviceDetector.php b/src/Detector/DeviceDetector.php index 99e7d10..4d07bc0 100644 --- a/src/Detector/DeviceDetector.php +++ b/src/Detector/DeviceDetector.php @@ -55,7 +55,6 @@ */ class DeviceDetector extends AbstractDetector { - /** * {@inheritdoc} */ diff --git a/src/Detector/EngineDetector.php b/src/Detector/EngineDetector.php index 8bbafb0..dca1254 100644 --- a/src/Detector/EngineDetector.php +++ b/src/Detector/EngineDetector.php @@ -55,7 +55,6 @@ */ class EngineDetector extends AbstractDetector { - /** * {@inheritdoc} */ diff --git a/src/Detector/OsDetector.php b/src/Detector/OsDetector.php index ea10673..7210ddd 100644 --- a/src/Detector/OsDetector.php +++ b/src/Detector/OsDetector.php @@ -55,7 +55,6 @@ */ class OsDetector extends AbstractDetector { - /** * {@inheritdoc} */ diff --git a/src/Entity/AbstractEntity.php b/src/Entity/AbstractEntity.php index 68770f8..1dd271a 100644 --- a/src/Entity/AbstractEntity.php +++ b/src/Entity/AbstractEntity.php @@ -55,7 +55,6 @@ */ abstract class AbstractEntity { - /** * Set the information for this entity * @param array $data diff --git a/src/Entity/Cpu.php b/src/Entity/Cpu.php index f758d20..84f078b 100644 --- a/src/Entity/Cpu.php +++ b/src/Entity/Cpu.php @@ -53,7 +53,6 @@ */ class Cpu extends AbstractEntity { - /** * The CPU architecture * @var string diff --git a/src/Entity/Device.php b/src/Entity/Device.php index d1eb052..3e796af 100644 --- a/src/Entity/Device.php +++ b/src/Entity/Device.php @@ -53,7 +53,6 @@ */ class Device extends AbstractEntity { - /** * The device model * @var string diff --git a/src/UserAgent.php b/src/UserAgent.php index 03906d6..3d94a0c 100644 --- a/src/UserAgent.php +++ b/src/UserAgent.php @@ -64,7 +64,6 @@ */ class UserAgent { - /** * Operating System detector * @var OsDetector diff --git a/src/Util/Helper.php b/src/Util/Helper.php index 6168482..8dd5a74 100644 --- a/src/Util/Helper.php +++ b/src/Util/Helper.php @@ -53,8 +53,6 @@ */ class Helper { - - /** * Return the major version number from the full version * @param string $fullVersion diff --git a/tests/Detector/AbstractDetectorTest.php b/tests/Detector/AbstractDetectorTest.php index b2fef2e..38b677c 100644 --- a/tests/Detector/AbstractDetectorTest.php +++ b/tests/Detector/AbstractDetectorTest.php @@ -15,14 +15,13 @@ */ class AbstractDetectorTest extends PlatineTestCase { - public function testCustomDetector(): void { $s = new CustomDetector(); $s->detect('my fooo'); $en = $s->entity(); - + $this->assertEquals('', $en->getName()); $this->assertEquals('', $en->getVersion()); $this->assertEquals(0, $en->getMajor()); diff --git a/tests/Entity/BrowserTest.php b/tests/Entity/BrowserTest.php index 5014509..a6b9e41 100644 --- a/tests/Entity/BrowserTest.php +++ b/tests/Entity/BrowserTest.php @@ -15,14 +15,13 @@ */ class BrowserTest extends PlatineTestCase { - public function testToString(): void { $s = new Browser(); $s->setName('Chrome'); $s->setVersion('10.8.2'); - + $this->assertEquals('Chrome 10.8.2', $s->__toString()); - } + } } diff --git a/tests/Entity/CpuTest.php b/tests/Entity/CpuTest.php index f401de7..7fc8ed6 100644 --- a/tests/Entity/CpuTest.php +++ b/tests/Entity/CpuTest.php @@ -15,14 +15,13 @@ */ class CpuTest extends PlatineTestCase { - public function testToString(): void { $s = new Cpu(); $s->setArchitecture('amd64'); - + $this->assertEquals('amd64', $s->__toString()); $this->assertEquals('amd64', $s->getArchitecture()); - } + } } diff --git a/tests/Entity/DeviceTest.php b/tests/Entity/DeviceTest.php index a602e09..7b312ae 100644 --- a/tests/Entity/DeviceTest.php +++ b/tests/Entity/DeviceTest.php @@ -15,7 +15,6 @@ */ class DeviceTest extends PlatineTestCase { - public function testToString(): void { $s = new Device(); @@ -23,7 +22,7 @@ public function testToString(): void $s->setModel('iPhone'); $s->setVendor('Apple'); $s->setType('Mobile'); - + $this->assertEquals('iPhone, Apple Mobile', $s->__toString()); - } + } } diff --git a/tests/UserAgentTest.php b/tests/UserAgentTest.php index f7ca773..2de101e 100644 --- a/tests/UserAgentTest.php +++ b/tests/UserAgentTest.php @@ -15,7 +15,6 @@ */ class UserAgentTest extends PlatineTestCase { - /** * test Validate method * diff --git a/tests/Util/HelperTest.php b/tests/Util/HelperTest.php index b32dcdb..54ffb25 100644 --- a/tests/Util/HelperTest.php +++ b/tests/Util/HelperTest.php @@ -15,7 +15,6 @@ */ class HelperTest extends PlatineTestCase { - public function testGetMajorVersion(): void { $res = Helper::getMajorVersion('78.88'); diff --git a/tests/fixtures/fixtures.php b/tests/fixtures/fixtures.php index 09b4cec..a3d7795 100644 --- a/tests/fixtures/fixtures.php +++ b/tests/fixtures/fixtures.php @@ -9,7 +9,6 @@ class CustomDetector extends AbstractDetector { - public function __construct() { parent::__construct();