Skip to content

Commit d6605f9

Browse files
committed
[Config] removed obsolete code
1 parent 98a1615 commit d6605f9

File tree

1 file changed

+1
-32
lines changed

1 file changed

+1
-32
lines changed

Loader/AnnotationDirectoryLoader.php

Lines changed: 1 addition & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public function load($path, $type = null)
3939
$collection = new RouteCollection();
4040
$collection->addResource(new DirectoryResource($dir, '/\.php$/'));
4141
$files = iterator_to_array(new \RecursiveIteratorIterator(
42-
new RecursiveCallbackFilterIterator(
42+
new \RecursiveCallbackFilterIterator(
4343
new \RecursiveDirectoryIterator($dir),
4444
function (\SplFileInfo $current) {
4545
return '.' !== substr($current->getBasename(), 0, 1);
@@ -87,34 +87,3 @@ public function supports($resource, $type = null)
8787
return is_dir($path) && (!$type || 'annotation' === $type);
8888
}
8989
}
90-
91-
/**
92-
* @internal To be removed as RecursiveCallbackFilterIterator is available since PHP 5.4
93-
*/
94-
class RecursiveCallbackFilterIterator extends \FilterIterator implements \RecursiveIterator
95-
{
96-
private $iterator;
97-
private $callback;
98-
99-
public function __construct(\RecursiveIterator $iterator, $callback)
100-
{
101-
$this->iterator = $iterator;
102-
$this->callback = $callback;
103-
parent::__construct($iterator);
104-
}
105-
106-
public function accept()
107-
{
108-
return call_user_func($this->callback, $this->current(), $this->key(), $this->iterator);
109-
}
110-
111-
public function hasChildren()
112-
{
113-
return $this->iterator->hasChildren();
114-
}
115-
116-
public function getChildren()
117-
{
118-
return new static($this->iterator->getChildren(), $this->callback);
119-
}
120-
}

0 commit comments

Comments
 (0)