@@ -48,7 +48,7 @@ |
||
48 | 48 | /** |
49 | 49 | * Constructor |
50 | 50 | * |
51 | - * @param ContainerInterface $container |
|
51 | + * @param \Aviat\Ion\Di\ContainerInterface $container |
|
52 | 52 | */ |
53 | 53 | public function __construct(ContainerInterface $container) |
54 | 54 | { |
@@ -1,4 +1,4 @@ |
||
1 | -<?php declare(strict_types=1); |
|
1 | +<?php declare(strict_types = 1); |
|
2 | 2 | /** |
3 | 3 | * Anime List Client |
4 | 4 | * |
@@ -175,7 +175,7 @@ |
||
175 | 175 | * Recursively create array structure based on xml structure |
176 | 176 | * |
177 | 177 | * @param array &$root A reference to the current array location |
178 | - * @param DOMNodeList $nodeList The current NodeList object |
|
178 | + * @param \DOMNodeList $nodeList The current NodeList object |
|
179 | 179 | * @return void |
180 | 180 | */ |
181 | 181 | private static function childNodesToArray(array &$root, DOMNodelist $nodeList) |
@@ -1,4 +1,4 @@ discard block |
||
1 | -<?php declare(strict_types=1); |
|
1 | +<?php declare(strict_types = 1); |
|
2 | 2 | /** |
3 | 3 | * Anime List Client |
4 | 4 | * |
@@ -184,7 +184,7 @@ discard block |
||
184 | 184 | for ($i = 0; $i < $length; $i++) |
185 | 185 | { |
186 | 186 | $el = $nodeList->item($i); |
187 | - $current =& $root[$el->nodeName]; |
|
187 | + $current = & $root[$el->nodeName]; |
|
188 | 188 | |
189 | 189 | // It's a top level element! |
190 | 190 | if (is_a($el->childNodes->item(0), 'DomText') || ( ! $el->hasChildNodes())) |
@@ -232,14 +232,14 @@ discard block |
||
232 | 232 | * @param array $data The data for the current node |
233 | 233 | * @return void |
234 | 234 | */ |
235 | - private static function arrayPropertiesToXmlNodes(DOMDocument &$dom, DOMNode &$parent, array $data) |
|
235 | + private static function arrayPropertiesToXmlNodes(DOMDocument & $dom, DOMNode & $parent, array $data) |
|
236 | 236 | { |
237 | - foreach($data as $key => $props) |
|
237 | + foreach ($data as $key => $props) |
|
238 | 238 | { |
239 | 239 | // 'Flatten' the array as you create the xml |
240 | 240 | if (is_numeric($key)) |
241 | 241 | { |
242 | - foreach($props as $key => $props) |
|
242 | + foreach ($props as $key => $props) |
|
243 | 243 | { |
244 | 244 | break; |
245 | 245 | } |
@@ -64,7 +64,7 @@ |
||
64 | 64 | /** |
65 | 65 | * Setup the Di container |
66 | 66 | * |
67 | - * @return Container |
|
67 | + * @return \Aviat\Ion\Di\ContainerInterface |
|
68 | 68 | */ |
69 | 69 | protected function setupContainer() |
70 | 70 | { |
@@ -1,4 +1,4 @@ discard block |
||
1 | -<?php declare(strict_types=1); |
|
1 | +<?php declare(strict_types = 1); |
|
2 | 2 | /** |
3 | 3 | * Anime List Client |
4 | 4 | * |
@@ -75,7 +75,7 @@ discard block |
||
75 | 75 | $config = AnimeClient::loadToml($CONF_DIR); |
76 | 76 | $config_array = array_merge($base_config, $config); |
77 | 77 | |
78 | - $di = function ($config_array) use ($APP_DIR) { |
|
78 | + $di = function($config_array) use ($APP_DIR) { |
|
79 | 79 | $container = new Container(); |
80 | 80 | |
81 | 81 | // ------------------------------------------------------------------------- |
@@ -50,7 +50,7 @@ |
||
50 | 50 | /** |
51 | 51 | * Set up the Util class |
52 | 52 | * |
53 | - * @param ContainerInterface $container |
|
53 | + * @param \Aviat\Ion\Di\ContainerInterface $container |
|
54 | 54 | */ |
55 | 55 | public function __construct(ContainerInterface $container) |
56 | 56 | { |
@@ -1,4 +1,4 @@ discard block |
||
1 | -<?php declare(strict_types=1); |
|
1 | +<?php declare(strict_types = 1); |
|
2 | 2 | /** |
3 | 3 | * Hummingbird Anime Client |
4 | 4 | * |
@@ -91,7 +91,7 @@ discard block |
||
91 | 91 | { |
92 | 92 | $url = $this->container->get('request') |
93 | 93 | ->getUri(); |
94 | - $page_segments = explode("/", (string) $url); |
|
94 | + $page_segments = explode("/", (string)$url); |
|
95 | 95 | |
96 | 96 | $intersect = array_intersect($page_segments, self::$form_pages); |
97 | 97 |
@@ -1,4 +1,4 @@ |
||
1 | -<?php declare(strict_types=1); |
|
1 | +<?php declare(strict_types = 1); |
|
2 | 2 | /** |
3 | 3 | * Anime List Client |
4 | 4 | * |
@@ -23,8 +23,7 @@ discard block |
||
23 | 23 | /** |
24 | 24 | * Model for handling requests dealing with the manga list |
25 | 25 | */ |
26 | -class Manga extends API |
|
27 | -{ |
|
26 | +class Manga extends API { |
|
28 | 27 | |
29 | 28 | const READING = 'Reading'; |
30 | 29 | const PLAN_TO_READ = 'Plan to Read'; |
@@ -160,12 +159,14 @@ discard block |
||
160 | 159 | self::COMPLETED => [], |
161 | 160 | ]; |
162 | 161 | |
163 | - foreach ($data as &$entry) { |
|
162 | + foreach ($data as &$entry) |
|
163 | + { |
|
164 | 164 | $key = $this->status_map[$entry['reading_status']]; |
165 | 165 | $output[$key][] = $entry; |
166 | 166 | } |
167 | 167 | |
168 | - foreach ($output as &$val) { |
|
168 | + foreach ($output as &$val) |
|
169 | + { |
|
169 | 170 | $this->sortByName($val, 'manga'); |
170 | 171 | } |
171 | 172 |
@@ -53,7 +53,8 @@ |
||
53 | 53 | * Anime constructor. |
54 | 54 | * @param ContainerInterface $container |
55 | 55 | */ |
56 | - public function __construct(ContainerInterface $container) { |
|
56 | + public function __construct(ContainerInterface $container) |
|
57 | + { |
|
57 | 58 | parent::__construct($container); |
58 | 59 | |
59 | 60 | $config = $container->get('config'); |
@@ -166,7 +166,7 @@ |
||
166 | 166 | * @param string|null $malId |
167 | 167 | * @return bool |
168 | 168 | */ |
169 | - public function deleteLibraryItem(string $id, string $malId = null): bool |
|
169 | + public function deleteLibraryItem(string $id, string $malId = NULL): bool |
|
170 | 170 | { |
171 | 171 | if ($this->useMALAPI && ! is_null($malId)) |
172 | 172 | { |
@@ -1,4 +1,4 @@ |
||
1 | -<?php declare(strict_types=1); |
|
1 | +<?php declare(strict_types = 1); |
|
2 | 2 | /** |
3 | 3 | * Anime List Client |
4 | 4 | * |
@@ -1,4 +1,4 @@ discard block |
||
1 | -<?php declare(strict_types=1); |
|
1 | +<?php declare(strict_types = 1); |
|
2 | 2 | /** |
3 | 3 | * Hummingbird Anime Client |
4 | 4 | * |
@@ -91,7 +91,7 @@ discard block |
||
91 | 91 | $this->setContainer($container); |
92 | 92 | $auraUrlGenerator = $container->get('aura-router')->getGenerator(); |
93 | 93 | $urlGenerator = $container->get('url-generator'); |
94 | - $this->cache = $container->get('cache'); |
|
94 | + $this->cache = $container->get('cache'); |
|
95 | 95 | $this->config = $container->get('config'); |
96 | 96 | $this->request = $container->get('request'); |
97 | 97 | $this->response = $container->get('response'); |
@@ -48,7 +48,7 @@ |
||
48 | 48 | /** |
49 | 49 | * Constructor |
50 | 50 | * |
51 | - * @param ContainerInterface $container |
|
51 | + * @param \Aviat\Ion\Di\ContainerInterface $container |
|
52 | 52 | */ |
53 | 53 | public function __construct(ContainerInterface $container) |
54 | 54 | { |
@@ -1,4 +1,4 @@ discard block |
||
1 | -<?php declare(strict_types=1); |
|
1 | +<?php declare(strict_types = 1); |
|
2 | 2 | /** |
3 | 3 | * Hummingbird Anime Client |
4 | 4 | * |
@@ -52,7 +52,7 @@ discard block |
||
52 | 52 | |
53 | 53 | if ($key === 'config') |
54 | 54 | { |
55 | - foreach($config as $name => $value) |
|
55 | + foreach ($config as $name => $value) |
|
56 | 56 | { |
57 | 57 | $output[$name] = $value; |
58 | 58 | } |
@@ -1,4 +1,4 @@ discard block |
||
1 | -<?php declare(strict_types=1); |
|
1 | +<?php declare(strict_types = 1); |
|
2 | 2 | /** |
3 | 3 | * Anime List Client |
4 | 4 | * |
@@ -87,7 +87,7 @@ discard block |
||
87 | 87 | ]; |
88 | 88 | |
89 | 89 | $data = ($status !== 'all') |
90 | - ? [$map[$status] => $this->model->getList($map[$status]) ] |
|
90 | + ? [$map[$status] => $this->model->getList($map[$status])] |
|
91 | 91 | : $this->model->getList('All'); |
92 | 92 | |
93 | 93 | $this->outputHTML('manga/' . $view_map[$view], [ |