@@ -49,12 +49,12 @@ discard block |
||
49 | 49 | public function wire(ContainerInterface $dic) |
50 | 50 | { |
51 | 51 | if (empty($dic['Yapeal.Log.Strategy'])) { |
52 | - $dic['Yapeal.Log.Strategy'] = function () use ($dic) { |
|
52 | + $dic['Yapeal.Log.Strategy'] = function() use ($dic) { |
|
53 | 53 | return new $dic['Yapeal.Log.Handlers.strategy']((int)$dic['Yapeal.Log.threshold']); |
54 | 54 | }; |
55 | 55 | } |
56 | 56 | if (empty($dic['Yapeal.Log.Logger'])) { |
57 | - $dic['Yapeal.Log.Logger'] = function () use ($dic) { |
|
57 | + $dic['Yapeal.Log.Logger'] = function() use ($dic) { |
|
58 | 58 | $group = []; |
59 | 59 | $lineFormatter = new LineFormatter(null, 'Ymd His.u', true, true); |
60 | 60 | $lineFormatter->includeStacktraces(); |
@@ -66,7 +66,7 @@ discard block |
||
66 | 66 | $handler->setFormatter($lineFormatter); |
67 | 67 | $group[] = $handler; |
68 | 68 | } |
69 | - $handler = new $dic['Yapeal.Log.Handlers.stream']($dic['Yapeal.Log.dir'] . $dic['Yapeal.Log.fileName'], |
|
69 | + $handler = new $dic['Yapeal.Log.Handlers.stream']($dic['Yapeal.Log.dir'].$dic['Yapeal.Log.fileName'], |
|
70 | 70 | 100); |
71 | 71 | $group[] = $handler->setFormatter($lineFormatter); |
72 | 72 | return new $dic['Yapeal.Log.Handlers.class']($dic['Yapeal.Log.channel'], [ |
@@ -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 |
@@ -110,7 +110,7 @@ discard block |
||
110 | 110 | } |
111 | 111 | $arguments = $data->getEveApiArguments(); |
112 | 112 | if (!empty($arguments['vCode'])) { |
113 | - $arguments['vCode'] = substr($arguments['vCode'], 0, 8) . '...'; |
|
113 | + $arguments['vCode'] = substr($arguments['vCode'], 0, 8).'...'; |
|
114 | 114 | } |
115 | 115 | if (!in_array($data->getEveApiName(), ['accountBalance', 'walletJournal', 'walletTransactions'], true)) { |
116 | 116 | unset($arguments['accountKey']); |
@@ -120,8 +120,8 @@ discard block |
||
120 | 120 | $json = json_encode($arguments); |
121 | 121 | $xml = str_replace(["encoding='UTF-8'?>\r\n<eveapi", "encoding='UTF-8'?>\n<eveapi"], |
122 | 122 | [ |
123 | - "encoding='UTF-8'?>\r\n<?yapeal.parameters.json " . $json . "?>\r\n<eveapi", |
|
124 | - "encoding='UTF-8'?>\n<?yapeal.parameters.json " . $json . "?>\n<eveapi" |
|
123 | + "encoding='UTF-8'?>\r\n<?yapeal.parameters.json ".$json."?>\r\n<eveapi", |
|
124 | + "encoding='UTF-8'?>\n<?yapeal.parameters.json ".$json."?>\n<eveapi" |
|
125 | 125 | ], |
126 | 126 | $xml); |
127 | 127 | $data->setEveApiXml($xml); |
@@ -168,7 +168,7 @@ discard block |
||
168 | 168 | } |
169 | 169 | } |
170 | 170 | $apiName = $data->getEveApiName(); |
171 | - $data->setEveApiName('Untransformed_' . $apiName); |
|
171 | + $data->setEveApiName('Untransformed_'.$apiName); |
|
172 | 172 | // Cache error causing XML. |
173 | 173 | $this->emitEvents($data, 'preserve', 'Yapeal.Xml.Error'); |
174 | 174 | $data->setEveApiName($apiName); |
@@ -52,7 +52,7 @@ discard block |
||
52 | 52 | */ |
53 | 53 | public function __construct($dir = __DIR__) |
54 | 54 | { |
55 | - $this->setRelativeBaseDir($dir . '/'); |
|
55 | + $this->setRelativeBaseDir($dir.'/'); |
|
56 | 56 | } |
57 | 57 | /** |
58 | 58 | * @param EveApiEventInterface $event |
@@ -76,7 +76,7 @@ discard block |
||
76 | 76 | $mess = 'Received HTML result from '; |
77 | 77 | $yem->triggerLogEvent('Yapeal.Log.log', Logger::NOTICE, $this->createEveApiMessage($mess, $data)); |
78 | 78 | $apiName = $data->getEveApiName(); |
79 | - $data->setEveApiName('Invalid_' . $apiName); |
|
79 | + $data->setEveApiName('Invalid_'.$apiName); |
|
80 | 80 | // Cache error html. |
81 | 81 | $this->emitEvents($data, 'preserve', 'Yapeal.Xml.Error'); |
82 | 82 | $data->setEveApiName($apiName); |
@@ -106,7 +106,7 @@ discard block |
||
106 | 106 | libxml_use_internal_errors(false); |
107 | 107 | libxml_clear_errors(); |
108 | 108 | $apiName = $data->getEveApiName(); |
109 | - $data->setEveApiName('Invalid_' . $apiName); |
|
109 | + $data->setEveApiName('Invalid_'.$apiName); |
|
110 | 110 | // Cache error causing XML. |
111 | 111 | $this->emitEvents($data, 'preserve', 'Yapeal.Xml.Error'); |
112 | 112 | $data->setEveApiName($apiName); |
@@ -49,13 +49,13 @@ |
||
49 | 49 | public function wire(ContainerInterface $dic) |
50 | 50 | { |
51 | 51 | if (empty($dic['Yapeal.FileSystem.CachePreserver'])) { |
52 | - $dic['Yapeal.FileSystem.CachePreserver'] = function () use ($dic) { |
|
52 | + $dic['Yapeal.FileSystem.CachePreserver'] = function() use ($dic) { |
|
53 | 53 | return new $dic['Yapeal.FileSystem.Handlers.preserve']($dic['Yapeal.FileSystem.Cache.dir'], |
54 | 54 | $dic['Yapeal.FileSystem.Cache.preserve']); |
55 | 55 | }; |
56 | 56 | } |
57 | 57 | if (empty($dic['Yapeal.FileSystem.CacheRetriever'])) { |
58 | - $dic['Yapeal.FileSystem.CacheRetriever'] = function () use ($dic) { |
|
58 | + $dic['Yapeal.FileSystem.CacheRetriever'] = function() use ($dic) { |
|
59 | 59 | return new $dic['Yapeal.FileSystem.Handlers.retrieve']($dic['Yapeal.FileSystem.Cache.dir'], |
60 | 60 | $dic['Yapeal.FileSystem.Cache.retrieve']); |
61 | 61 | }; |
@@ -103,10 +103,10 @@ discard block |
||
103 | 103 | public function setCachePath($value = null) |
104 | 104 | { |
105 | 105 | if ($value === null) { |
106 | - $value = dirname(dirname(__DIR__)) . '/cache/'; |
|
106 | + $value = dirname(dirname(__DIR__)).'/cache/'; |
|
107 | 107 | } |
108 | 108 | if (!is_string($value)) { |
109 | - $mess = 'Cache path MUST be string, but was given ' . gettype($value); |
|
109 | + $mess = 'Cache path MUST be string, but was given '.gettype($value); |
|
110 | 110 | throw new \InvalidArgumentException($mess); |
111 | 111 | } |
112 | 112 | $this->cachePath = $this->getFpn() |
@@ -169,8 +169,8 @@ discard block |
||
169 | 169 | return true; |
170 | 170 | } |
171 | 171 | $now = time(); |
172 | - $current = strtotime($current . '+00:00'); |
|
173 | - $until = strtotime($until . '+00:00'); |
|
172 | + $current = strtotime($current.'+00:00'); |
|
173 | + $until = strtotime($until.'+00:00'); |
|
174 | 174 | // At minimum use cached XML for 5 minutes (300 secs). |
175 | 175 | if (($now - $current) <= 300) { |
176 | 176 | return false; |
@@ -49,7 +49,7 @@ discard block |
||
49 | 49 | public function wire(ContainerInterface $dic) |
50 | 50 | { |
51 | 51 | if (empty($dic['Yapeal.Network.Client'])) { |
52 | - $dic['Yapeal.Network.Client'] = function ($dic) { |
|
52 | + $dic['Yapeal.Network.Client'] = function($dic) { |
|
53 | 53 | $appComment = $dic['Yapeal.Network.appComment']; |
54 | 54 | $appName = $dic['Yapeal.Network.appName']; |
55 | 55 | $appVersion = $dic['Yapeal.Network.appVersion']; |
@@ -79,7 +79,7 @@ discard block |
||
79 | 79 | ]; |
80 | 80 | // Clean up any extra spaces and EOL chars from Yaml. |
81 | 81 | array_walk($headers, |
82 | - function (&$value) { |
|
82 | + function(&$value) { |
|
83 | 83 | $value = trim(str_replace(' ', '', (string)$value)); |
84 | 84 | }); |
85 | 85 | if ('' !== $userAgent) { |
@@ -96,7 +96,7 @@ discard block |
||
96 | 96 | }; |
97 | 97 | } |
98 | 98 | if (empty($dic['Yapeal.Network.Retriever'])) { |
99 | - $dic['Yapeal.Network.Retriever'] = function ($dic) { |
|
99 | + $dic['Yapeal.Network.Retriever'] = function($dic) { |
|
100 | 100 | return new $dic['Yapeal.Network.Handlers.retrieve']($dic['Yapeal.Network.Client'], |
101 | 101 | $dic['Yapeal.Network.Cache:retrieve']); |
102 | 102 | }; |
@@ -87,7 +87,7 @@ |
||
87 | 87 | throw new \InvalidArgumentException('Extension service definition is not a Closure or invokable object.'); |
88 | 88 | } |
89 | 89 | $factory = $this->values[$id]; |
90 | - $extended = function ($c) use ($callable, $factory) { |
|
90 | + $extended = function($c) use ($callable, $factory) { |
|
91 | 91 | return $callable($factory($c), $c); |
92 | 92 | }; |
93 | 93 | if (isset($this->factories[$factory])) { |
@@ -67,8 +67,8 @@ discard block |
||
67 | 67 | basename(dirname($listener)), |
68 | 68 | basename($listener, '.php')); |
69 | 69 | if (empty($dic[$service])) { |
70 | - $dic[$service] = function () use ($dic, $service) { |
|
71 | - $class = '\\' . str_replace('.', '\\', $service); |
|
70 | + $dic[$service] = function() use ($dic, $service) { |
|
71 | + $class = '\\'.str_replace('.', '\\', $service); |
|
72 | 72 | /** |
73 | 73 | * @var \Yapeal\CommonToolsInterface $callable |
74 | 74 | */ |
@@ -84,9 +84,9 @@ discard block |
||
84 | 84 | return $callable; |
85 | 85 | }; |
86 | 86 | } |
87 | - $mediator->addServiceListener($service . '.start', [$service, 'startEveApi'], 'last'); |
|
87 | + $mediator->addServiceListener($service.'.start', [$service, 'startEveApi'], 'last'); |
|
88 | 88 | if (false === strpos($listener, 'Section')) { |
89 | - $mediator->addServiceListener($service . '.preserve', [$service, 'preserveEveApi'], 'last'); |
|
89 | + $mediator->addServiceListener($service.'.preserve', [$service, 'preserveEveApi'], 'last'); |
|
90 | 90 | } |
91 | 91 | } |
92 | 92 | } |
@@ -107,7 +107,7 @@ discard block |
||
107 | 107 | $rdi->setFlags($flags); |
108 | 108 | /** @noinspection SpellCheckingInspection */ |
109 | 109 | $rcfi = new \RecursiveCallbackFilterIterator($rdi, |
110 | - function (\SplFileInfo $current, $key, \RecursiveDirectoryIterator $rdi) { |
|
110 | + function(\SplFileInfo $current, $key, \RecursiveDirectoryIterator $rdi) { |
|
111 | 111 | if ($rdi->hasChildren()) { |
112 | 112 | return true; |
113 | 113 | } |
@@ -134,15 +134,15 @@ discard block |
||
134 | 134 | private function wireCreator(ContainerInterface $dic, MediatorInterface $mediator) |
135 | 135 | { |
136 | 136 | if (empty($dic['Yapeal.EveApi.Creator'])) { |
137 | - $dic['Yapeal.EveApi.Creator'] = function () use ($dic) { |
|
137 | + $dic['Yapeal.EveApi.Creator'] = function() use ($dic) { |
|
138 | 138 | $loader = new \Twig_Loader_Filesystem($dic['Yapeal.EveApi.dir']); |
139 | 139 | $twig = new \Twig_Environment($loader, |
140 | 140 | ['debug' => true, 'strict_variables' => true, 'autoescape' => false]); |
141 | - $filter = new \Twig_SimpleFilter('ucFirst', function ($value) { |
|
141 | + $filter = new \Twig_SimpleFilter('ucFirst', function($value) { |
|
142 | 142 | return ucfirst($value); |
143 | 143 | }); |
144 | 144 | $twig->addFilter($filter); |
145 | - $filter = new \Twig_SimpleFilter('lcFirst', function ($value) { |
|
145 | + $filter = new \Twig_SimpleFilter('lcFirst', function($value) { |
|
146 | 146 | return lcfirst($value); |
147 | 147 | }); |
148 | 148 | $twig->addFilter($filter); |
@@ -50,15 +50,15 @@ discard block |
||
50 | 50 | public function wire(ContainerInterface $dic) |
51 | 51 | { |
52 | 52 | if (empty($dic['Yapeal.Xsd.Creator'])) { |
53 | - $dic['Yapeal.Xsd.Creator'] = function () use ($dic) { |
|
53 | + $dic['Yapeal.Xsd.Creator'] = function() use ($dic) { |
|
54 | 54 | $loader = new \Twig_Loader_Filesystem($dic['Yapeal.Xsd.dir']); |
55 | 55 | $twig = new \Twig_Environment($loader, |
56 | 56 | ['debug' => true, 'strict_variables' => true, 'autoescape' => false]); |
57 | - $filter = new \Twig_SimpleFilter('ucFirst', function ($value) { |
|
57 | + $filter = new \Twig_SimpleFilter('ucFirst', function($value) { |
|
58 | 58 | return ucfirst($value); |
59 | 59 | }); |
60 | 60 | $twig->addFilter($filter); |
61 | - $filter = new \Twig_SimpleFilter('lcFirst', function ($value) { |
|
61 | + $filter = new \Twig_SimpleFilter('lcFirst', function($value) { |
|
62 | 62 | return lcfirst($value); |
63 | 63 | }); |
64 | 64 | $twig->addFilter($filter); |
@@ -73,7 +73,7 @@ discard block |
||
73 | 73 | }; |
74 | 74 | } |
75 | 75 | if (empty($dic['Yapeal.Xsd.Validator'])) { |
76 | - $dic['Yapeal.Xsd.Validator'] = function () use ($dic) { |
|
76 | + $dic['Yapeal.Xsd.Validator'] = function() use ($dic) { |
|
77 | 77 | return new $dic['Yapeal.Xsd.Handlers.validate']($dic['Yapeal.Xsd.dir']); |
78 | 78 | }; |
79 | 79 | } |