mirror of
https://github.com/rectorphp/rector.git
synced 2024-06-29 22:23:30 +00:00
058d52567d
c621d7650d
[TypeDeclaration] Add void upper inner function has return on ReturnTypeDeclarationRector (#1447)
33 lines
1.0 KiB
PHP
33 lines
1.0 KiB
PHP
<?php
|
|
|
|
declare (strict_types=1);
|
|
namespace Rector\Strict\Rector;
|
|
|
|
use Rector\Core\Contract\Rector\ConfigurableRectorInterface;
|
|
use Rector\Core\Rector\AbstractRector;
|
|
use RectorPrefix20211210\Webmozart\Assert\Assert;
|
|
/**
|
|
* @see \Rector\Tests\Strict\Rector\BooleanNot\BooleanInBooleanNotRuleFixerRector\BooleanInBooleanNotRuleFixerRectorTest
|
|
*/
|
|
abstract class AbstractFalsyScalarRuleFixerRector extends \Rector\Core\Rector\AbstractRector implements \Rector\Core\Contract\Rector\ConfigurableRectorInterface
|
|
{
|
|
/**
|
|
* @deprecated
|
|
* @var string
|
|
*/
|
|
public const TREAT_AS_NON_EMPTY = 'treat_as_non_empty';
|
|
/**
|
|
* @var bool
|
|
*/
|
|
protected $treatAsNonEmpty = \false;
|
|
/**
|
|
* @param mixed[] $configuration
|
|
*/
|
|
public function configure($configuration) : void
|
|
{
|
|
$treatAsNonEmpty = $configuration[self::TREAT_AS_NON_EMPTY] ?? \false;
|
|
\RectorPrefix20211210\Webmozart\Assert\Assert::boolean($treatAsNonEmpty);
|
|
$this->treatAsNonEmpty = $treatAsNonEmpty;
|
|
}
|
|
}
|