Skip to content

Remove pointless if-test. #1759

Remove pointless if-test.

Remove pointless if-test. #1759

Triggered via push June 19, 2023 16:30
Status Success
Total duration 13m 36s
Artifacts
This run and associated checks have been archived and are scheduled for deletion. Learn more about checks retention

mutation.yml

on: push
Fit to window
Zoom out
Zoom in

Annotations

10 warnings
Mutation Testing: src/AcsfApi/AcsfClientService.php#L18
Escaped Mutant for Mutator "MethodCallRemoval": --- Original +++ New @@ @@ public function getClient() : AcsfClient { $client = AcsfClient::factory($this->connector); - $this->configureClient($client); + return $client; } protected function checkAuthentication() : bool
Mutation Testing: src/AcsfApi/AcsfConnector.php#L21
Escaped Mutant for Mutator "ArrayItemRemoval": --- Original +++ New @@ @@ public function __construct(array $config, string $baseUri = NULL, string $urlAccessToken = NULL) { parent::__construct($config, $baseUri, $urlAccessToken); - $this->client = new GuzzleClient(['auth' => [$config['key'], $config['secret']], 'base_uri' => $this->getBaseUri()]); + $this->client = new GuzzleClient(['base_uri' => $this->getBaseUri()]); } /** * @param array<string> $options
Mutation Testing: src/AcsfApi/AcsfConnector.php#L22
Escaped Mutant for Mutator "ArrayItemRemoval": --- Original +++ New @@ @@ public function __construct(array $config, string $baseUri = NULL, string $urlAccessToken = NULL) { parent::__construct($config, $baseUri, $urlAccessToken); - $this->client = new GuzzleClient(['auth' => [$config['key'], $config['secret']], 'base_uri' => $this->getBaseUri()]); + $this->client = new GuzzleClient(['auth' => [$config['secret']], 'base_uri' => $this->getBaseUri()]); } /** * @param array<string> $options
Mutation Testing: src/AcsfApi/AcsfConnector.php#L26
Escaped Mutant for Mutator "ArrayItem": --- Original +++ New @@ @@ public function __construct(array $config, string $baseUri = NULL, string $urlAccessToken = NULL) { parent::__construct($config, $baseUri, $urlAccessToken); - $this->client = new GuzzleClient(['auth' => [$config['key'], $config['secret']], 'base_uri' => $this->getBaseUri()]); + $this->client = new GuzzleClient(['auth' => [$config['key'], $config['secret']], 'base_uri' > $this->getBaseUri()]); } /** * @param array<string> $options
Mutation Testing: src/Application.php#L40
Escaped Mutant for Mutator "MethodCallRemoval": --- Original +++ New @@ @@ if ($this->getHelpMessages()) { $io = new SymfonyStyle(new ArrayInput([]), $output); $outputStyle = new OutputFormatterStyle('white', 'blue'); - $output->getFormatter()->setStyle('help', $outputStyle); + $io->block($this->getHelpMessages(), 'help', 'help', ' ', TRUE, FALSE); } } }
Mutation Testing: src/Application.php#L41
Escaped Mutant for Mutator "FalseValue": --- Original +++ New @@ @@ $io = new SymfonyStyle(new ArrayInput([]), $output); $outputStyle = new OutputFormatterStyle('white', 'blue'); $output->getFormatter()->setStyle('help', $outputStyle); - $io->block($this->getHelpMessages(), 'help', 'help', ' ', TRUE, FALSE); + $io->block($this->getHelpMessages(), 'help', 'help', ' ', TRUE, true); } } }
Mutation Testing: src/Application.php#L41
Escaped Mutant for Mutator "TrueValue": --- Original +++ New @@ @@ $io = new SymfonyStyle(new ArrayInput([]), $output); $outputStyle = new OutputFormatterStyle('white', 'blue'); $output->getFormatter()->setStyle('help', $outputStyle); - $io->block($this->getHelpMessages(), 'help', 'help', ' ', TRUE, FALSE); + $io->block($this->getHelpMessages(), 'help', 'help', ' ', false, FALSE); } } }
Mutation Testing: src/CloudApi/ClientService.php#L33
Escaped Mutant for Mutator "PublicVisibility": --- Original +++ New @@ @@ $this->setConnector($connectorFactory->createConnector()); $this->setApplication($application); } - public function setConnector(ConnectorInterface $connector) : void + protected function setConnector(ConnectorInterface $connector) : void { $this->connector = $connector; }
Mutation Testing: src/CloudApi/ClientService.php#L67
Escaped Mutant for Mutator "ProtectedVisibility": --- Original +++ New @@ @@ $this->machineIsAuthenticated = $this->checkAuthentication(); return $this->machineIsAuthenticated; } - protected function checkAuthentication() : bool + private function checkAuthentication() : bool { return $this->credentials->getCloudAccessToken() || $this->credentials->getCloudKey() && $this->credentials->getCloudSecret(); } }
Mutation Testing: src/CloudApi/CloudCredentials.php#L43
Escaped Mutant for Mutator "UnwrapTrim": --- Original +++ New @@ @@ if (!file_exists($file)) { throw new AcquiaCliException('Access token expiry file not found at {file}', ['file' => $file]); } - return trim(file_get_contents($file), "\"\n"); + return file_get_contents($file); } return NULL; }