Skip to content

Commit

Permalink
Update README and fix code style
Browse files Browse the repository at this point in the history
  • Loading branch information
nguereza-tony committed Dec 2, 2023
1 parent 0377b81 commit dbdaf9d
Show file tree
Hide file tree
Showing 20 changed files with 12 additions and 34 deletions.
11 changes: 5 additions & 6 deletions README.MD
Original file line number Diff line number Diff line change
Expand Up @@ -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**
Expand All @@ -23,5 +22,5 @@ composer require platine-php/user-agent
### License
MIT License See [LICENSE.MD](LICENSE.MD)

### Documentation
Coming soon, be patient
### Resources
- [Documentation](https://docs.platine-php.com/packages/user-agent)
2 changes: 0 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,6 @@
"sort-packages": true
},



"scripts": {
"test": "phpunit --colors=always",
"static": "phpstan analyze",
Expand Down
1 change: 0 additions & 1 deletion src/Detector/AbstractDetector.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@
*/
abstract class AbstractDetector
{

/**
* Data type and definitions
*/
Expand Down
1 change: 0 additions & 1 deletion src/Detector/BrowserDetector.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@
*/
class BrowserDetector extends AbstractDetector
{

/**
* {@inheritdoc}
*/
Expand Down
1 change: 0 additions & 1 deletion src/Detector/CpuDetector.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@
*/
class CpuDetector extends AbstractDetector
{

/**
* {@inheritdoc}
*/
Expand Down
1 change: 0 additions & 1 deletion src/Detector/DeviceDetector.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@
*/
class DeviceDetector extends AbstractDetector
{

/**
* {@inheritdoc}
*/
Expand Down
1 change: 0 additions & 1 deletion src/Detector/EngineDetector.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@
*/
class EngineDetector extends AbstractDetector
{

/**
* {@inheritdoc}
*/
Expand Down
1 change: 0 additions & 1 deletion src/Detector/OsDetector.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@
*/
class OsDetector extends AbstractDetector
{

/**
* {@inheritdoc}
*/
Expand Down
1 change: 0 additions & 1 deletion src/Entity/AbstractEntity.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@
*/
abstract class AbstractEntity
{

/**
* Set the information for this entity
* @param array<string, string|int> $data
Expand Down
1 change: 0 additions & 1 deletion src/Entity/Cpu.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@
*/
class Cpu extends AbstractEntity
{

/**
* The CPU architecture
* @var string
Expand Down
1 change: 0 additions & 1 deletion src/Entity/Device.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@
*/
class Device extends AbstractEntity
{

/**
* The device model
* @var string
Expand Down
1 change: 0 additions & 1 deletion src/UserAgent.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@
*/
class UserAgent
{

/**
* Operating System detector
* @var OsDetector
Expand Down
2 changes: 0 additions & 2 deletions src/Util/Helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,6 @@
*/
class Helper
{


/**
* Return the major version number from the full version
* @param string $fullVersion
Expand Down
3 changes: 1 addition & 2 deletions tests/Detector/AbstractDetectorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand Down
5 changes: 2 additions & 3 deletions tests/Entity/BrowserTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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());
}
}
}
5 changes: 2 additions & 3 deletions tests/Entity/CpuTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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());
}
}
}
5 changes: 2 additions & 3 deletions tests/Entity/DeviceTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,14 @@
*/
class DeviceTest extends PlatineTestCase
{

public function testToString(): void
{
$s = new Device();

$s->setModel('iPhone');
$s->setVendor('Apple');
$s->setType('Mobile');

$this->assertEquals('iPhone, Apple Mobile', $s->__toString());
}
}
}
1 change: 0 additions & 1 deletion tests/UserAgentTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
*/
class UserAgentTest extends PlatineTestCase
{

/**
* test Validate method
*
Expand Down
1 change: 0 additions & 1 deletion tests/Util/HelperTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
*/
class HelperTest extends PlatineTestCase
{

public function testGetMajorVersion(): void
{
$res = Helper::getMajorVersion('78.88');
Expand Down
1 change: 0 additions & 1 deletion tests/fixtures/fixtures.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@

class CustomDetector extends AbstractDetector
{

public function __construct()
{
parent::__construct();
Expand Down

0 comments on commit dbdaf9d

Please sign in to comment.