Skip to content

Commit b9f8926

Browse files
committed
WIP
1 parent ed39d6c commit b9f8926

File tree

9 files changed

+12
-12
lines changed

9 files changed

+12
-12
lines changed

src/Attributes/LodataNamespace.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ class LodataNamespace
1111
{
1212
protected ?string $name = null;
1313

14-
public function __construct(string $name = null)
14+
public function __construct(?string $name = null)
1515
{
1616
$this->name = $name;
1717
}

src/Controller/Response.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ abstract class Response extends StreamedResponse
3939
*/
4040
public $exception;
4141

42-
public function __construct(callable $callback = null, int $status = 200, array $headers = [])
42+
public function __construct(?callable $callback = null, int $status = 200, array $headers = [])
4343
{
4444
parent::__construct($callback, $status, $headers);
4545

src/Exception/Internal/ParserException.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
*/
1414
final class ParserException extends BadRequestException
1515
{
16-
public function __construct(string $message, Lexer $lexer = null)
16+
public function __construct(string $message, ?Lexer $lexer = null)
1717
{
1818
if ($lexer) {
1919
$message .= ' at: '.$lexer->errorContext();

src/Exception/Protocol/ProtocolException.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ abstract class ProtocolException extends RuntimeException implements Responsable
3030
protected $suppressContent = false;
3131
protected $originalException = null;
3232

33-
public function __construct(string $code = null, string $message = null, Throwable $originalException = null)
33+
public function __construct(?string $code = null, ?string $message = null, ?Throwable $originalException = null)
3434
{
3535
if ($code) {
3636
$this->odataCode = $code;

src/Transaction/ParameterList.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public function __construct()
2727
* Parse a string into separate parameters
2828
* @param string|null $text
2929
*/
30-
public function parse(string $text = null)
30+
public function parse(?string $text = null)
3131
{
3232
if (!$text) {
3333
return;

tests/Helpers/MockPredisConnection.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
class MockPredisConnection extends PredisConnection
1313
{
14-
public function pipeline(callable $callback = null)
14+
public function pipeline(?callable $callback = null)
1515
{
1616
$pipeline = $this->client()->pipeline();
1717

tests/Helpers/StreamingJsonMatches.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ protected function recode(string $string): string
3333
return json_encode(json_decode($string));
3434
}
3535

36-
protected function _fail($other, string $description, ComparisonFailure $comparisonFailure = null): void
36+
protected function _fail($other, string $description, ?ComparisonFailure $comparisonFailure = null): void
3737
{
3838
if ($comparisonFailure === null) {
3939
$decodedOther = json_decode($other);

tests/Helpers/StreamingJsonMatches/StreamingJsonMatches81.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
class StreamingJsonMatches81 extends StreamingJsonMatches
1212
{
13-
public function fail($other, string $description, ComparisonFailure $comparisonFailure = null): never
13+
public function fail($other, string $description, ?ComparisonFailure $comparisonFailure = null): never
1414
{
1515
$this->_fail($other, $description, $comparisonFailure);
1616

tests/Helpers/UseDatabaseAssertions.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ protected function assertNoTransactionsInProgress()
8282

8383

8484
// https://github.com/mattiasgeniar/phpunit-query-count-assertions/blob/master/src/AssertsQueryCounts.php
85-
protected function assertNoQueriesExecuted(Closure $closure = null): void
85+
protected function assertNoQueriesExecuted(?Closure $closure = null): void
8686
{
8787
if ($closure) {
8888
self::trackQueries();
@@ -97,7 +97,7 @@ protected function assertNoQueriesExecuted(Closure $closure = null): void
9797
}
9898
}
9999

100-
protected function assertQueryCountMatches(int $count, Closure $closure = null): void
100+
protected function assertQueryCountMatches(int $count, ?Closure $closure = null): void
101101
{
102102
if ($closure) {
103103
self::trackQueries();
@@ -112,7 +112,7 @@ protected function assertQueryCountMatches(int $count, Closure $closure = null):
112112
}
113113
}
114114

115-
protected function assertQueryCountLessThan(int $count, Closure $closure = null): void
115+
protected function assertQueryCountLessThan(int $count, ?Closure $closure = null): void
116116
{
117117
if ($closure) {
118118
self::trackQueries();
@@ -127,7 +127,7 @@ protected function assertQueryCountLessThan(int $count, Closure $closure = null)
127127
}
128128
}
129129

130-
protected function assertQueryCountGreaterThan(int $count, Closure $closure = null): void
130+
protected function assertQueryCountGreaterThan(int $count, ?Closure $closure = null): void
131131
{
132132
if ($closure) {
133133
self::trackQueries();

0 commit comments

Comments
 (0)