diff --git a/src/Service/RlAnalyzer.php b/src/Service/RlAnalyzer.php index da59c0e..b325f45 100644 --- a/src/Service/RlAnalyzer.php +++ b/src/Service/RlAnalyzer.php @@ -5,6 +5,7 @@ namespace Drupal\rl\Service; use Drupal\Core\Database\Connection; +use Drupal\Core\Database\Statement\FetchAs; use Drupal\Core\Entity\EntityTypeManagerInterface; use Drupal\rl\Exception\ExperimentNotFoundException; @@ -404,7 +405,7 @@ protected function getArmsData(string $experimentId): array { ->fields('a') ->condition('experiment_id', $experimentId) ->execute() - ->fetchAll(\PDO::FETCH_ASSOC); + ->fetchAll(FetchAs::Associative); } /** @@ -425,7 +426,7 @@ protected function getArmSnapshots(string $experimentId, string $armId): array { ->condition('arm_id', $armId) ->orderBy('created', 'ASC') ->execute() - ->fetchAll(\PDO::FETCH_ASSOC); + ->fetchAll(FetchAs::Associative); return array_map(function ($row) { return [