CLI-1227: Implement PHP 8 attributes #1995
mutation.yml
on: pull_request
Mutation Testing
3m 1s
Annotations
9 warnings
Mutation Testing:
src/Command/Acsf/AcsfApiBaseCommand.php#L17
Escaped Mutant for Mutator "LogicalNot":
--- Original
+++ New
@@ @@
{
protected function checkAuthentication() : void
{
- if ((new \ReflectionClass(static::class))->getAttributes(RequireAuth::class) && !$this->cloudApiClientService->isMachineAuthenticated()) {
+ if ((new \ReflectionClass(static::class))->getAttributes(RequireAuth::class) && $this->cloudApiClientService->isMachineAuthenticated()) {
throw new AcquiaCliException('This machine is not yet authenticated with the Acquia Cloud Site Factory. Run `acli auth:acsf-login`');
}
}
|
Mutation Testing:
src/Command/Acsf/AcsfApiBaseCommand.php#L17
Escaped Mutant for Mutator "LogicalAnd":
--- Original
+++ New
@@ @@
{
protected function checkAuthentication() : void
{
- if ((new \ReflectionClass(static::class))->getAttributes(RequireAuth::class) && !$this->cloudApiClientService->isMachineAuthenticated()) {
+ if ((new \ReflectionClass(static::class))->getAttributes(RequireAuth::class) || !$this->cloudApiClientService->isMachineAuthenticated()) {
throw new AcquiaCliException('This machine is not yet authenticated with the Acquia Cloud Site Factory. Run `acli auth:acsf-login`');
}
}
|
Mutation Testing:
src/Command/Acsf/AcsfApiBaseCommand.php#L17
Escaped Mutant for Mutator "LogicalAndSingleSubExprNegation":
--- Original
+++ New
@@ @@
{
protected function checkAuthentication() : void
{
- if ((new \ReflectionClass(static::class))->getAttributes(RequireAuth::class) && !$this->cloudApiClientService->isMachineAuthenticated()) {
+ if (!(new \ReflectionClass(static::class))->getAttributes(RequireAuth::class) && !$this->cloudApiClientService->isMachineAuthenticated()) {
throw new AcquiaCliException('This machine is not yet authenticated with the Acquia Cloud Site Factory. Run `acli auth:acsf-login`');
}
}
|
Mutation Testing:
src/Command/App/AppOpenCommand.php#L20
Escaped Mutant for Mutator "MethodCallRemoval":
--- Original
+++ New
@@ @@
{
protected function configure() : void
{
- $this->acceptApplicationUuid();
+
}
protected function execute(InputInterface $input, OutputInterface $output) : int
{
|
Mutation Testing:
src/Command/App/AppVcsInfo.php#L23
Escaped Mutant for Mutator "MethodCallRemoval":
--- Original
+++ New
@@ @@
{
protected function configure() : void
{
- $this->addOption('deployed', NULL, InputOption::VALUE_OPTIONAL, 'Show only deployed branches and tags')->addUsage('[<applicationAlias>] --deployed');
+
$this->acceptApplicationUuid();
}
protected function execute(InputInterface $input, OutputInterface $output) : int
|
Mutation Testing:
src/Command/Email/EmailInfoForSubscriptionCommand.php#L27
Escaped Mutant for Mutator "MethodCallRemoval":
--- Original
+++ New
@@ @@
{
protected function configure() : void
{
- $this->addArgument('subscriptionUuid', InputArgument::OPTIONAL, 'The subscription UUID whose Platform Email configuration is to be checked.')->setHelp('This command lists information related to Platform Email for a subscription, including which domains have been validated, which have not, and which applications have Platform Email domains associated.');
+
}
protected function execute(InputInterface $input, OutputInterface $output) : int
{
|
Mutation Testing:
src/Command/Ide/IdeOpenCommand.php#L20
Escaped Mutant for Mutator "MethodCallRemoval":
--- Original
+++ New
@@ @@
{
protected function configure() : void
{
- $this->setHidden(AcquiaDrupalEnvironmentDetector::isAhIdeEnv());
+
$this->acceptApplicationUuid();
// @todo Add option to accept an ide UUID.
}
|
Mutation Testing:
src/Command/Ssh/SshKeyDeleteCommand.php#L21
Escaped Mutant for Mutator "MethodCallRemoval":
--- Original
+++ New
@@ @@
use SshCommandTrait;
protected function configure() : void
{
- $this->addOption('cloud-key-uuid', 'uuid', InputOption::VALUE_REQUIRED);
+
}
protected function execute(InputInterface $input, OutputInterface $output) : int
{
|
Mutation Testing:
src/Command/WizardCommandBase.php#L20
Escaped Mutant for Mutator "LogicalAndSingleSubExprNegation":
--- Original
+++ New
@@ @@
protected abstract function validateEnvironment() : void;
protected function initialize(InputInterface $input, OutputInterface $output) : void
{
- if ((new \ReflectionClass(static::class))->getAttributes(RequireAuth::class) && !$this->cloudApiClientService->isMachineAuthenticated()) {
+ if (!(new \ReflectionClass(static::class))->getAttributes(RequireAuth::class) && !$this->cloudApiClientService->isMachineAuthenticated()) {
$commandName = 'auth:login';
$command = $this->getApplication()->find($commandName);
$arguments = ['command' => $commandName];
|