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
2 changes: 0 additions & 2 deletions rector.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
use Rector\CodingStyle\Rector\FuncCall\CountArrayToEmptyArrayComparisonRector;
use Rector\CodingStyle\Rector\FuncCall\VersionCompareFuncCallToConstantRector;
use Rector\Config\RectorConfig;
use Rector\DeadCode\Rector\ClassMethod\RemoveDuplicatedReturnSelfDocblockRector;
use Rector\DeadCode\Rector\ClassMethod\RemoveUnusedConstructorParamRector;
use Rector\DeadCode\Rector\ClassMethod\RemoveUnusedPrivateMethodRector;
use Rector\DeadCode\Rector\MethodCall\RemoveNullArgOnNullDefaultParamRector;
Expand Down Expand Up @@ -178,7 +177,6 @@

// to be applied in separate PRs to ease review
NegatedAndsToPositiveOrsRector::class,
RemoveDuplicatedReturnSelfDocblockRector::class,
])
// auto import fully qualified class names
->withImportNames()
Expand Down
2 changes: 0 additions & 2 deletions system/DataCaster/DataCaster.php
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,6 @@ public function __construct(
*
* @param array<string, string> $types [field => type]
*
* @return $this
*
* @internal
*/
public function setTypes(array $types): static
Expand Down
4 changes: 0 additions & 4 deletions system/Database/BaseBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -577,8 +577,6 @@ public function distinct(bool $val = true)
* Generates the FROM portion of the query
*
* @param array|string $from
*
* @return $this
*/
public function from($from, bool $overwrite = false): self
{
Expand Down Expand Up @@ -608,8 +606,6 @@ public function from($from, bool $overwrite = false): self
/**
* @param BaseBuilder $from Expected subquery
* @param string $alias Subquery alias
*
* @return $this
*/
public function fromSubquery(BaseBuilder $from, string $alias): self
{
Expand Down
17 changes: 0 additions & 17 deletions system/HTTP/MessageTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,10 @@ trait MessageTrait
// --------------------------------------------------------------------
// Body
// --------------------------------------------------------------------

/**
* Sets the body of the current message.
*
* @param string $data
*
* @return $this
*/
public function setBody($data): self
{
Expand All @@ -67,8 +64,6 @@ public function setBody($data): self
* Appends data to the body of the current message.
*
* @param string $data
*
* @return $this
*/
public function appendBody($data): self
{
Expand Down Expand Up @@ -144,8 +139,6 @@ public function header($name)
* Sets a header and it's value.
*
* @param array|string|null $value
*
* @return $this
*/
public function setHeader(string $name, $value): self
{
Expand Down Expand Up @@ -191,8 +184,6 @@ private function checkMultipleHeaders(string $name): void

/**
* Removes a header from the list of headers we track.
*
* @return $this
*/
public function removeHeader(string $name): self
{
Expand All @@ -205,8 +196,6 @@ public function removeHeader(string $name): self
/**
* Adds an additional header value to any headers that accept
* multiple values (i.e. are an array or implement ArrayAccess)
*
* @return $this
*/
public function appendHeader(string $name, ?string $value): self
{
Expand All @@ -225,8 +214,6 @@ public function appendHeader(string $name, ?string $value): self
* Adds a header (not a header value) with the same name.
* Use this only when you set multiple headers with the same name,
* typically, for `Set-Cookie`.
*
* @return $this
*/
public function addHeader(string $name, string $value): static
{
Expand All @@ -251,8 +238,6 @@ public function addHeader(string $name, string $value): static
/**
* Adds an additional header value to any headers that accept
* multiple values (i.e. are an array or implement ArrayAccess)
*
* @return $this
*/
public function prependHeader(string $name, string $value): self
{
Expand All @@ -277,8 +262,6 @@ protected function getHeaderName(string $name): string
/**
* Sets the HTTP protocol version.
*
* @return $this
*
* @throws HTTPException For invalid protocols
*/
public function setProtocolVersion(string $version): self
Expand Down
2 changes: 0 additions & 2 deletions system/HTTP/RedirectResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,6 @@ public function withInput()
* If the validation has any errors, transmit those back
* so they can be displayed when the validation is handled
* within a method different than displaying the form.
*
* @return $this
*/
private function withErrors(): self
{
Expand Down
2 changes: 0 additions & 2 deletions system/Images/Handlers/ImageMagickHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -537,8 +537,6 @@ public function reorient(bool $silent = false)
/**
* Clears metadata from the image.
*
* @return $this
*
* @throws ImagickException
*/
public function clearMetadata(): static
Expand Down
2 changes: 0 additions & 2 deletions system/Images/ImageHandlerInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -152,8 +152,6 @@ public function save(?string $target = null, int $quality = 90);

/**
* Clear metadata before saving image as a new file.
*
* @return $this
*/
public function clearMetadata(): static;
}
4 changes: 0 additions & 4 deletions system/Traits/ConditionalTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@ trait ConditionalTrait
* @param TWhen $condition
* @param callable(self, TWhen): mixed $callback
* @param (callable(self): mixed)|null $defaultCallback
*
* @return $this
*/
public function when($condition, callable $callback, ?callable $defaultCallback = null): self
{
Expand All @@ -45,8 +43,6 @@ public function when($condition, callable $callback, ?callable $defaultCallback
* @param TWhenNot $condition
* @param callable(self, TWhenNot): mixed $callback
* @param (callable(self): mixed)|null $defaultCallback
*
* @return $this
*/
public function whenNot($condition, callable $callback, ?callable $defaultCallback = null): self
{
Expand Down
7 changes: 5 additions & 2 deletions system/Traits/PropertiesTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@ trait PropertiesTrait
{
/**
* Attempts to set the values of public class properties.
*
* @return $this
*/
final public function fill(array $params): self
{
Expand All @@ -43,10 +41,15 @@ final public function fill(array $params): self

/**
* Get the public properties of the class and return as an array.
*
* @return array<string, mixed>
*/
final public function getPublicProperties(): array
{
$worker = new class () {
/**
* @return array<string, mixed>
*/
public function getProperties(object $obj): array
{
return get_object_vars($obj);
Expand Down
2 changes: 1 addition & 1 deletion utils/phpstan-baseline/empty.notAllowed.neon
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# total 213 errors
# total 212 errors

parameters:
ignoreErrors:
Expand Down
2 changes: 1 addition & 1 deletion utils/phpstan-baseline/loader.neon
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# total 1827 errors
# total 1825 errors

includes:
- argument.type.neon
Expand Down
7 changes: 1 addition & 6 deletions utils/phpstan-baseline/missingType.iterableValue.neon
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# total 1141 errors
# total 1140 errors

parameters:
ignoreErrors:
Expand Down Expand Up @@ -4132,11 +4132,6 @@ parameters:
count: 1
path: ../../system/View/Cells/Cell.php

-
message: '#^Method CodeIgniter\\View\\Cells\\Cell\:\:getPublicProperties\(\) return type has no value type specified in iterable type array\.$#'
count: 1
path: ../../system/View/Cells/Cell.php

-
message: '#^Method CodeIgniter\\View\\Cells\\Cell\:\:includeComputedProperties\(\) has parameter \$properties with no value type specified in iterable type array\.$#'
count: 1
Expand Down
2 changes: 1 addition & 1 deletion utils/phpstan-baseline/return.type.neon
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
parameters:
ignoreErrors:
-
message: '#^Method CodeIgniter\\Database\\BaseBuilder\:\:cleanClone\(\) should return \$this\(CodeIgniter\\Database\\BaseBuilder\) but returns static\(CodeIgniter\\Database\\BaseBuilder\)\.$#'
message: '#^Method CodeIgniter\\Database\\BaseBuilder\:\:cleanClone\(\) should return \$this\(CodeIgniter\\Database\\BaseBuilder\) but returns CodeIgniter\\Database\\BaseBuilder\.$#'
count: 1
path: ../../system/Database/BaseBuilder.php

Expand Down
Loading