Skip to content

Commit

Permalink
[automated] Apply Coding Standard (#5074)
Browse files Browse the repository at this point in the history
Co-authored-by: TomasVotruba <TomasVotruba@users.noreply.github.com>
  • Loading branch information
TomasVotruba and TomasVotruba committed Sep 24, 2023
1 parent 59e25d9 commit 061eea0
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,11 @@
new MethodCallRename(AbstractType::class, 'setDefaultOptions', 'configureOptions'),
new MethodCallRename('Nette\Utils\Html', 'add', 'addHtml'),
new MethodCallRename(CustomType::class, 'notify', '__invoke'),
new MethodCallRename(\Rector\Tests\Renaming\Rector\MethodCall\RenameMethodRector\Fixture\CustomType::class, 'notify', '__invoke'),
new MethodCallRename(
\Rector\Tests\Renaming\Rector\MethodCall\RenameMethodRector\Fixture\CustomType::class,
'notify',
'__invoke'
),
new MethodCallRename(SomeSubscriber::class, 'old', 'new'),
new MethodCallRename(Foo::class, 'old', 'new'),
new MethodCallRename(NewInterface::class, 'some_old', 'some_new'),
Expand Down
6 changes: 5 additions & 1 deletion src/Rector/AbstractRector.php
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,11 @@ abstract class AbstractRector extends NodeVisitorAbstract implements RectorInter
public function __get(string $name): mixed
{
if (! isset($this->cachedDeprecatedDependenciesWarning[static::class][$name])) {
echo sprintf('Get %s property from AbstractRector on %s is deprecated, inject via __construct() instead', $name, static::class);
echo sprintf(
'Get %s property from AbstractRector on %s is deprecated, inject via __construct() instead',
$name,
static::class
);
echo PHP_EOL;

$this->cachedDeprecatedDependenciesWarning[static::class][$name] = true;
Expand Down

0 comments on commit 061eea0

Please sign in to comment.