Skip to content

Commit 2ce0e7b

Browse files
committed
Appeasing the style gods
1 parent c74077f commit 2ce0e7b

19 files changed

+85
-53
lines changed

background_scripts/batch_export_manager.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@
8383
$logger = Log::factory('batch-export', $logConf);
8484
$logger->info('Command: ' . implode(' ', array_map('escapeshellarg', $argv)));
8585
// NOTE: "process_start_time" is needed for the log summary.
86-
$logger->notice('batch_export_manager start', ['process_start_time' => date('Y-m-d H:i:s')]);
86+
$logger->notice('batch_export_manager start', ['process_start_time' => date('Y-m-d H:i:s')]);
8787
$batchProcessor = new BatchProcessor($logger);
8888
$batchProcessor->setDryRun($dryRun);
8989
$batchProcessor->processRequests();

background_scripts/report_schedule_manager.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@
6666
// =====================================================================
6767

6868
// NOTE: "process_start_time" is needed for log summary.
69-
$logger->notice('Report scheduler start',['process_start_time' => date('Y-m-d H:i:s')]);
69+
$logger->notice('Report scheduler start', ['process_start_time' => date('Y-m-d H:i:s')]);
7070

7171
$active_frequencies = getActiveFrequencies(true);
7272

@@ -115,7 +115,7 @@
115115
} catch(Exception $e) {
116116
$msg = "Error Preparing report on " . gethostname() . " {$details['report_id']}: "
117117
. $e->getMessage();
118-
$logger->error($msg,['stacktrace' => $e->getTraceAsString()]);
118+
$logger->error($msg, ['stacktrace' => $e->getTraceAsString()]);
119119
}
120120

