@@ -130,7 +130,7 @@ |
||
| 130 | 130 | * @param array $columnDefaults |
| 131 | 131 | * @param \SimpleXMLElement[] $rows |
| 132 | 132 | * |
| 133 | - * @return array |
|
| 133 | + * @return string[] |
|
| 134 | 134 | */ |
| 135 | 135 | protected function processXmlRows(array $columnDefaults, array $rows) |
| 136 | 136 | { |
@@ -48,7 +48,7 @@ discard block |
||
| 48 | 48 | */ |
| 49 | 49 | public function getPreserveTos() |
| 50 | 50 | { |
| 51 | - if (0 === count($this->preserveTos)){ |
|
| 51 | + if (0 === count($this->preserveTos)) { |
|
| 52 | 52 | $mess = 'Tried to access preserveTos before it was set'; |
| 53 | 53 | throw new \LogicException($mess); |
| 54 | 54 | } |
@@ -105,7 +105,7 @@ discard block |
||
| 105 | 105 | ->triggerLogEvent('Yapeal.Log.log', Logger::INFO, $mess); |
| 106 | 106 | $mess = implode(',', $columns); |
| 107 | 107 | if (512 < strlen($mess)) { |
| 108 | - $mess = substr($mess, 0, 512) . '...'; |
|
| 108 | + $mess = substr($mess, 0, 512).'...'; |
|
| 109 | 109 | } |
| 110 | 110 | $this->getYem() |
| 111 | 111 | ->triggerLogEvent('Yapeal.Log.log', Logger::DEBUG, $mess); |
@@ -53,7 +53,7 @@ discard block |
||
| 53 | 53 | if (!empty($dic['Yapeal.Error.Logger'])) { |
| 54 | 54 | return $this; |
| 55 | 55 | } |
| 56 | - $dic['Yapeal.Error.Logger'] = function ($dic) { |
|
| 56 | + $dic['Yapeal.Error.Logger'] = function($dic) { |
|
| 57 | 57 | /** |
| 58 | 58 | * @var Logger $logger |
| 59 | 59 | */ |
@@ -69,7 +69,7 @@ discard block |
||
| 69 | 69 | $handler = new $dic['Yapeal.Error.Handlers.stream']('php://stderr', 100); |
| 70 | 70 | $group[] = $handler->setFormatter($lineFormatter); |
| 71 | 71 | } |
| 72 | - $handler = new $dic['Yapeal.Error.Handlers.stream']($dic['Yapeal.Error.dir'] . $dic['Yapeal.Error.fileName'], |
|
| 72 | + $handler = new $dic['Yapeal.Error.Handlers.stream']($dic['Yapeal.Error.dir'].$dic['Yapeal.Error.fileName'], |
|
| 73 | 73 | 100); |
| 74 | 74 | $group[] = $handler->setFormatter($lineFormatter); |
| 75 | 75 | $logger->pushHandler( |
@@ -117,7 +117,7 @@ discard block |
||
| 117 | 117 | */ |
| 118 | 118 | $statements = str_replace(array_keys($replacements), array_values($replacements), explode(';', $sqlStatements)); |
| 119 | 119 | // 5 is a 'magic' number that I think is shorter than any legal SQL statement. |
| 120 | - $statements = array_filter($statements, function ($value) { |
|
| 120 | + $statements = array_filter($statements, function($value) { |
|
| 121 | 121 | return 5 <= strlen(trim($value)); |
| 122 | 122 | }); |
| 123 | 123 | $progress = null; |
@@ -145,7 +145,7 @@ discard block |
||
| 145 | 145 | $progress->finish(); |
| 146 | 146 | $output->writeln(''); |
| 147 | 147 | } |
| 148 | - $mess = $sql . PHP_EOL; |
|
| 148 | + $mess = $sql.PHP_EOL; |
|
| 149 | 149 | $mess .= sprintf( |
| 150 | 150 | 'Sql failed in %1$s on statement %2$s with (%3$s) %4$s', |
| 151 | 151 | $fileName, |
@@ -173,7 +173,7 @@ discard block |
||
| 173 | 173 | $base = 'Yapeal.Sql.'; |
| 174 | 174 | foreach (['class', 'database', 'hostName', 'password', 'platform', 'tablePrefix', 'userName'] as $option) { |
| 175 | 175 | if (!empty($options[$option])) { |
| 176 | - $this->getDic()[$base . $option] = $options[$option]; |
|
| 176 | + $this->getDic()[$base.$option] = $options[$option]; |
|
| 177 | 177 | } |
| 178 | 178 | } |
| 179 | 179 | if (!empty($options['configFile'])) { |
@@ -106,9 +106,9 @@ |
||
| 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 | - foreach (new \DirectoryIterator($path . $dir . '/') as $fileInfo) { |
|
| 111 | + foreach (new \DirectoryIterator($path.$dir.'/') as $fileInfo) { |
|
| 112 | 112 | // Add file path if it's a sql create file. |
| 113 | 113 | if ($fileInfo->isFile() |
| 114 | 114 | && 'sql' === $fileInfo->getExtension() |
@@ -167,7 +167,7 @@ discard block |
||
| 167 | 167 | ->triggerLogEvent('Yapeal.Log.log', Logger::WARNING, $this->createEveApiMessage($mess, $data)); |
| 168 | 168 | return false; |
| 169 | 169 | } |
| 170 | - if (strtotime($expires[0]['expires'] . '+00:00') < time()) { |
|
| 170 | + if (strtotime($expires[0]['expires'].'+00:00') < time()) { |
|
| 171 | 171 | $mess = 'Expired UtilCachedUntil record found for'; |
| 172 | 172 | $this->getYem() |
| 173 | 173 | ->triggerLogEvent('Yapeal.Log.log', Logger::DEBUG, $this->createEveApiMessage($mess, $data)); |
@@ -267,7 +267,7 @@ discard block |
||
| 267 | 267 | } |
| 268 | 268 | $dateTime = gmdate( |
| 269 | 269 | 'Y-m-d H:i:s', |
| 270 | - strtotime($currentTime . '+00:00') + $data->getCacheInterval() |
|
| 270 | + strtotime($currentTime.'+00:00') + $data->getCacheInterval() |
|
| 271 | 271 | ); |
| 272 | 272 | $row = [ |
| 273 | 273 | $data->getEveApiName(), |
@@ -53,7 +53,7 @@ discard block |
||
| 53 | 53 | */ |
| 54 | 54 | public function __construct($dir = __DIR__) |
| 55 | 55 | { |
| 56 | - $this->setRelativeBaseDir($dir . '/'); |
|
| 56 | + $this->setRelativeBaseDir($dir.'/'); |
|
| 57 | 57 | } |
| 58 | 58 | /** |
| 59 | 59 | * @param EveApiEventInterface $event |
@@ -97,7 +97,7 @@ discard block |
||
| 97 | 97 | libxml_clear_errors(); |
| 98 | 98 | libxml_use_internal_errors($oldErrors); |
| 99 | 99 | $apiName = $data->getEveApiName(); |
| 100 | - $data->setEveApiName('Invalid_' . $apiName); |
|
| 100 | + $data->setEveApiName('Invalid_'.$apiName); |
|
| 101 | 101 | // Cache error XML. |
| 102 | 102 | $this->emitEvents($data, 'cache'); |
| 103 | 103 | $data->setEveApiName($apiName); |
@@ -57,7 +57,7 @@ discard block |
||
| 57 | 57 | return $this; |
| 58 | 58 | } |
| 59 | 59 | if (!is_string($name)) { |
| 60 | - $mess = 'Name MUST be string but was given ' . gettype($name); |
|
| 60 | + $mess = 'Name MUST be string but was given '.gettype($name); |
|
| 61 | 61 | throw new InvalidArgumentException($mess); |
| 62 | 62 | } |
| 63 | 63 | $this->eveApiArguments[$name] = (string)$value; |
@@ -89,7 +89,7 @@ discard block |
||
| 89 | 89 | { |
| 90 | 90 | $name = (string)$name; |
| 91 | 91 | if (!array_key_exists($name, $this->eveApiArguments)) { |
| 92 | - $mess = 'Unknown argument ' . $name; |
|
| 92 | + $mess = 'Unknown argument '.$name; |
|
| 93 | 93 | throw new DomainException($mess); |
| 94 | 94 | } |
| 95 | 95 | return $this->eveApiArguments[$name]; |
@@ -151,14 +151,14 @@ discard block |
||
| 151 | 151 | */ |
| 152 | 152 | public function getHash() |
| 153 | 153 | { |
| 154 | - $hash = $this->getEveApiName() . $this->getEveApiSectionName(); |
|
| 154 | + $hash = $this->getEveApiName().$this->getEveApiSectionName(); |
|
| 155 | 155 | $arguments = $this->getEveApiArguments(); |
| 156 | 156 | ksort($arguments); |
| 157 | 157 | foreach ($arguments as $key => $value) { |
| 158 | 158 | if ('mask' === $key) { |
| 159 | 159 | continue; |
| 160 | 160 | } |
| 161 | - $hash .= $key . $value; |
|
| 161 | + $hash .= $key.$value; |
|
| 162 | 162 | } |
| 163 | 163 | return hash('md5', $hash); |
| 164 | 164 | } |
@@ -228,7 +228,7 @@ discard block |
||
| 228 | 228 | public function setEveApiName($value) |
| 229 | 229 | { |
| 230 | 230 | if (!is_string($value)) { |
| 231 | - $mess = 'Name MUST be string but was given ' . gettype($value); |
|
| 231 | + $mess = 'Name MUST be string but was given '.gettype($value); |
|
| 232 | 232 | throw new InvalidArgumentException($mess); |
| 233 | 233 | } |
| 234 | 234 | $this->eveApiName = $value; |
@@ -245,7 +245,7 @@ discard block |
||
| 245 | 245 | public function setEveApiSectionName($value) |
| 246 | 246 | { |
| 247 | 247 | if (!is_string($value)) { |
| 248 | - $mess = 'Section name MUST be string but was given ' . gettype($value); |
|
| 248 | + $mess = 'Section name MUST be string but was given '.gettype($value); |
|
| 249 | 249 | throw new InvalidArgumentException($mess); |
| 250 | 250 | } |
| 251 | 251 | $this->eveApiSectionName = $value; |
@@ -265,7 +265,7 @@ discard block |
||
| 265 | 265 | $xml = ''; |
| 266 | 266 | } |
| 267 | 267 | if (!is_string($xml)) { |
| 268 | - $mess = 'Xml MUST be string but was given ' . gettype($xml); |
|
| 268 | + $mess = 'Xml MUST be string but was given '.gettype($xml); |
|
| 269 | 269 | throw new InvalidArgumentException($mess); |
| 270 | 270 | } |
| 271 | 271 | $this->eveApiXml = $xml; |