100% of 59OPs |
100% of 7Lines |
83% of 6Branches |
100% of 3Paths |
Method | OPs | OPs % | Lines | Line % | Branches | Branches % | Paths | Path % |
---|---|---|---|---|---|---|---|---|
mageekguy\atoum\iterators\filters\recursives\dot::__construct() | 34 | 100% | 6 | 100% | 5 | 80% | 2 | 100% |
mageekguy\atoum\iterators\filters\recursives\dot::accept() | 25 | 100% | 1 | 100% | 1 | 100% | 1 | 100% |
# | |
---|---|
1 |
<?php |
2 |
|
3 |
namespace mageekguy\atoum\iterators\filters\recursives; |
4 |
|
5 |
class dot extends \recursiveFilterIterator |
6 |
{ |
7 |
public function __construct($mixed, \closure $iteratorFactory = null)100% |
8 |
{ |
9 |
if ($mixed instanceof \recursiveIterator) |
10 |
{ |
11 |
parent::__construct($mixed); |
12 |
} |
13 |
else |
14 |
{ |
15 |
parent::__construct(call_user_func($iteratorFactory ?: function($path) { return new \recursiveDirectoryIterator($path); }, (string) $mixed)); |
16 |
} |
17 |
} |
18 |
|
19 |
public function accept()100% |
20 |
{ |
21 |
return (substr($this->getInnerIterator()->current()->getBasename(), 0, 1) != '.'); |
22 |
} |
23 |
} |