Completed
Push — master ( 75748b...36048b )
by Michael
06:58
created
lib/Yapeal.php 1 patch
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -77,25 +77,25 @@  discard block
 block discarded – undo
77 77
         $this->setYem($dic['Yapeal.Event.Mediator']);
78 78
         $mess = 'Let the magic begin!';
79 79
         $this->getYem()
80
-             ->triggerLogEvent('Yapeal.Log.log', Logger::INFO, $mess);
80
+                ->triggerLogEvent('Yapeal.Log.log', Logger::INFO, $mess);
81 81
         /**
82 82
          * @var CommonSqlQueries $csq
83 83
          */
84 84
         $csq = $dic['Yapeal.Sql.CommonQueries'];
85 85
         $sql = $csq->getActiveApis();
86 86
         $this->getYem()
87
-             ->triggerLogEvent('Yapeal.Log.log', Logger::INFO, $sql);
87
+                ->triggerLogEvent('Yapeal.Log.log', Logger::INFO, $sql);
88 88
         try {
89 89
             /**
90 90
              * @var PDO $pdo
91 91
              */
92 92
             $pdo = $dic['Yapeal.Sql.Connection'];
93 93
             $records = $pdo->query($sql)
94
-                           ->fetchAll(PDO::FETCH_ASSOC);
94
+                            ->fetchAll(PDO::FETCH_ASSOC);
95 95
         } catch (PDOException $exc) {
96 96
             $mess = 'Could not access utilEveApi table';
97 97
             $this->getYem()
98
-                 ->triggerLogEvent('Yapeal.Log.log', Logger::INFO, $mess, ['exception' => $exc]);
98
+                    ->triggerLogEvent('Yapeal.Log.log', Logger::INFO, $mess, ['exception' => $exc]);
99 99
             return 1;
100 100
         }
101 101
         // Always check APIKeyInfo.
@@ -116,8 +116,8 @@  discard block
 block discarded – undo
116 116
              */
117 117
             $data = $dic['Yapeal.Xml.Data'];
118 118
             $data->setEveApiName($record['apiName'])
119
-                 ->setEveApiSectionName($record['sectionName'])
120
-                 ->setCacheInterval($record['interval']);
119
+                    ->setEveApiSectionName($record['sectionName'])
120
+                    ->setCacheInterval($record['interval']);
121 121
             $this->emitEvents($data, 'start');
122 122
         }
123 123
         return 0;
Please login to merge, or discard this patch.
lib/Console/Command/EveApiCreatorTrait.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -131,7 +131,7 @@
 block discarded – undo
131 131
     protected function saveToFile($fileName, $contents)
132 132
     {
133 133
         $fileName = $this->getFpn()
134
-                         ->normalizeFile($fileName);
134
+                            ->normalizeFile($fileName);
135 135
         return file_put_contents($fileName, $contents);
136 136
     }
137 137
     /**
Please login to merge, or discard this patch.
lib/Console/Command/EveApiCreator.php 1 patch
Indentation   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -88,8 +88,8 @@  discard block
 block discarded – undo
88 88
          */
89 89
         $data = $this->getDic()['Yapeal.Xml.Data'];
90 90
         $data->setEveApiName($apiName)
91
-             ->setEveApiSectionName($sectionName)
92
-             ->setEveApiArguments($posts);
91
+                ->setEveApiSectionName($sectionName)
92
+                ->setEveApiArguments($posts);
93 93
         foreach (['retrieve', 'create', 'transform', 'validate', 'cache'] as $eventName) {
94 94
             if (false === $this->emitEvents($data, $eventName)) {
95 95
                 return 2;
@@ -115,13 +115,13 @@  discard block
 block discarded – undo
115 115
 
116 116
 EOF;
117 117
         $this->addArgument('section_name', InputArgument::REQUIRED, 'Name of Eve Api section to retrieve.')
118
-             ->addArgument('api_name', InputArgument::REQUIRED, 'Name of Eve Api to retrieve.')
119
-             ->addArgument('mask', InputArgument::REQUIRED, 'Bit mask for Eve Api.')
120
-             ->addArgument('post', InputArgument::OPTIONAL | InputArgument::IS_ARRAY,
121
-                 'Optional list of additional POST parameter(s) to send to server.', [])
122
-             ->addOption('overwrite', null, InputOption::VALUE_NONE,
123
-                 'Causes command to overwrite any existing per Eve API files.')
124
-             ->setHelp($help);
118
+                ->addArgument('api_name', InputArgument::REQUIRED, 'Name of Eve Api to retrieve.')
119
+                ->addArgument('mask', InputArgument::REQUIRED, 'Bit mask for Eve Api.')
120
+                ->addArgument('post', InputArgument::OPTIONAL | InputArgument::IS_ARRAY,
121
+                    'Optional list of additional POST parameter(s) to send to server.', [])
122
+                ->addOption('overwrite', null, InputOption::VALUE_NONE,
123
+                    'Causes command to overwrite any existing per Eve API files.')
124
+                ->setHelp($help);
125 125
     }
126 126
     /** @noinspection PhpMissingParentCallCommonInspection */
127 127
     /**
Please login to merge, or discard this patch.
lib/Console/Command/NetworkRetriever.php 1 patch
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -92,11 +92,11 @@  discard block
 block discarded – undo
92 92
 
93 93
 EOF;
94 94
         $this->addArgument('section_name', InputArgument::REQUIRED, 'Name of Eve Api section to retrieve.')
95
-             ->addArgument('api_name', InputArgument::REQUIRED, 'Name of Eve Api to retrieve.')
96
-             ->addArgument('post', InputArgument::OPTIONAL | InputArgument::IS_ARRAY,
97
-                 'Optional list of additional POST parameter(s) to send to server.', [])
98
-             ->addOption('directory', 'd', InputOption::VALUE_REQUIRED, 'Directory that XML will be sent to.')
99
-             ->setHelp($help);
95
+                ->addArgument('api_name', InputArgument::REQUIRED, 'Name of Eve Api to retrieve.')
96
+                ->addArgument('post', InputArgument::OPTIONAL | InputArgument::IS_ARRAY,
97
+                    'Optional list of additional POST parameter(s) to send to server.', [])
98
+                ->addOption('directory', 'd', InputOption::VALUE_REQUIRED, 'Directory that XML will be sent to.')
99
+                ->setHelp($help);
100 100
     }
101 101
     /** @noinspection PhpMissingParentCallCommonInspection */
102 102
     /**
@@ -129,7 +129,7 @@  discard block
 block discarded – undo
129 129
         $this->setYem($dic['Yapeal.Event.Mediator']);
130 130
         $mess = 'Starting Network retrieve';
131 131
         $this->getYem()
132
-             ->triggerLogEvent('Yapeal.Log.log', Logger::ERROR, $mess);
132
+                ->triggerLogEvent('Yapeal.Log.log', Logger::ERROR, $mess);
133 133
         /**
134 134
          * Get new Data instance from factory.
135 135
          *
@@ -137,8 +137,8 @@  discard block
 block discarded – undo
137 137
          */
138 138
         $data = $dic['Yapeal.Xml.Data'];
139 139
         $data->setEveApiName($apiName)
140
-             ->setEveApiSectionName($sectionName)
141
-             ->setEveApiArguments($posts);
140
+                ->setEveApiSectionName($sectionName)
141
+                ->setEveApiArguments($posts);
142 142
         foreach (['retrieve', 'cache'] as $eventName) {
143 143
             $this->emitEvents($data, $eventName);
144 144
         }
Please login to merge, or discard this patch.
lib/Sql/PreserverTrait.php 1 patch
Indentation   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -97,21 +97,21 @@  discard block
 block discarded – undo
97 97
         $rowCount = count($columns) / count($columnNames);
98 98
         $mess = sprintf('Have %1$s row(s) to upsert into %2$s table', $rowCount, $tableName);
99 99
         $this->getYem()
100
-             ->triggerLogEvent('Yapeal.Log.log', Logger::INFO, $mess);
100
+                ->triggerLogEvent('Yapeal.Log.log', Logger::INFO, $mess);
101 101
         $sql = $this->getCsq()
102 102
                     ->getUpsert($tableName, $columnNames, $rowCount);
103 103
         $mess = preg_replace('/(,\(\?(?:,\?)*\))+/', ',...', $sql);
104 104
         $this->getYem()
105
-             ->triggerLogEvent('Yapeal.Log.log', Logger::INFO, $mess);
105
+                ->triggerLogEvent('Yapeal.Log.log', Logger::INFO, $mess);
106 106
         $mess = implode(',', $columns);
107 107
         if (512 < strlen($mess)) {
108 108
             $mess = substr($mess, 0, 512) . '...';
109 109
         }
110 110
         $this->getYem()
111
-             ->triggerLogEvent('Yapeal.Log.log', Logger::DEBUG, $mess);
111
+                ->triggerLogEvent('Yapeal.Log.log', Logger::DEBUG, $mess);
112 112
         $this->getPdo()
113
-             ->prepare($sql)
114
-             ->execute($columns);
113
+                ->prepare($sql)
114
+                ->execute($columns);
115 115
         return $this;
116 116
     }
117 117
     /**
@@ -206,30 +206,30 @@  discard block
 block discarded – undo
206 206
             return $event->setHandledSufficiently();
207 207
         }
208 208
         $this->getYem()
209
-             ->triggerLogEvent(
210
-                 'Yapeal.Log.log',
211
-                 Logger::DEBUG,
212
-                 $this->getReceivedEventMessage($data, $eventName, __CLASS__)
213
-             );
209
+                ->triggerLogEvent(
210
+                    'Yapeal.Log.log',
211
+                    Logger::DEBUG,
212
+                    $this->getReceivedEventMessage($data, $eventName, __CLASS__)
213
+                );
214 214
         $this->getPdo()
215
-             ->beginTransaction();
215
+                ->beginTransaction();
216 216
         try {
217 217
             foreach ($this->getPreserveTos() as $preserveTo) {
218 218
                 $this->$preserveTo($data);
219 219
             }
220 220
             $this->getPdo()
221
-                 ->commit();
221
+                    ->commit();
222 222
         } catch (\PDOException $exc) {
223 223
             $mess = 'Failed to upsert data of';
224 224
             $this->getYem()
225
-                 ->triggerLogEvent(
226
-                     'Yapeal.Log.log',
227
-                     Logger::WARNING,
228
-                     $this->createEveApiMessage($mess, $data),
229
-                     ['exception' => $exc]
230
-                 );
225
+                    ->triggerLogEvent(
226
+                        'Yapeal.Log.log',
227
+                        Logger::WARNING,
228
+                        $this->createEveApiMessage($mess, $data),
229
+                        ['exception' => $exc]
230
+                    );
231 231
             $this->getPdo()
232
-                 ->rollBack();
232
+                    ->rollBack();
233 233
             return $event;
234 234
         }
235 235
         return $event->setHandledSufficiently();
Please login to merge, or discard this patch.
lib/Console/Command/AbstractDatabaseCommon.php 1 patch
Indentation   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -56,16 +56,16 @@
 block discarded – undo
56 56
     protected function addOptions($help)
57 57
     {
58 58
         $this->addOption('configFile', 'c', InputOption::VALUE_REQUIRED, 'Configuration file to get settings from.')
59
-             ->addOption('database', 'd', InputOption::VALUE_REQUIRED, 'Name of the database.')
60
-             ->addOption('hostName', 'o', InputOption::VALUE_REQUIRED, 'Host name for database server.')
61
-             ->addOption('password', 'p', InputOption::VALUE_REQUIRED, 'Password used to access database.')
62
-             ->addOption('platform', null, InputOption::VALUE_REQUIRED,
63
-                 'Platform of database driver. Currently only "mysql" can be used.')
64
-             ->addOption('port', null, InputOption::VALUE_REQUIRED,
65
-                 'Port number for remote server. Only needed if using http connection.')
66
-             ->addOption('tablePrefix', 't', InputOption::VALUE_REQUIRED, 'Prefix for database table names.')
67
-             ->addOption('userName', 'u', InputOption::VALUE_REQUIRED, 'User name used to access database.')
68
-             ->setHelp($help);
59
+                ->addOption('database', 'd', InputOption::VALUE_REQUIRED, 'Name of the database.')
60
+                ->addOption('hostName', 'o', InputOption::VALUE_REQUIRED, 'Host name for database server.')
61
+                ->addOption('password', 'p', InputOption::VALUE_REQUIRED, 'Password used to access database.')
62
+                ->addOption('platform', null, InputOption::VALUE_REQUIRED,
63
+                    'Platform of database driver. Currently only "mysql" can be used.')
64
+                ->addOption('port', null, InputOption::VALUE_REQUIRED,
65
+                    'Port number for remote server. Only needed if using http connection.')
66
+                ->addOption('tablePrefix', 't', InputOption::VALUE_REQUIRED, 'Prefix for database table names.')
67
+                ->addOption('userName', 'u', InputOption::VALUE_REQUIRED, 'User name used to access database.')
68
+                ->setHelp($help);
69 69
     }
70 70
     /** @noinspection PhpMissingParentCallCommonInspection */
