Passed
Push — develop ( e37a4b...d665c0 )
by Schlaefer
38s
created

Phile/FilterIterator/ContentFileFilterIterator.php (1 issue)

Labels
Severity

Upgrade to new PHP Analysis Engine

These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more

1
<?php
2
/**
3
 * the filter class for content files
4
 */
5
namespace Phile\FilterIterator;
6
7
use Phile\Core\Registry;
8
9
/**
10
 * Class ContentFileFilterIterator
11
 *
12
 * @package Phile\FilterIterator
13
 */
14
class ContentFileFilterIterator extends \FilterIterator
15
{
16
    /**
17
     * method to decide if file is filterd or not
18
     * @return bool
19
     */
20 7
    public function accept()
21
    {
22
        /**
23
         * @var \SplFileInfo $this
24
        */
25 7
        $ext = Registry::get('Phile_Settings')['content_ext'];
26 7
        return (preg_match('/^[^\.]{1}.*' . $ext . '/', $this->getFilename()) > 0);
0 ignored issues
show
The method getFilename() does not seem to exist on object<Phile\FilterItera...tentFileFilterIterator>.

This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.

This is most likely a typographical error or the method has been renamed.

Loading history...
27
    }
28
}
29