Skip to content

Commit 9316a16

Browse files
author
Greg Bowler
committed
Use "XYZException" coding style
1 parent 9ba2a56 commit 9316a16

File tree

6 files changed

+11
-11
lines changed

6 files changed

+11
-11
lines changed

src/InvalidProtocol.php

Lines changed: 0 additions & 4 deletions
This file was deleted.

src/InvalidProtocolException.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
<?php
2+
namespace Gt\Http;
3+
4+
class InvalidProtocolException extends Exception {}

src/InvalidRequestMethod.php

Lines changed: 0 additions & 4 deletions
This file was deleted.
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
<?php
2+
namespace Gt\Http;
3+
4+
class InvalidRequestMethodException extends Exception {}

src/Message.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,15 +34,15 @@ public function getProtocolVersion() {
3434
*
3535
* @param string $version HTTP protocol version
3636
* @return static
37-
* @throws InvalidProtocol
37+
* @throws InvalidProtocolException
3838
*/
3939
public function withProtocolVersion($version) {
4040
if($this->protocol === $version) {
4141
return $this;
4242
}
4343

4444
if(!is_numeric($version)) {
45-
throw new InvalidProtocol($version);
45+
throw new InvalidProtocolException($version);
4646
}
4747

4848
$clone = clone $this;

src/RequestMethod.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ public static function filterMethodName(string $name):string {
1616
$name = strtoupper($name);
1717

1818
if(!in_array($name, self::ALLOWED_METHODS)) {
19-
throw new InvalidRequestMethod($name);
19+
throw new InvalidRequestMethodException($name);
2020
}
2121

2222
return $name;

0 commit comments

Comments
 (0)