121121
if (isset($working_dir) && $working_dir != '/' && $working_dir != getcwd()) {

classes/CCR/CCRLineFormatter.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
namespace CCR;
44

5-
65
use Monolog\Formatter\LineFormatter;
76
use Monolog\Formatter\NormalizerFormatter;
87

classes/CCR/DB/MySQLHelper.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -219,9 +219,10 @@ public function tableExists($tableName)
219219
*/
220220
public function executeStatement($stmt)
221221
{
222-
$this->logger->info('Executing SQL statement',
222+
$this->logger->info(
223+
'Executing SQL statement',
223224
[
224-
'host' => $this->db->_db_host,
225+
'host' => $this->db->_db_host,
225226
'port' => $this->db->_db_port,
226227
'username' => $this->db->_db_username,
227228
'database' => $this->db->_db_name,
@@ -259,7 +260,8 @@ public function executeStatement($stmt)
259260
*/
260261
public function executeFile($file)
261262
{
262-
$this->logger->info('Executing SQL file',
263+
$this->logger->info(
264+
'Executing SQL file',
263265
[
264266
'host' => $this->db->_db_host,
265267
'port' => $this->db->_db_port,

classes/CCR/Log.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,8 @@ public static function factory(
112112
| E_STRICT | E_DEPRECATED | E_USER_DEPRECATED;
113113

114114
if ($e !== null && ($e['type'] & $mask) == 0) {
115-
$logger->critical($e['message'],
115+
$logger->critical(
116+
$e['message'],
116117
[
117118
'file' => $e['file'],
118119
'line' => $e['line'],

classes/DB/ArrayIngestor.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,8 @@ public function ingest()
7575
try {
7676
$destStatementPrepared->execute($srcRow);
7777
} catch (PDOException $e) {
78-
$this->_logger->error($e->getMessage(),
78+
$this->_logger->error(
79+
$e->getMessage(),
7980
[
8081
'stacktrace' => $e->getTraceAsString(),
8182
'source_row' => json_encode($srcRow)
@@ -101,7 +102,8 @@ public function ingest()
101102
$time_end = microtime(true);
102103
$time = $time_end - $time_start;
103104

104-
$this->_logger->notice('Finished ingestion',
105+
$this->_logger->notice(
106+
'Finished ingestion',
105107
[
106108
'class' => get_class($this),
107109
'records_examined' => $sourceRows,

classes/DB/FilterListBuilder.php

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -76,13 +76,14 @@ public function buildRealmLists($realmName)
7676
foreach ($currentRealm->getGroupByObjects() as $groupByObj) {
7777
$this->buildDimensionLists($realmQuery, $groupByObj, $currentRealm);
7878
}
79-
$this->logger->notice('end',
80-
[
81-
'action' => $realmName . '.build-filter-list',
82-
'start_time' => $startTime,
83-
'end_time' => microtime(true)
84-
]
85-
);
79+
$this->logger->notice(
80+
'end',
81+
[
82+
'action' => $realmName . '.build-filter-list',
83+
'start_time' => $startTime,
84+
'end_time' => microtime(true)
85+
]
86+
);
8687
}
8788

8889
/**
@@ -107,7 +108,8 @@ private function buildDimensionLists(iQuery $realmQuery, iGroupBy $groupBy, iRea
107108
// exist, create it.
108109
$dimensionId = $groupBy->getId();
109110
$startTime = microtime(true);
110-
$this->logger->notice('start',
111+
$this->logger->notice(
112+
'start',
111113
[
112114
'action' => $currentRealm->getName() . '.build-filter-list.' . $dimensionId
113115
]
@@ -243,7 +245,8 @@ private function buildDimensionLists(iQuery $realmQuery, iGroupBy $groupBy, iRea
243245

244246
$this->builtListTables[$pairTableName] = true;
245247
}
246-
$this->logger->notice('end',
248+
$this->logger->notice(
249+
'end',
247250
[
248251
'action' => $currentRealm->getName() . '.build-filter-list.' . $dimensionId,
249252
'start_time' => $startTime,

classes/DB/PDODBMultiIngestor.php

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,8 @@ public function ingest()
8989
)->execute();
9090
}
9191
catch (PDOException $e) {
92-
$this->_logger->info($e->getMessage(),
92+
$this->_logger->info(
93+
$e->getMessage(),
9394
[
9495
'sql' => $updateStatement,
9596
'stacktrace' => $e->getTraceAsString()
@@ -284,7 +285,8 @@ public function ingest()
284285
$f = fopen($infile_name, 'w');
285286
}
286287
catch (Exception $e) {
287-
$this->_logger->error($e->getMessage(),
288+
$this->_logger->error(
289+
$e->getMessage(),
288290
[
289291
'stacktrace' => $e->getTraceAsString(),
290292
'statement' => $load_statement
@@ -308,7 +310,8 @@ public function ingest()
308310
)->execute();
309311
}
310312
catch (PDOException $e) {
311-
$this->_logger->error($e->getMessage(),
313+
$this->_logger->error(
314+
$e->getMessage(),
312315
[
313316
'sql' => $updateStatement,
314317
'stacktrace' => $e->getTraceAsString()
@@ -342,7 +345,8 @@ public function ingest()
342345
$this->_logger->info($message);
343346

344347
// NOTE: This is needed for the log summary.
345-
$this->_logger->notice('Finished ingestion',
348+
$this->_logger->notice(
349+
'Finished ingestion',
346350
[
347351
'class' => get_class($this),
348352
'start_time' => $time_start,
@@ -404,10 +408,11 @@ public function checkForChanges()
404408
$sadness = false;
405409
while($row = $stmt->fetch(PDO::FETCH_ASSOC) )
406410
{
407-
$this->_logger->critical('Missing row',
411+
$this->_logger->critical(
412+
'Missing row',
408413
[
409-
'rowdata' => print_r($row, true),
410-
'class' => get_class($this)
414+
'rowdata' => print_r($row, true),
415+
'class' => get_class($this)
411416
]
412417
);
413418
$sadness = true;

classes/DB/PDODBSynchronizingIngestor.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,8 @@ function ($column) use ($row) { return $row[$column]; },
159159
$time = $timeEnd - $timeStart;
160160

161161
// NOTE: This is needed for the log summary.
162-
$this->logger->notice('Finished ingestion',
162+
$this->logger->notice(
163+
'Finished ingestion',
163164
[
164165
'class' => get_class($this),
165166
'start_time' => $timeStart,

classes/ETL/Aggregator/pdoAggregator.php

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -243,10 +243,12 @@ protected function createDestinationTableObjects()
243243

244244
if ( is_array($this->parsedDefinitionFile->table_definition) ) {
245245
if ( count($this->parsedDefinitionFile->table_definition) > 1 ) {
246-
$this->logger->warning(sprintf(
246+
$this->logger->warning(
247+
sprintf(
247248
"%s does not support multiple ETL destination tables, using first table",
248249
$this
249-
));
250+
)
251+
);
250252
}
251253
$tableDefinition = $this->parsedDefinitionFile->table_definition;
252254
$this->parsedDefinitionFile->table_definition = array_shift($tableDefinition);
@@ -715,7 +717,8 @@ protected function _execute($aggregationUnit)
715717
{
716718
$time_start = microtime(true);
717719

718-
$this->logger->notice("aggregate start",
720+
$this->logger->notice(
721+
"aggregate start",
719722
[
720723
"action" => (string) $this,
721724
"unit" => $aggregationUnit,
@@ -1057,7 +1060,8 @@ function ($k, $first, $last) {
10571060
$time_end = microtime(true);
10581061
$time = $time_end - $time_start;
10591062

1060-
$this->logger->notice("aggregate end",
1063+
$this->logger->notice(
1064+
"aggregate end",
10611065
[
10621066
"action" => (string)$this,
10631067
"unit" => $aggregationUnit,

0 commit comments

Comments
 (0)