From 8da731bb46402db637b58b74982aa16a24ece749 Mon Sep 17 00:00:00 2001 From: Daniel Kesselberg Date: Sat, 17 Feb 2024 16:56:57 +0100 Subject: [PATCH] style: apply latest coding standard Signed-off-by: Daniel Kesselberg --- .../Version1004Date20200626143122.php | 88 +++++++++---------- 1 file changed, 44 insertions(+), 44 deletions(-) diff --git a/lib/Migration/Version1004Date20200626143122.php b/lib/Migration/Version1004Date20200626143122.php index ba2b702..86681a1 100644 --- a/lib/Migration/Version1004Date20200626143122.php +++ b/lib/Migration/Version1004Date20200626143122.php @@ -78,48 +78,48 @@ public function changeSchema(IOutput $output, Closure $schemaClosure, array $opt return null; } -// /** -// * @param IOutput $output -// * @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper` -// * @param array $options -// */ -// public function postSchemaChange(IOutput $output, Closure $schemaClosure, array $options) { -// $insert = $this->connection->getQueryBuilder(); -// $insert->insert('usage_report_actions') -// ->values([ -// 'user_id' => $insert->createParameter('user'), -// 'action' => $insert->createParameter('action'), -// 'datetime' => $insert->createParameter('datetime'), -// ]); -// -// $query = $this->connection->getQueryBuilder(); -// $query->select('*') -// ->from('usage_report') -// ->orderBy('timestamp', 'ASC') -// ->addOrderBy('user_id', 'ASC') -// ->addOrderBy('action', 'ASC') -// ->setMaxResults(self::MIGRATION_SIZE); -// -// $offset = 0; -// do { -// $query->setFirstResult($offset); -// $result = $query->execute(); -// $rows = $result->fetchAll(); -// $result->closeCursor(); -// -// if (empty($rows)) { -// return; -// } -// -// foreach ($rows as $row) { -// $date = new \DateTime($row['timestamp']); -// $insert->setParameter('user', $row['user_id']) -// ->setParameter('action', $row['action']) -// ->setParameter('datetime', $date, IQueryBuilder::PARAM_DATE); -// $insert->execute(); -// } -// -// $offset += self::MIGRATION_SIZE; -// } while (true); -// } + // /** + // * @param IOutput $output + // * @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper` + // * @param array $options + // */ + // public function postSchemaChange(IOutput $output, Closure $schemaClosure, array $options) { + // $insert = $this->connection->getQueryBuilder(); + // $insert->insert('usage_report_actions') + // ->values([ + // 'user_id' => $insert->createParameter('user'), + // 'action' => $insert->createParameter('action'), + // 'datetime' => $insert->createParameter('datetime'), + // ]); + // + // $query = $this->connection->getQueryBuilder(); + // $query->select('*') + // ->from('usage_report') + // ->orderBy('timestamp', 'ASC') + // ->addOrderBy('user_id', 'ASC') + // ->addOrderBy('action', 'ASC') + // ->setMaxResults(self::MIGRATION_SIZE); + // + // $offset = 0; + // do { + // $query->setFirstResult($offset); + // $result = $query->execute(); + // $rows = $result->fetchAll(); + // $result->closeCursor(); + // + // if (empty($rows)) { + // return; + // } + // + // foreach ($rows as $row) { + // $date = new \DateTime($row['timestamp']); + // $insert->setParameter('user', $row['user_id']) + // ->setParameter('action', $row['action']) + // ->setParameter('datetime', $date, IQueryBuilder::PARAM_DATE); + // $insert->execute(); + // } + // + // $offset += self::MIGRATION_SIZE; + // } while (true); + // } }