Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions system/Files/File.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class File extends SplFileInfo
/**
* The files size in bytes
*
* @var int
* @var false|int|null
*/
protected $size;

Expand Down Expand Up @@ -65,7 +65,7 @@ public function __construct(string $path, bool $checkFile = false)
*/
public function getSize(): false|int
{
return $this->size ?? ($this->size = parent::getSize());
return $this->size ??= parent::getSize();
}

/**
Expand Down
2 changes: 1 addition & 1 deletion system/HTTP/Files/UploadedFile.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ class UploadedFile extends File implements UploadedFileInterface
* The error constant of the upload
* (one of PHP's UPLOADERRXXX constants)
*
* @var int
* @var int|null
*/
protected $error;

Expand Down
2 changes: 1 addition & 1 deletion system/HTTP/Message.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class Message implements MessageInterface
/**
* Protocol version
*
* @var string
* @var string|null
*/
protected $protocolVersion;

Expand Down
2 changes: 1 addition & 1 deletion system/HTTP/URI.php
Original file line number Diff line number Diff line change
Expand Up @@ -541,7 +541,7 @@ public function getQuery(array $options = []): string
*/
public function getFragment(): string
{
return $this->fragment ?? '';
return $this->fragment;
}

/**
Expand Down
8 changes: 4 additions & 4 deletions system/Test/FilterTestTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,14 @@ trait FilterTestTrait
/**
* The active IncomingRequest or CLIRequest
*
* @var RequestInterface
* @var RequestInterface|null
*/
protected $request;

/**
* The active Response instance
*
* @var ResponseInterface
* @var ResponseInterface|null
*/
protected $response;

Expand Down Expand Up @@ -128,6 +128,8 @@ protected function getFilterCaller($filter, string $position): Closure
throw new InvalidArgumentException('Invalid filter position passed: ' . $position);
}

$filterInstances = [];

if ($filter instanceof FilterInterface) {
$filterInstances = [$filter];
}
Expand All @@ -145,8 +147,6 @@ protected function getFilterCaller($filter, string $position): Closure
$filterClasses = [$filter];
}

$filterInstances = [];

foreach ($filterClasses as $class) {
// Get an instance
$filter = new $class();
Expand Down
2 changes: 1 addition & 1 deletion system/Throttle/Throttler.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ class Throttler implements ThrottlerInterface
/**
* Timestamp to use (during testing)
*
* @var int
* @var int|null
*/
protected $testTime;

Expand Down
3 changes: 1 addition & 2 deletions utils/phpstan-baseline/loader.neon
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# total 1454 errors
# total 1446 errors

includes:
- argument.type.neon
Expand All @@ -12,7 +12,6 @@ includes:
- method.notFound.neon
- missingType.iterableValue.neon
- missingType.parameter.neon
- nullCoalesce.property.neon
- property.defaultValue.neon
- property.nonObject.neon
- property.notFound.neon
Expand Down
38 changes: 0 additions & 38 deletions utils/phpstan-baseline/nullCoalesce.property.neon

This file was deleted.

Loading