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
25 changes: 2 additions & 23 deletions build/target-repository/docs/rector_rules_overview.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# 364 Rules Overview
# 363 Rules Overview

<br>

Expand Down Expand Up @@ -52,7 +52,7 @@

- [Transform](#transform) (22)

- [TypeDeclaration](#typedeclaration) (45)
- [TypeDeclaration](#typedeclaration) (44)

- [Visibility](#visibility) (3)

Expand Down Expand Up @@ -7385,27 +7385,6 @@ Add known return type to arrow function

<br>

### AddClosureReturnTypeRector

Add known return type to functions

- class: [`Rector\TypeDeclaration\Rector\Closure\AddClosureReturnTypeRector`](../rules/TypeDeclaration/Rector/Closure/AddClosureReturnTypeRector.php)

```diff
class SomeClass
{
public function run($meetups)
{
- return array_filter($meetups, function (Meetup $meetup) {
+ return array_filter($meetups, function (Meetup $meetup): bool {
return is_object($meetup);
});
}
}
```

<br>

### AddMethodCallBasedStrictParamTypeRector

Change private method param type to strict type, based on passed strict types
Expand Down
2 changes: 0 additions & 2 deletions config/set/type-declaration.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
use Rector\TypeDeclaration\Rector\ClassMethod\ReturnTypeFromStrictTypedPropertyRector;
use Rector\TypeDeclaration\Rector\ClassMethod\StrictArrayParamDimFetchRector;
use Rector\TypeDeclaration\Rector\ClassMethod\StrictStringParamConcatRector;
use Rector\TypeDeclaration\Rector\Closure\AddClosureReturnTypeRector;
use Rector\TypeDeclaration\Rector\Empty_\EmptyOnNullableObjectToInstanceOfRector;
use Rector\TypeDeclaration\Rector\FunctionLike\AddParamTypeSplFixedArrayRector;
use Rector\TypeDeclaration\Rector\FunctionLike\AddReturnTypeDeclarationFromYieldsRector;
Expand All @@ -44,7 +43,6 @@

return static function (RectorConfig $rectorConfig): void {
$rectorConfig->rules([
AddClosureReturnTypeRector::class,
AddArrowFunctionReturnTypeRector::class,
ParamTypeByMethodCallTypeRector::class,
TypedPropertyFromAssignsRector::class,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?php

namespace Rector\Tests\TypeDeclaration\Rector\ClassMethod\ReturnTypeFromStrictTypedCallRector\Fixture;

final class SkipReturnDocblock
{
public function getData()
{
return getMeBool2();
}
}

/**
* @return bool
*/
function getMeBool2()
{
}

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading