Merge pull request #3585 from rectorphp/fix-void-bool

fix rector description
This commit is contained in:
Tomas Votruba 2020-06-24 10:38:43 +02:00 committed by GitHub
commit 4232acd90f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 16 additions and 1 deletions

View File

@ -21,7 +21,7 @@ final class ContextGetByTypeToConstructorInjectionRector extends AbstractToConst
public function getDefinition(): RectorDefinition
{
return new RectorDefinition(
'Move dependency passed to all children to parent as @inject/@required dependency',
'Move dependency get via $context->getByType() to constructor injection',
[
new CodeSample(
<<<'PHP'

View File

@ -0,0 +1,15 @@
<?php
namespace Rector\TypeDeclaration\Tests\Rector\FunctionLike\ReturnTypeDeclarationRector\Fixture;
final class SkipReturnAndReturnBool
{
public function someMethod($value)
{
if ($value) {
return;
}
return true;
}
}