@@ -70,11 +70,11 @@ discard block |
||
70 | 70 | $this->setYem($yem); |
71 | 71 | $data = $event->getData(); |
72 | 72 | $this->getYem() |
73 | - ->triggerLogEvent( |
|
74 | - 'Yapeal.Log.log', |
|
75 | - Logger::DEBUG, |
|
76 | - $this->getReceivedEventMessage($data, $eventName, __CLASS__) |
|
77 | - ); |
|
73 | + ->triggerLogEvent( |
|
74 | + 'Yapeal.Log.log', |
|
75 | + Logger::DEBUG, |
|
76 | + $this->getReceivedEventMessage($data, $eventName, __CLASS__) |
|
77 | + ); |
|
78 | 78 | $fileName = $this->findEveApiFile($data->getEveApiSectionName(), $data->getEveApiName(), 'xsd'); |
79 | 79 | if ('' === $fileName) { |
80 | 80 | return $event; |
@@ -91,7 +91,7 @@ discard block |
||
91 | 91 | if (0 !== count($errors)) { |
92 | 92 | foreach ($errors as $error) { |
93 | 93 | $this->getYem() |
94 | - ->triggerLogEvent('Yapeal.Log.log', Logger::NOTICE, $error->message); |
|
94 | + ->triggerLogEvent('Yapeal.Log.log', Logger::NOTICE, $error->message); |
|
95 | 95 | } |
96 | 96 | } |
97 | 97 | libxml_clear_errors(); |
@@ -91,35 +91,35 @@ |
||
91 | 91 | $event = null; |
92 | 92 | foreach ($eventNames as $eventName) { |
93 | 93 | $this->getYem() |
94 | - ->triggerLogEvent('Yapeal.Log.log', Logger::DEBUG, $this->getEmittingEventMessage($data, $eventName)); |
|
94 | + ->triggerLogEvent('Yapeal.Log.log', Logger::DEBUG, $this->getEmittingEventMessage($data, $eventName)); |
|
95 | 95 | $event = $this->getYem() |
96 | - ->triggerEveApiEvent($eventName, $data); |
|
96 | + ->triggerEveApiEvent($eventName, $data); |
|
97 | 97 | $data = $event->getData(); |
98 | 98 | if ($event->hasBeenHandled()) { |
99 | 99 | $this->getYem() |
100 | - ->triggerLogEvent( |
|
101 | - 'Yapeal.Log.log', |
|
102 | - Logger::INFO, |
|
103 | - $this->getWasHandledEventMessage($data, $eventName) |
|
104 | - ); |
|
100 | + ->triggerLogEvent( |
|
101 | + 'Yapeal.Log.log', |
|
102 | + Logger::INFO, |
|
103 | + $this->getWasHandledEventMessage($data, $eventName) |
|
104 | + ); |
|
105 | 105 | break; |
106 | 106 | } |
107 | 107 | if ($event->isSufficientlyHandled()) { |
108 | 108 | $this->getYem() |
109 | - ->triggerLogEvent( |
|
110 | - 'Yapeal.Log.log', |
|
111 | - Logger::INFO, |
|
112 | - $this->getSufficientlyHandledEventMessage($data, $eventName) |
|
113 | - ); |
|
109 | + ->triggerLogEvent( |
|
110 | + 'Yapeal.Log.log', |
|
111 | + Logger::INFO, |
|
112 | + $this->getSufficientlyHandledEventMessage($data, $eventName) |
|
113 | + ); |
|
114 | 114 | } |
115 | 115 | } |
116 | 116 | if (null === $event || !$event->isSufficientlyHandled()) { |
117 | 117 | $this->getYem() |
118 | - ->triggerLogEvent( |
|
119 | - 'Yapeal.Log.log', |
|
120 | - Logger::NOTICE, |
|
121 | - $this->getNonHandledEventMessage($data, $eventSuffix) |
|
122 | - ); |
|
118 | + ->triggerLogEvent( |
|
119 | + 'Yapeal.Log.log', |
|
120 | + Logger::NOTICE, |
|
121 | + $this->getNonHandledEventMessage($data, $eventSuffix) |
|
122 | + ); |
|
123 | 123 | return false; |
124 | 124 | } |
125 | 125 | return true; |
@@ -59,11 +59,11 @@ discard block |
||
59 | 59 | $this->setYem($yem); |
60 | 60 | $data = $event->getData(); |
61 | 61 | $this->getYem() |
62 | - ->triggerLogEvent( |
|
63 | - 'Yapeal.Log.log', |
|
64 | - Logger::DEBUG, |
|
65 | - $this->getReceivedEventMessage($data, $eventName, __CLASS__) |
|
66 | - ); |
|
62 | + ->triggerLogEvent( |
|
63 | + 'Yapeal.Log.log', |
|
64 | + Logger::DEBUG, |
|
65 | + $this->getReceivedEventMessage($data, $eventName, __CLASS__) |
|
66 | + ); |
|
67 | 67 | $simple = new \SimpleXMLElement($data->getEveApiXml()); |
68 | 68 | /** @noinspection PhpUndefinedFieldInspection */ |
69 | 69 | $errorText = (string)$simple->error[0]; |
@@ -102,6 +102,6 @@ discard block |
||
102 | 102 | $this->emitEvents($data, 'cache'); |
103 | 103 | $data->setEveApiName($apiName); |
104 | 104 | return $event->setData($data) |
105 | - ->setHandledSufficiently(); |
|
105 | + ->setHandledSufficiently(); |
|
106 | 106 | } |
107 | 107 | } |
@@ -77,25 +77,25 @@ discard block |
||
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 |
||
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; |
@@ -131,7 +131,7 @@ |
||
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 | /** |
@@ -118,7 +118,7 @@ |
||
118 | 118 | continue; |
119 | 119 | } |
120 | 120 | $fileList[] = $this->getFpn() |
121 | - ->normalizeFile($fileInfo->getPathname()); |
|
121 | + ->normalizeFile($fileInfo->getPathname()); |
|
122 | 122 | } |
123 | 123 | } |
124 | 124 | $fileNames = '%1$sCreateCustomTables.sql,%2$sconfig/CreateCustomTables.sql'; |
@@ -58,16 +58,16 @@ |
||
58 | 58 | protected function addOptions($help) |
59 | 59 | { |
60 | 60 | $this->addOption('configFile', 'c', InputOption::VALUE_REQUIRED, 'Configuration file to get settings from.') |
61 | - ->addOption('database', 'd', InputOption::VALUE_REQUIRED, 'Name of the database.') |
|
62 | - ->addOption('hostName', 'o', InputOption::VALUE_REQUIRED, 'Host name for database server.') |
|
63 | - ->addOption('password', 'p', InputOption::VALUE_REQUIRED, 'Password used to access database.') |
|
64 | - ->addOption('platform', null, InputOption::VALUE_REQUIRED, |
|
65 | - 'Platform of database driver. Currently only "mysql".') |
|
66 | - ->addOption('port', null, InputOption::VALUE_REQUIRED, |
|
67 | - 'Port number for remote server. Only needed if using http connection.') |
|
68 | - ->addOption('tablePrefix', 't', InputOption::VALUE_REQUIRED, 'Prefix for database table names.') |
|
69 | - ->addOption('userName', 'u', InputOption::VALUE_REQUIRED, 'User name used to access database.') |
|
70 | - ->setHelp($help); |
|
61 | + ->addOption('database', 'd', InputOption::VALUE_REQUIRED, 'Name of the database.') |
|
62 | + ->addOption('hostName', 'o', InputOption::VALUE_REQUIRED, 'Host name for database server.') |
|
63 | + ->addOption('password', 'p', InputOption::VALUE_REQUIRED, 'Password used to access database.') |
|
64 | + ->addOption('platform', null, InputOption::VALUE_REQUIRED, |
|
65 | + 'Platform of database driver. Currently only "mysql".') |
|
66 | + ->addOption('port', null, InputOption::VALUE_REQUIRED, |
|
67 | + 'Port number for remote server. Only needed if using http connection.') |
|
68 | + ->addOption('tablePrefix', 't', InputOption::VALUE_REQUIRED, 'Prefix for database table names.') |
|
69 | + ->addOption('userName', 'u', InputOption::VALUE_REQUIRED, 'User name used to access database.') |
|
70 | + ->setHelp($help); |
|
71 | 71 | } |
72 | 72 | /** @noinspection PhpMissingParentCallCommonInspection */ |
73 | 73 | /** |
@@ -88,8 +88,8 @@ discard block |
||
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 |
||
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 | /** |
@@ -123,7 +123,7 @@ discard block |
||
123 | 123 | $output->writeln($name); |
124 | 124 | $this->executeSqlStatements( |
125 | 125 | $this->getCsq() |
126 | - ->getDropAddOrModifyColumnProcedure(), |
|
126 | + ->getDropAddOrModifyColumnProcedure(), |
|
127 | 127 | $name, |
128 | 128 | $output |
129 | 129 | ); |
@@ -143,7 +143,7 @@ discard block |
||
143 | 143 | ->getUtilLatestDatabaseVersion(); |
144 | 144 | try { |
145 | 145 | $result = $this->getPdo() |
146 | - ->query($sql, PDO::FETCH_NUM); |
|
146 | + ->query($sql, PDO::FETCH_NUM); |
|
147 | 147 | $version = $result->fetchColumn(); |
148 | 148 | $result->closeCursor(); |
149 | 149 | } catch (PDOException $exc) { |
@@ -263,10 +263,10 @@ discard block |
||
263 | 263 | $updateVersion |
264 | 264 | ); |
265 | 265 | if ($this->getPdo() |
266 | - ->inTransaction() |
|
266 | + ->inTransaction() |
|
267 | 267 | ) { |
268 | 268 | $this->getPdo() |
269 | - ->rollBack(); |
|
269 | + ->rollBack(); |
|
270 | 270 | } |
271 | 271 | throw new YapealDatabaseException($mess, 2); |
272 | 272 | } |