Skip to content

CLI-1296: auth:login on 2.23.1 > Invalid key in Cloud datastore fixed #2173

CLI-1296: auth:login on 2.23.1 > Invalid key in Cloud datastore fixed

CLI-1296: auth:login on 2.23.1 > Invalid key in Cloud datastore fixed #2173

Triggered via pull request March 25, 2024 08:27
Status Success
Total duration 7m 27s
Artifacts

mutation.yml

on: pull_request
Mutation Testing
7m 16s
Mutation Testing
Fit to window
Zoom out
Zoom in

Annotations

1 warning
Mutation Testing: src/Command/Auth/AuthLoginCommand.php#L30
Escaped Mutant for Mutator "LogicalAnd": --- Original +++ New @@ @@ $keys = $this->datastoreCloud->get('keys'); $activeKey = $this->datastoreCloud->get('acli_key'); // @todo this validation should really be enforced as a schema on the datastore. - if (is_array($keys) && !empty($keys) != 0 && !array_key_exists($activeKey, $keys)) { + if ((is_array($keys) || !empty($keys) != 0) && !array_key_exists($activeKey, $keys)) { throw new AcquiaCliException('Invalid key in Cloud datastore; run acli auth:logout && acli auth:login to fix'); } if ($activeKey) {