Skip to content

Commit 902dc41

Browse files
committed
Linted files
1 parent 328fd09 commit 902dc41

92 files changed

Lines changed: 2948 additions & 3625 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

src/Exception/ExceptionInterface.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
<?php
2+
23
namespace UserAgentParser\Exception;
34

45
/**
5-
* Interface that in userland you can try/catch/finall all Exceptions from this package together
6+
* Interface that in userland you can try/catch/finall all Exceptions from this package together.
67
*
78
* @author Martin Keckeis <martin.keckeis1@gmail.com>
89
* @license MIT

src/Exception/InvalidArgumentException.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
<?php
2+
23
namespace UserAgentParser\Exception;
34

45
/**
5-
* Thrown if an invalid argument is provided
6+
* Thrown if an invalid argument is provided.
67
*
78
* @author Martin Keckeis <martin.keckeis1@gmail.com>
89
* @license MIT
Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,15 @@
11
<?php
2+
23
namespace UserAgentParser\Exception;
34

5+
use Exception;
6+
47
/**
5-
* This is thrown if a composer package is not loaded
8+
* This is thrown if a composer package is not loaded.
69
*
710
* @author Martin Keckeis <martin.keckeis1@gmail.com>
811
* @license MIT
912
*/
10-
class InvalidCredentialsException extends \Exception implements ExceptionInterface
13+
class InvalidCredentialsException extends Exception implements ExceptionInterface
1114
{
1215
}
Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,15 @@
11
<?php
2+
23
namespace UserAgentParser\Exception;
34

5+
use Exception;
6+
47
/**
5-
* Limitation reached
8+
* Limitation reached.
69
*
710
* @author Martin Keckeis <martin.keckeis1@gmail.com>
811
* @license MIT
912
*/
10-
class LimitationExceededException extends \Exception implements ExceptionInterface
13+
class LimitationExceededException extends Exception implements ExceptionInterface
1114
{
1215
}
Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,15 @@
11
<?php
2+
23
namespace UserAgentParser\Exception;
34

5+
use Exception;
6+
47
/**
58
* This is thrown by the Provider if not result is found.
69
*
710
* @author Martin Keckeis <martin.keckeis1@gmail.com>
811
* @license MIT
912
*/
10-
class NoResultFoundException extends \Exception implements ExceptionInterface
13+
class NoResultFoundException extends Exception implements ExceptionInterface
1114
{
1215
}
Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,15 @@
11
<?php
2+
23
namespace UserAgentParser\Exception;
34

5+
use Exception;
6+
47
/**
5-
* This is thrown if a composer package is not loaded
8+
* This is thrown if a composer package is not loaded.
69
*
710
* @author Martin Keckeis <martin.keckeis1@gmail.com>
811
* @license MIT
912
*/
10-
class PackageNotLoadedException extends \Exception implements ExceptionInterface
13+
class PackageNotLoadedException extends Exception implements ExceptionInterface
1114
{
1215
}

src/Exception/RequestException.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,15 @@
11
<?php
2+
23
namespace UserAgentParser\Exception;
34

5+
use Exception;
6+
47
/**
5-
* A HTTP request failed
8+
* A HTTP request failed.
69
*
710
* @author Martin Keckeis <martin.keckeis1@gmail.com>
811
* @license MIT
912
*/
10-
class RequestException extends \Exception implements ExceptionInterface
13+
class RequestException extends Exception implements ExceptionInterface
1114
{
1215
}

src/Model/Bot.php

Lines changed: 7 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,52 +1,47 @@
11
<?php
2+
23
namespace UserAgentParser\Model;
34

45
/**
5-
* Bot model
6+
* Bot model.
67
*
78
* @author Martin Keckeis <martin.keckeis1@gmail.com>
89
* @license MIT
910
*/
1011
class Bot
1112
{
1213
/**
13-
*
14-
* @var boolean
14+
* @var bool
1515
*/
1616
private $isBot;
1717

1818
/**
19-
*
2019
* @var string
2120
*/
2221
private $name;
2322

2423
/**
25-
*
2624
* @var string
2725
*/
2826
private $type;
2927

3028
/**
31-
*
32-
* @param boolean $mode
29+
* @param bool $mode
3330
*/
3431
public function setIsBot($mode)
3532
{
3633
$this->isBot = $mode;
3734
}
3835

3936
/**
40-
*
41-
* @return boolean
37+
* @return bool
4238
*/
4339
public function getIsBot()
4440
{
4541
return $this->isBot;
4642
}
4743

4844
/**
49-
*
5045
* @param string $name
5146
*/
5247
public function setName($name)
@@ -55,7 +50,6 @@ public function setName($name)
5550
}
5651

5752
/**
58-
*
5953
* @return string
6054
*/
6155
public function getName()
@@ -64,7 +58,6 @@ public function getName()
6458
}
6559

6660
/**
67-
*
6861
* @param string $type
6962
*/
7063
public function setType($type)
@@ -81,15 +74,14 @@ public function getType()
8174
}
8275

8376
/**
84-
*
8577
* @return array
8678
*/
8779
public function toArray()
8880
{
8981
return [
9082
'isBot' => $this->getIsBot(),
91-
'name' => $this->getName(),
92-
'type' => $this->getType(),
83+
'name' => $this->getName(),
84+
'type' => $this->getType(),
9385
];
9486
}
9587
}

src/Model/Browser.php

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
<?php
2+
23
namespace UserAgentParser\Model;
34

45
/**
5-
* Browser model
6+
* Browser model.
67
*
78
* @author Martin Keckeis <martin.keckeis1@gmail.com>
89
* @license MIT
@@ -25,7 +26,6 @@ public function __construct()
2526
}
2627

2728
/**
28-
*
2929
* @param string $name
3030
*/
3131
public function setName($name)
@@ -34,17 +34,13 @@ public function setName($name)
3434
}
3535

3636
/**
37-
*
3837
* @return string
3938
*/
4039
public function getName()
4140
{
4241
return $this->name;
4342
}
4443

45-
/**
46-
* @param Version $version
47-
*/
4844
public function setVersion(Version $version)
4945
{
5046
$this->version = $version;
@@ -64,7 +60,7 @@ public function getVersion()
6460
public function toArray()
6561
{
6662
return [
67-
'name' => $this->getName(),
63+
'name' => $this->getName(),
6864
'version' => $this->getVersion()->toArray(),
6965
];
7066
}

0 commit comments

Comments
 (0)