Skip to content

Commit 92df758

Browse files
committed
Updated class header and converted some to readonly classes.
1 parent dee99f8 commit 92df758

Some content is hidden

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

51 files changed

+124
-196
lines changed

Cookies/CookieCollection.php

+2-4
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,9 @@
44
* Qubus\Http
55
*
66
* @link https://github.com/QubusPHP/http
7-
* @copyright 2020 Joshua Parker <[email protected]>
8-
* @copyright 2015 Beau Simensen <[email protected]>
7+
* @copyright 2020
8+
* @author Joshua Parker <[email protected]>
99
* @license https://opensource.org/licenses/mit-license.php MIT License
10-
*
11-
* @since 1.0.0
1210
*/
1311

1412
declare(strict_types=1);

Cookies/Cookies.php

+2-4
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,9 @@
44
* Qubus\Http
55
*
66
* @link https://github.com/QubusPHP/http
7-
* @copyright 2020 Joshua Parker <[email protected]>
8-
* @copyright 2015 Beau Simensen <[email protected]>
7+
* @copyright 2020
8+
* @author Joshua Parker <[email protected]>
99
* @license https://opensource.org/licenses/mit-license.php MIT License
10-
*
11-
* @since 1.0.0
1210
*/
1311

1412
declare(strict_types=1);

Cookies/CookiesRequest.php

+2-4
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,9 @@
44
* Qubus\Http
55
*
66
* @link https://github.com/QubusPHP/http
7-
* @copyright 2020 Joshua Parker <[email protected]>
8-
* @copyright 2015 Beau Simensen <[email protected]>
7+
* @copyright 2020
8+
* @author Joshua Parker <[email protected]>
99
* @license https://opensource.org/licenses/mit-license.php MIT License
10-
*
11-
* @since 1.0.0
1210
*/
1311

1412
declare(strict_types=1);

Cookies/CookiesResponse.php

+2-4
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,9 @@
44
* Qubus\Http
55
*
66
* @link https://github.com/QubusPHP/http
7-
* @copyright 2020 Joshua Parker <[email protected]>
8-
* @copyright 2015 Beau Simensen <[email protected]>
7+
* @copyright 2020
8+
* @author Joshua Parker <[email protected]>
99
* @license https://opensource.org/licenses/mit-license.php MIT License
10-
*
11-
* @since 1.0.0
1210
*/
1311

1412
declare(strict_types=1);

Cookies/Encryption/Adapter/DefuseEncryption.php

+4-5
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,9 @@
44
* Qubus\Http
55
*
66
* @link https://github.com/QubusPHP/http
7-
* @copyright 2020 Joshua Parker <[email protected]>
7+
* @copyright 2020
8+
* @author Joshua Parker <[email protected]>
89
* @license https://opensource.org/licenses/mit-license.php MIT License
9-
*
10-
* @since 1.0.0
1110
*/
1211

1312
declare(strict_types=1);
@@ -20,12 +19,12 @@
2019
use Defuse\Crypto\Key;
2120
use Qubus\Http\Cookies\Encryption\Encryption;
2221