71 71
     /**
Please login to merge, or discard this patch.
lib/Console/Command/DatabaseUpdater.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
     {
113 113
         $name = 'DatabaseUpdater::dropDatabaseProcedure';
114 114
         $this->executeSqlStatements($this->getCsq()
115
-                                         ->getDropAddOrModifyColumnProcedure(), $name, $output);
115
+                                            ->getDropAddOrModifyColumnProcedure(), $name, $output);
116 116
     }
117 117
     /**
118 118
      * @param OutputInterface $output
@@ -127,7 +127,7 @@  discard block
 block discarded – undo
127 127
                     ->getUtilLatestDatabaseVersion();
128 128
         try {
129 129
             $result = $this->getPdo()
130
-                           ->query($sql, \PDO::FETCH_NUM);
130
+                            ->query($sql, \PDO::FETCH_NUM);
131 131
             $version = sprintf('%018.3F', $result->fetchColumn());
132 132
             $result->closeCursor();
133 133
         } catch (\PDOException $exc) {
@@ -246,10 +246,10 @@  discard block
 block discarded – undo
246 246
                 $updateVersion
247 247
             );
248 248
             if ($this->getPdo()
249
-                     ->inTransaction()
249
+                        ->inTransaction()
250 250
             ) {
251 251
                 $this->getPdo()
252
-                     ->rollBack();
252
+                        ->rollBack();
253 253
             }
254 254
             throw new YapealDatabaseException($mess, 2);
255 255
         }
Please login to merge, or discard this patch.
lib/Console/Command/DatabaseInitializer.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
             if ('Database' === $dir && $this->dropDatabase) {
107 107
                 // Add drop database file if requested.
108 108
                 $fileList[] = $this->getFpn()
109
-                                   ->normalizeFile($path . $dir . '/DropDatabase.sql');
109
+                                    ->normalizeFile($path . $dir . '/DropDatabase.sql');
110 110
             }
111 111
             foreach (new \DirectoryIterator($path . $dir . '/') as $fileInfo) {
112 112
                 // Add file path if it's a sql create file.
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
                     && 0 === strpos($fileInfo->getBasename(), 'Create')
116 116
                 ) {
117 117
                     $fileList[] = $this->getFpn()
118
-                                       ->normalizeFile($fileInfo->getPathname());
118
+                                        ->normalizeFile($fileInfo->getPathname());
119 119
                 }
120 120
             }
121 121
         }
Please login to merge, or discard this patch.
lib/EveApi/Eve/ErrorList.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -67,9 +67,9 @@
 block discarded – undo
67 67
         $sql = $this->getCsq()
68 68
                     ->getDeleteFromTable($tableName);
69 69
         $this->getYem()
70
-             ->triggerLogEvent('Yapeal.Log.log', Logger::DEBUG, $sql);
70
+                ->triggerLogEvent('Yapeal.Log.log', Logger::DEBUG, $sql);
71 71
         $this->getPdo()
72
-             ->exec($sql);
72
+                ->exec($sql);
73 73
         $columnDefaults = [
74 74
             'errorCode' => null,
75 75
             'errorText' => null
Please login to merge, or discard this patch.