@@ -9,7 +9,7 @@ |
||
9 | 9 | |
10 | 10 | |
11 | 11 | // Create services and inject into the app. |
12 | -$di = new \Anax\DI\CDIFactoryDefault(); |
|
12 | +$di = new \Anax\DI\CDIFactoryDefault(); |
|
13 | 13 | |
14 | 14 | $di->set('RssController', function() use ($di) { |
15 | 15 | $controller = new \petlid\RSSReader\RSSReaderController("http://www.historytoday.com/feed/rss.xml"); |
@@ -1,7 +1,7 @@ |
||
1 | 1 | <div class="rss-feed"> |
2 | 2 | <ul> |
3 | 3 | |
4 | - <?php foreach($items as $key => $item) { |
|
4 | + <?php foreach ($items as $key => $item) { |
|
5 | 5 | echo "<li> |
6 | 6 | <a href={$item->get_link()}> |
7 | 7 | <div class='rss-item'> |
@@ -9,7 +9,7 @@ discard block |
||
9 | 9 | public static function loadClassLoader($class) |
10 | 10 | { |
11 | 11 | if ('Composer\Autoload\ClassLoader' === $class) { |
12 | - require __DIR__ . '/ClassLoader.php'; |
|
12 | + require __DIR__.'/ClassLoader.php'; |
|
13 | 13 | } |
14 | 14 | } |
15 | 15 | |
@@ -23,17 +23,17 @@ discard block |
||
23 | 23 | self::$loader = $loader = new \Composer\Autoload\ClassLoader(); |
24 | 24 | spl_autoload_unregister(array('ComposerAutoloaderInit62f39d7a932289837b43d6101406a178', 'loadClassLoader')); |
25 | 25 | |
26 | - $map = require __DIR__ . '/autoload_namespaces.php'; |
|
26 | + $map = require __DIR__.'/autoload_namespaces.php'; |
|
27 | 27 | foreach ($map as $namespace => $path) { |
28 | 28 | $loader->set($namespace, $path); |
29 | 29 | } |
30 | 30 | |
31 | - $map = require __DIR__ . '/autoload_psr4.php'; |
|
31 | + $map = require __DIR__.'/autoload_psr4.php'; |
|
32 | 32 | foreach ($map as $namespace => $path) { |
33 | 33 | $loader->setPsr4($namespace, $path); |
34 | 34 | } |
35 | 35 | |
36 | - $classMap = require __DIR__ . '/autoload_classmap.php'; |
|
36 | + $classMap = require __DIR__.'/autoload_classmap.php'; |
|
37 | 37 | if ($classMap) { |
38 | 38 | $loader->addClassMap($classMap); |
39 | 39 | } |
@@ -6,5 +6,5 @@ |
||
6 | 6 | $baseDir = dirname($vendorDir); |
7 | 7 | |
8 | 8 | return array( |
9 | - 'petlid\\' => array($baseDir . '/src'), |
|
9 | + 'petlid\\' => array($baseDir.'/src'), |
|
10 | 10 | ); |
@@ -123,20 +123,20 @@ discard block |
||
123 | 123 | return; |
124 | 124 | } |
125 | 125 | |
126 | - $first = $prefix[0]; |
|
127 | - if (!isset($this->prefixesPsr0[$first][$prefix])) { |
|
128 | - $this->prefixesPsr0[$first][$prefix] = (array) $paths; |
|
126 | + $first = $prefix[ 0 ]; |
|
127 | + if (!isset($this->prefixesPsr0[ $first ][ $prefix ])) { |
|
128 | + $this->prefixesPsr0[ $first ][ $prefix ] = (array) $paths; |
|
129 | 129 | |
130 | 130 | return; |
131 | 131 | } |
132 | 132 | if ($prepend) { |
133 | - $this->prefixesPsr0[$first][$prefix] = array_merge( |
|
133 | + $this->prefixesPsr0[ $first ][ $prefix ] = array_merge( |
|
134 | 134 | (array) $paths, |
135 | - $this->prefixesPsr0[$first][$prefix] |
|
135 | + $this->prefixesPsr0[ $first ][ $prefix ] |
|
136 | 136 | ); |
137 | 137 | } else { |
138 | - $this->prefixesPsr0[$first][$prefix] = array_merge( |
|
139 | - $this->prefixesPsr0[$first][$prefix], |
|
138 | + $this->prefixesPsr0[ $first ][ $prefix ] = array_merge( |
|
139 | + $this->prefixesPsr0[ $first ][ $prefix ], |
|
140 | 140 | (array) $paths |
141 | 141 | ); |
142 | 142 | } |
@@ -167,24 +167,24 @@ discard block |
||
167 | 167 | (array) $paths |
168 | 168 | ); |
169 | 169 | } |
170 | - } elseif (!isset($this->prefixDirsPsr4[$prefix])) { |
|
170 | + } elseif (!isset($this->prefixDirsPsr4[ $prefix ])) { |
|
171 | 171 | // Register directories for a new namespace. |
172 | 172 | $length = strlen($prefix); |
173 | - if ('\\' !== $prefix[$length - 1]) { |
|
173 | + if ('\\' !== $prefix[ $length - 1 ]) { |
|
174 | 174 | throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator."); |
175 | 175 | } |
176 | - $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length; |
|
177 | - $this->prefixDirsPsr4[$prefix] = (array) $paths; |
|
176 | + $this->prefixLengthsPsr4[ $prefix[ 0 ] ][ $prefix ] = $length; |
|
177 | + $this->prefixDirsPsr4[ $prefix ] = (array) $paths; |
|
178 | 178 | } elseif ($prepend) { |
179 | 179 | // Prepend directories for an already registered namespace. |
180 | - $this->prefixDirsPsr4[$prefix] = array_merge( |
|
180 | + $this->prefixDirsPsr4[ $prefix ] = array_merge( |
|
181 | 181 | (array) $paths, |
182 | - $this->prefixDirsPsr4[$prefix] |
|
182 | + $this->prefixDirsPsr4[ $prefix ] |
|
183 | 183 | ); |
184 | 184 | } else { |
185 | 185 | // Append directories for an already registered namespace. |
186 | - $this->prefixDirsPsr4[$prefix] = array_merge( |
|
187 | - $this->prefixDirsPsr4[$prefix], |
|
186 | + $this->prefixDirsPsr4[ $prefix ] = array_merge( |
|
187 | + $this->prefixDirsPsr4[ $prefix ], |
|
188 | 188 | (array) $paths |
189 | 189 | ); |
190 | 190 | } |
@@ -202,7 +202,7 @@ discard block |
||
202 | 202 | if (!$prefix) { |
203 | 203 | $this->fallbackDirsPsr0 = (array) $paths; |
204 | 204 | } else { |
205 | - $this->prefixesPsr0[$prefix[0]][$prefix] = (array) $paths; |
|
205 | + $this->prefixesPsr0[ $prefix[ 0 ] ][ $prefix ] = (array) $paths; |
|
206 | 206 | } |
207 | 207 | } |
208 | 208 | |
@@ -221,11 +221,11 @@ discard block |
||
221 | 221 | $this->fallbackDirsPsr4 = (array) $paths; |
222 | 222 | } else { |
223 | 223 | $length = strlen($prefix); |
224 | - if ('\\' !== $prefix[$length - 1]) { |
|
224 | + if ('\\' !== $prefix[ $length - 1 ]) { |
|
225 | 225 | throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator."); |
226 | 226 | } |
227 | - $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length; |
|
228 | - $this->prefixDirsPsr4[$prefix] = (array) $paths; |
|
227 | + $this->prefixLengthsPsr4[ $prefix[ 0 ] ][ $prefix ] = $length; |
|
228 | + $this->prefixDirsPsr4[ $prefix ] = (array) $paths; |
|
229 | 229 | } |
230 | 230 | } |
231 | 231 | |
@@ -314,13 +314,13 @@ discard block |
||
314 | 314 | public function findFile($class) |
315 | 315 | { |
316 | 316 | // work around for PHP 5.3.0 - 5.3.2 https://bugs.php.net/50731 |
317 | - if ('\\' == $class[0]) { |
|
317 | + if ('\\' == $class[ 0 ]) { |
|
318 | 318 | $class = substr($class, 1); |
319 | 319 | } |
320 | 320 | |
321 | 321 | // class map lookup |
322 | - if (isset($this->classMap[$class])) { |
|
323 | - return $this->classMap[$class]; |
|
322 | + if (isset($this->classMap[ $class ])) { |
|
323 | + return $this->classMap[ $class ]; |
|
324 | 324 | } |
325 | 325 | if ($this->classMapAuthoritative) { |
326 | 326 | return false; |
@@ -335,7 +335,7 @@ discard block |
||
335 | 335 | |
336 | 336 | if ($file === null) { |
337 | 337 | // Remember that this class does not exist. |
338 | - return $this->classMap[$class] = false; |
|
338 | + return $this->classMap[ $class ] = false; |
|
339 | 339 | } |
340 | 340 | |
341 | 341 | return $file; |
@@ -344,14 +344,14 @@ discard block |
||
344 | 344 | private function findFileWithExtension($class, $ext) |
345 | 345 | { |
346 | 346 | // PSR-4 lookup |
347 | - $logicalPathPsr4 = strtr($class, '\\', DIRECTORY_SEPARATOR) . $ext; |
|
347 | + $logicalPathPsr4 = strtr($class, '\\', DIRECTORY_SEPARATOR).$ext; |
|
348 | 348 | |
349 | - $first = $class[0]; |
|
350 | - if (isset($this->prefixLengthsPsr4[$first])) { |
|
351 | - foreach ($this->prefixLengthsPsr4[$first] as $prefix => $length) { |
|
349 | + $first = $class[ 0 ]; |
|
350 | + if (isset($this->prefixLengthsPsr4[ $first ])) { |
|
351 | + foreach ($this->prefixLengthsPsr4[ $first ] as $prefix => $length) { |
|
352 | 352 | if (0 === strpos($class, $prefix)) { |
353 | - foreach ($this->prefixDirsPsr4[$prefix] as $dir) { |
|
354 | - if (file_exists($file = $dir . DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $length))) { |
|
353 | + foreach ($this->prefixDirsPsr4[ $prefix ] as $dir) { |
|
354 | + if (file_exists($file = $dir.DIRECTORY_SEPARATOR.substr($logicalPathPsr4, $length))) { |
|
355 | 355 | return $file; |
356 | 356 | } |
357 | 357 | } |
@@ -361,7 +361,7 @@ discard block |
||
361 | 361 | |
362 | 362 | // PSR-4 fallback dirs |
363 | 363 | foreach ($this->fallbackDirsPsr4 as $dir) { |
364 | - if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr4)) { |
|
364 | + if (file_exists($file = $dir.DIRECTORY_SEPARATOR.$logicalPathPsr4)) { |
|
365 | 365 | return $file; |
366 | 366 | } |
367 | 367 | } |
@@ -373,14 +373,14 @@ discard block |
||
373 | 373 | . strtr(substr($logicalPathPsr4, $pos + 1), '_', DIRECTORY_SEPARATOR); |
374 | 374 | } else { |
375 | 375 | // PEAR-like class name |
376 | - $logicalPathPsr0 = strtr($class, '_', DIRECTORY_SEPARATOR) . $ext; |
|
376 | + $logicalPathPsr0 = strtr($class, '_', DIRECTORY_SEPARATOR).$ext; |
|
377 | 377 | } |
378 | 378 | |
379 | - if (isset($this->prefixesPsr0[$first])) { |
|
380 | - foreach ($this->prefixesPsr0[$first] as $prefix => $dirs) { |
|
379 | + if (isset($this->prefixesPsr0[ $first ])) { |
|
380 | + foreach ($this->prefixesPsr0[ $first ] as $prefix => $dirs) { |
|
381 | 381 | if (0 === strpos($class, $prefix)) { |
382 | 382 | foreach ($dirs as $dir) { |
383 | - if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) { |
|
383 | + if (file_exists($file = $dir.DIRECTORY_SEPARATOR.$logicalPathPsr0)) { |
|
384 | 384 | return $file; |
385 | 385 | } |
386 | 386 | } |
@@ -390,7 +390,7 @@ discard block |
||
390 | 390 | |
391 | 391 | // PSR-0 fallback dirs |
392 | 392 | foreach ($this->fallbackDirsPsr0 as $dir) { |
393 | - if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) { |
|
393 | + if (file_exists($file = $dir.DIRECTORY_SEPARATOR.$logicalPathPsr0)) { |
|
394 | 394 | return $file; |
395 | 395 | } |
396 | 396 | } |
@@ -2,6 +2,6 @@ |
||
2 | 2 | |
3 | 3 | // autoload.php @generated by Composer |
4 | 4 | |
5 | -require_once __DIR__ . '/composer' . '/autoload_real.php'; |
|
5 | +require_once __DIR__.'/composer'.'/autoload_real.php'; |
|
6 | 6 | |
7 | 7 | return ComposerAutoloaderInit62f39d7a932289837b43d6101406a178::getLoader(); |