23-
class DefuseEncryption implements Encryption
22+
readonly class DefuseEncryption implements Encryption
2423
{
2524
/**
2625
* @param Key $key
2726
*/
28-
public function __construct(public readonly Key $key)
27+
public function __construct(public Key $key)
2928
{
3029
}
3130

Cookies/Encryption/Decryptor.php

+2-3
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,9 @@
44
* Qubus\Http
55
*
66
* @link https://github.com/QubusPHP/http
7-
* @copyright 2020 Joshua Parker <[email protected]>
7+
* @copyright 2020
8+
* @author Joshua Parker <[email protected]>
89
* @license https://opensource.org/licenses/mit-license.php MIT License
9-
*
10-
* @since 1.0.0
1110
*/
1211

1312
declare(strict_types=1);

Cookies/Encryption/Encryption.php

+2-3
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,9 @@
44
* Qubus\Http
55
*
66
* @link https://github.com/QubusPHP/http
7-
* @copyright 2020 Joshua Parker <[email protected]>
7+
* @copyright 2020
8+
* @author Joshua Parker <[email protected]>
89
* @license https://opensource.org/licenses/mit-license.php MIT License
9-
*
10-
* @since 1.0.0
1110
*/
1211

1312
declare(strict_types=1);

Cookies/Encryption/Encryptor.php

+2-3
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,9 @@
44
* Qubus\Http
55
*
66
* @link https://github.com/QubusPHP/http
7-
* @copyright 2020 Joshua Parker <[email protected]>
7+
* @copyright 2020
8+
* @author Joshua Parker <[email protected]>
89
* @license https://opensource.org/licenses/mit-license.php MIT License
9-
*
10-
* @since 1.0.0
1110
*/
1211

1312
declare(strict_types=1);

Cookies/Factory/CookieFactory.php

+2-3
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,9 @@
44
* Qubus\Http
55
*
66
* @link https://github.com/QubusPHP/http
7-
* @copyright 2022 Joshua Parker <[email protected]>
7+
* @copyright 2020
8+
* @author Joshua Parker <[email protected]>
89
* @license https://opensource.org/licenses/mit-license.php MIT License
9-
*
10-
* @since 2.0.0
1110
*/
1211

1312
declare(strict_types=1);

Cookies/RequestCookieDecryptor.php

+5-6
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,9 @@
44
* Qubus\Http
55
*
66
* @link https://github.com/QubusPHP/http
7-
* @copyright 2020 Joshua Parker <[email protected]>
7+
* @copyright 2020
8+
* @author Joshua Parker <[email protected]>
89
* @license https://opensource.org/licenses/mit-license.php MIT License
9-
*
10-
* @since 1.0.0
1110
*/
1211

1312
declare(strict_types=1);
@@ -22,11 +21,11 @@
2221
use function count;
2322
use function is_array;
2423

25-
class RequestCookieDecryptor
24+
readonly class RequestCookieDecryptor
2625
{
2726
public function __construct(
28-
public readonly Decryptor $decryptor,
29-
public readonly Validation $validation,
27+
public Decryptor $decryptor,
28+
public Validation $validation,
3029
) {
3130
}
3231

Cookies/ResponseCookieEncryptor.php

+5-6
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,9 @@
44
* Qubus\Http
55
*
66
* @link https://github.com/QubusPHP/http
7-
* @copyright 2020 Joshua Parker <[email protected]>
7+
* @copyright 2020
8+
* @author Joshua Parker <[email protected]>
89
* @license https://opensource.org/licenses/mit-license.php MIT License
9-
*
10-
* @since 1.0.0
1110
*/
1211

1312
declare(strict_types=1);
@@ -22,11 +21,11 @@
2221
use function count;
2322
use function is_array;
2423

25-
class ResponseCookieEncryptor
24+
readonly class ResponseCookieEncryptor
2625
{
2726
public function __construct(
28-
public readonly Encryptor $encryptor,
29-
public readonly Validation $validation,
27+
public Encryptor $encryptor,
28+
public Validation $validation,
3029
) {
3130
}
3231

Cookies/SameSite.php

+2-4
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,9 @@
44
* Qubus\Http
55
*
66
* @link https://github.com/QubusPHP/http
7-
* @copyright 2020 Joshua Parker <[email protected]>
8-
* @copyright 2015 Beau Simensen <[email protected]>
7+
* @copyright 2020
8+
* @author Joshua Parker <[email protected]>
99
* @license https://opensource.org/licenses/mit-license.php MIT License
10-
*
11-
* @since 1.0.0
1210
*/
1311

1412
declare(strict_types=1);

Cookies/SetCookieCollection.php

+2-4
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,9 @@
44
* Qubus\Http
55
*
66
* @link https://github.com/QubusPHP/http
7-
* @copyright 2020 Joshua Parker <[email protected]>
8-
* @copyright 2015 Beau Simensen <[email protected]>
7+
* @copyright 2020
8+
* @author Joshua Parker <[email protected]>
99
* @license https://opensource.org/licenses/mit-license.php MIT License
10-
*
11-
* @since 1.0.0
1210
*/
1311

1412
declare(strict_types=1);

Cookies/SetCookies.php

+2-4
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,9 @@
44
* Qubus\Http
55
*
66
* @link https://github.com/QubusPHP/http
7-
* @copyright 2020 Joshua Parker <[email protected]>
8-
* @copyright 2015 Beau Simensen <[email protected]>
7+
* @copyright 2020
8+
* @author Joshua Parker <[email protected]>
99
* @license https://opensource.org/licenses/mit-license.php MIT License
10-
*
11-
* @since 1.0.0
1210
*/
1311

1412
declare(strict_types=1);

Cookies/Util.php

+2-3
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,9 @@
44
* Qubus\Http
55
*
66
* @link https://github.com/QubusPHP/http
7-
* @copyright 2020 Joshua Parker <[email protected]>
7+
* @copyright 2020
8+
* @author Joshua Parker <[email protected]>
89
* @license https://opensource.org/licenses/mit-license.php MIT License
9-
*
10-
* @since 1.0.0
1110
*/
1211

1312
declare(strict_types=1);

Cookies/Validation/Message.php

+6-7
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,9 @@
44
* Qubus\Http
55
*
66
* @link https://github.com/QubusPHP/http
7-
* @copyright 2020 Joshua Parker <[email protected]>
7+
* @copyright 2020
8+
* @author Joshua Parker <[email protected]>
89
* @license https://opensource.org/licenses/mit-license.php MIT License
9-
*
10-
* @since 1.0.0
1110
*/
1211

1312
declare(strict_types=1);
@@ -18,12 +17,12 @@
1817
use function strrpos;
1918
use function substr;
2019

21-
class Message
20+
readonly class Message
2221
{
2322
private function __construct(
24-
public readonly string $nonce,
25-
public readonly string $hmac,
26-
public readonly string $value,
23+
public string $nonce,
24+
public string $hmac,
25+
public string $value,
2726
) {
2827
}
2928

Cookies/Validation/Validation.php

+2-3
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,9 @@
44
* Qubus\Http
55
*
66
* @link https://github.com/QubusPHP/http
7-
* @copyright 2020 Joshua Parker <[email protected]>
7+
* @copyright 2020
8+
* @author Joshua Parker <[email protected]>
89
* @license https://opensource.org/licenses/mit-license.php MIT License
9-
*
10-
* @since 1.0.0
1110
*/
1211

1312
declare(strict_types=1);

Exception/MalformedUrlException.php

+4-5
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,16 @@
11
<?php
22

3-
declare(strict_types=1);
4-
53
/**
64
* Qubus\Http
75
*
86
* @link https://github.com/QubusPHP/http
9-
* @copyright 2020 Joshua Parker <[email protected]>
7+
* @copyright 2020
8+
* @author Joshua Parker <[email protected]>
109
* @license https://opensource.org/licenses/mit-license.php MIT License
11-
*
12-
* @since 1.0.0
1310
*/
1411

12+
declare(strict_types=1);
13+
1514
namespace Qubus\Http\Exception;
1615

1716
use Qubus\Exception\Exception;

Factories/EmptyResponseFactory.php

+2-3
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,9 @@
44
* Qubus\Http
55
*
66
* @link https://github.com/QubusPHP/http
7-
* @copyright 2020 Joshua Parker <[email protected]>
7+
* @copyright 2020
8+
* @author Joshua Parker <[email protected]>
89
* @license https://opensource.org/licenses/mit-license.php MIT License
9-
*
10-
* @since 1.0.0
1110
*/
1211

1312
declare(strict_types=1);

Factories/HtmlResponseFactory.php

+2-3
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,9 @@
44
* Qubus\Http
55
*
66
* @link https://github.com/QubusPHP/http
7-
* @copyright 2020 Joshua Parker <[email protected]>
7+
* @copyright 2020
8+
* @author Joshua Parker <[email protected]>
89
* @license https://opensource.org/licenses/mit-license.php MIT License
9-
*
10-
* @since 1.0.0
1110
*/
1211

1312
declare(strict_types=1);

Factories/JsonResponseFactory.php

+2-3
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,9 @@
44
* Qubus\Http
55
*
66
* @link https://github.com/QubusPHP/http
7-
* @copyright 2020 Joshua Parker <[email protected]>
7+
* @copyright 2020
8+
* @author Joshua Parker <[email protected]>
89
* @license https://opensource.org/licenses/mit-license.php MIT License
9-
*
10-
* @since 1.0.0
1110
*/
1211

1312
declare(strict_types=1);

Factories/RedirectResponseFactory.php

+2-3
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,9 @@
44
* Qubus\Http
55
*
66
* @link https://github.com/QubusPHP/http
7-
* @copyright 2020 Joshua Parker <[email protected]>
7+
* @copyright 2020
8+
* @author Joshua Parker <[email protected]>
89
* @license https://opensource.org/licenses/mit-license.php MIT License
9-
*
10-
* @since 1.0.0
1110
*/
1211

1312
declare(strict_types=1);

Factories/TextResponseFactory.php

+2-3
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,9 @@
44
* Qubus\Http
55
*
66
* @link https://github.com/QubusPHP/http
7-
* @copyright 2020 Joshua Parker <[email protected]>
7+
* @copyright 2020
8+
* @author Joshua Parker <[email protected]>
89
* @license https://opensource.org/licenses/mit-license.php MIT License
9-
*
10-
* @since 1.0.0
1110
*/
1211

1312
declare(strict_types=1);

Factories/XmlResponseFactory.php

+2-3
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,9 @@
44
* Qubus\Http
55
*
66
* @link https://github.com/QubusPHP/http
7-
* @copyright 2020 Joshua Parker <[email protected]>
7+
* @copyright 2020
8+
* @author Joshua Parker <[email protected]>
89
* @license https://opensource.org/licenses/mit-license.php MIT License
9-
*
10-
* @since 1.0.0
1110
*/
1211

1312
declare(strict_types=1);

0 commit comments

Comments
 (0)