Skip to content

CLI-1227: Implement PHP 8 attributes #1994

CLI-1227: Implement PHP 8 attributes

CLI-1227: Implement PHP 8 attributes #1994

Triggered via pull request November 28, 2023 17:11
Status Success
Total duration 2m 15s
Artifacts

mutation.yml

on: pull_request
Mutation Testing
2m 8s
Mutation Testing
Fit to window
Zoom out
Zoom in

Annotations

10 warnings
Mutation Testing: src/Command/Acsf/AcsfApiBaseCommand.php#L18
Escaped Mutant for Mutator "LogicalNot": --- Original +++ New @@ @@ protected function checkAuthentication() : void { $reflectionClass = new \ReflectionClass($this); - if ($reflectionClass->getAttributes(RequireAuth::class) && !$this->cloudApiClientService->isMachineAuthenticated()) { + if ($reflectionClass->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#L18
Escaped Mutant for Mutator "LogicalAnd": --- Original +++ New @@ @@ protected function checkAuthentication() : void { $reflectionClass = new \ReflectionClass($this); - if ($reflectionClass->getAttributes(RequireAuth::class) && !$this->cloudApiClientService->isMachineAuthenticated()) { + if ($reflectionClass->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#L18
Escaped Mutant for Mutator "LogicalAndSingleSubExprNegation": --- Original +++ New @@ @@ protected function checkAuthentication() : void { $reflectionClass = new \ReflectionClass($this); - if ($reflectionClass->getAttributes(RequireAuth::class) && !$this->cloudApiClientService->isMachineAuthenticated()) { + if (!$reflectionClass->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/ConfigurePlatformEmailCommand.php#L34
Escaped Mutant for Mutator "MethodCallRemoval": --- Original +++ New @@ @@ { protected function configure() : void { - $this->addArgument('subscriptionUuid', InputArgument::OPTIONAL, 'The subscription UUID to register the domain with.')->setHelp('This command configures Platform Email for a domain in a subscription. It registers the domain with the subscription, associates the domain with an application or set of applications, and enables Platform Email for selected environments of these applications.'); + } 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#L21
Escaped Mutant for Mutator "LogicalAndSingleSubExprNegation": --- Original +++ New @@ @@ protected function initialize(InputInterface $input, OutputInterface $output) : void { $reflectionClass = new \ReflectionClass($this); - if ($reflectionClass->getAttributes(RequireAuth::class) && !$this->cloudApiClientService->isMachineAuthenticated()) { + if (!$reflectionClass->getAttributes(RequireAuth::class) && !$this->cloudApiClientService->isMachineAuthenticated()) { $commandName = 'auth:login'; $command = $this->getApplication()->find($commandName); $arguments = ['command' => $commandName];