11<?php
2+
23/**
34 * CodeIgniter
45 *
3839
3940namespace CodeIgniter \Filters ;
4041
41- use CodeIgniter \Config \BaseConfig ;
4242use CodeIgniter \Filters \Exceptions \FilterException ;
4343use CodeIgniter \HTTP \RequestInterface ;
4444use CodeIgniter \HTTP \ResponseInterface ;
@@ -63,7 +63,7 @@ class Filters
6363 /**
6464 * The original config file
6565 *
66- * @var BaseConfig
66+ * @var \Config\Filters
6767 */
6868 protected $ config ;
6969
@@ -101,14 +101,14 @@ class Filters
101101 /**
102102 * Constructor.
103103 *
104- * @param type $config
104+ * @param \Config\Filters $config
105105 * @param RequestInterface $request
106106 * @param ResponseInterface $response
107107 */
108108 public function __construct ($ config , RequestInterface $ request , ResponseInterface $ response )
109109 {
110110 $ this ->config = $ config ;
111- $ this ->request = & $ request ;
111+ $ this ->request = &$ request ;
112112 $ this ->setResponse ($ response );
113113 }
114114
@@ -119,7 +119,7 @@ public function __construct($config, RequestInterface $request, ResponseInterfac
119119 */
120120 public function setResponse (ResponseInterface $ response )
121121 {
122- $ this ->response = & $ response ;
122+ $ this ->response = &$ response ;
123123 }
124124
125125 //--------------------------------------------------------------------
@@ -337,6 +337,8 @@ public function enableFilter(string $name, string $when = 'before')
337337 /**
338338 * Returns the arguments for a specified key, or all.
339339 *
340+ * @param string|null $key
341+ *
340342 * @return mixed
341343 */
342344 public function getArguments (string $ key = null )
@@ -352,8 +354,9 @@ public function getArguments(string $key = null)
352354 /**
353355 * Add any applicable (not excluded) global filter settings to the mix.
354356 *
355- * @param string $uri
356- * @return type
357+ * @param string $uri
358+ *
359+ * @return void
357360 */
358361 protected function processGlobals (string $ uri = null )
359362 {
@@ -369,6 +372,7 @@ protected function processGlobals(string $uri = null)
369372 'before ' ,
370373 'after ' ,
371374 ];
375+
372376 foreach ($ sets as $ set )
373377 {
374378 if (isset ($ this ->config ->globals [$ set ]))
@@ -394,6 +398,7 @@ protected function processGlobals(string $uri = null)
394398 {
395399 $ alias = $ rules ; // simple name of filter to apply
396400 }
401+
397402 if ($ keep )
398403 {
399404 $ this ->filters [$ set ][] = $ alias ;
@@ -408,7 +413,7 @@ protected function processGlobals(string $uri = null)
408413 /**
409414 * Add any method-specific flters to the mix.
410415 *
411- * @return type
416+ * @return void
412417 */
413418 protected function processMethods ()
414419 {
@@ -432,8 +437,9 @@ protected function processMethods()
432437 /**
433438 * Add any applicable configured filters to the mix.
434439 *
435- * @param string $uri
436- * @return type
440+ * @param string $uri
441+ *
442+ * @return void
437443 */
438444 protected function processFilters (string $ uri = null )
439445 {
@@ -456,6 +462,7 @@ protected function processFilters(string $uri = null)
456462 $ this ->filters ['before ' ][] = $ alias ;
457463 }
458464 }
465+
459466 if (isset ($ settings ['after ' ]))
460467 {
461468 $ path = $ settings ['after ' ];
@@ -470,9 +477,10 @@ protected function processFilters(string $uri = null)
470477 /**
471478 * Check paths for match for URI
472479 *
473- * @param string $uri URI to test against
474- * @param mixed $paths The path patterns to test
475- * @return boolean True if any of the paths apply to the URI
480+ * @param string $uri URI to test against
481+ * @param mixed $paths The path patterns to test
482+ *
483+ * @return boolean True if any of the paths apply to the URI
476484 */
477485 private function pathApplies (string $ uri , $ paths )
478486 {
@@ -501,6 +509,7 @@ private function pathApplies(string $uri, $paths)
501509 return true ;
502510 }
503511 }
512+
504513 return false ;
505514 }
506515
0 commit comments