-
Notifications
You must be signed in to change notification settings - Fork 2
Closed
Labels
enhancementNew feature or requestNew feature or request
Description
I was running into a weird issue on PHP 8 where code like this:
<?php
declare(strict_types=1);
namespace Foo\Bar;
$n = new \DateTime;
echo $n->format('c');
Was being improperly "fixed" into something like this:
<?php
declare(strict_types=1);
namespace Foo\Bar;
$n = new(()) \DateTime;
echo $n->format('c');
(may not be exact - recording this bug from memory)
I have a hunch it's related to the following two sniffs which both seem to try and make changes to the affected line:
PSR12.Classes.ClassInstantiation
SlevomatCodingStandard.ControlStructures.NewWithParentheses
Further debugging to confirm and fix is needed.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request