opt
/
cpanel
/
ea-wappspector
/
vendor
/
rector
/
rector
/
rules
/
Strict
/
Rector
➕ New
📤 Upload
✎ Editing:
AbstractFalsyScalarRuleFixerRector.php
← Back
<?php declare (strict_types=1); namespace Rector\Strict\Rector; use Rector\Contract\Rector\ConfigurableRectorInterface; use Rector\Rector\AbstractScopeAwareRector; use RectorPrefix202411\Webmozart\Assert\Assert; /** * @see \Rector\Tests\Strict\Rector\BooleanNot\BooleanInBooleanNotRuleFixerRector\BooleanInBooleanNotRuleFixerRectorTest * * @internal */ abstract class AbstractFalsyScalarRuleFixerRector extends AbstractScopeAwareRector implements ConfigurableRectorInterface { /** * @api * @var string */ public const TREAT_AS_NON_EMPTY = 'treat_as_non_empty'; /** * @var bool */ protected $treatAsNonEmpty = \false; /** * @param mixed[] $configuration */ public function configure(array $configuration) : void { $treatAsNonEmpty = $configuration[self::TREAT_AS_NON_EMPTY] ?? (bool) \current($configuration); Assert::boolean($treatAsNonEmpty); $this->treatAsNonEmpty = $treatAsNonEmpty; } }
💾 Save Changes
Cancel
📤 Upload File
×
Select File
Upload
Cancel
➕ Create New
×
Type
📄 File
📁 Folder
Name
Create
Cancel
✎ Rename Item
×
Current Name
New Name
Rename
Cancel
🔐 Change Permissions
×
Target File
Permission (e.g., 0755, 0644)
0755
0644
0777
Apply
Cancel