Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
27pchrisl committed Dec 2, 2024
1 parent ed39d6c commit b9f8926
Show file tree
Hide file tree
Showing 9 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion src/Attributes/LodataNamespace.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class LodataNamespace
{
protected ?string $name = null;

public function __construct(string $name = null)
public function __construct(?string $name = null)
{
$this->name = $name;
}
Expand Down
2 changes: 1 addition & 1 deletion src/Controller/Response.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ abstract class Response extends StreamedResponse
*/
public $exception;

public function __construct(callable $callback = null, int $status = 200, array $headers = [])
public function __construct(?callable $callback = null, int $status = 200, array $headers = [])
{
parent::__construct($callback, $status, $headers);

Expand Down
2 changes: 1 addition & 1 deletion src/Exception/Internal/ParserException.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
*/
final class ParserException extends BadRequestException
{
public function __construct(string $message, Lexer $lexer = null)
public function __construct(string $message, ?Lexer $lexer = null)
{
if ($lexer) {
$message .= ' at: '.$lexer->errorContext();
Expand Down
2 changes: 1 addition & 1 deletion src/Exception/Protocol/ProtocolException.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ abstract class ProtocolException extends RuntimeException implements Responsable
protected $suppressContent = false;
protected $originalException = null;

public function __construct(string $code = null, string $message = null, Throwable $originalException = null)
public function __construct(?string $code = null, ?string $message = null, ?Throwable $originalException = null)
{
if ($code) {
$this->odataCode = $code;
Expand Down
2 changes: 1 addition & 1 deletion src/Transaction/ParameterList.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public function __construct()
* Parse a string into separate parameters
* @param string|null $text
*/
public function parse(string $text = null)
public function parse(?string $text = null)
{
if (!$text) {
return;
Expand Down
2 changes: 1 addition & 1 deletion tests/Helpers/MockPredisConnection.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

class MockPredisConnection extends PredisConnection
{
public function pipeline(callable $callback = null)
public function pipeline(?callable $callback = null)
{
$pipeline = $this->client()->pipeline();

Expand Down
2 changes: 1 addition & 1 deletion tests/Helpers/StreamingJsonMatches.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ protected function recode(string $string): string
return json_encode(json_decode($string));
}

protected function _fail($other, string $description, ComparisonFailure $comparisonFailure = null): void
protected function _fail($other, string $description, ?ComparisonFailure $comparisonFailure = null): void
{
if ($comparisonFailure === null) {
$decodedOther = json_decode($other);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

class StreamingJsonMatches81 extends StreamingJsonMatches
{
public function fail($other, string $description, ComparisonFailure $comparisonFailure = null): never
public function fail($other, string $description, ?ComparisonFailure $comparisonFailure = null): never
{
$this->_fail($other, $description, $comparisonFailure);

Expand Down
8 changes: 4 additions & 4 deletions tests/Helpers/UseDatabaseAssertions.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ protected function assertNoTransactionsInProgress()


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

protected function assertQueryCountMatches(int $count, Closure $closure = null): void
protected function assertQueryCountMatches(int $count, ?Closure $closure = null): void
{
if ($closure) {
self::trackQueries();
Expand All @@ -112,7 +112,7 @@ protected function assertQueryCountMatches(int $count, Closure $closure = null):
}
}

protected function assertQueryCountLessThan(int $count, Closure $closure = null): void
protected function assertQueryCountLessThan(int $count, ?Closure $closure = null): void
{
if ($closure) {
self::trackQueries();
Expand All @@ -127,7 +127,7 @@ protected function assertQueryCountLessThan(int $count, Closure $closure = null)
}
}

protected function assertQueryCountGreaterThan(int $count, Closure $closure = null): void
protected function assertQueryCountGreaterThan(int $count, ?Closure $closure = null): void
{
if ($closure) {
self::trackQueries();
Expand Down

0 comments on commit b9f8926

Please sign in to comment.