Photos   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 40
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 0
Metric Value
dl 0
loc 40
rs 10
c 0
b 0
f 0
wmc 2
lcom 0
cbo 2

1 Method

Rating   Name   Duplication   Size   Complexity  
A analyse() 0 34 2
1
<?php
2
namespace Finder\Spider\Finder;
3
4
use Finder\Logic\Output\AbstractOutput;
5
use Finder\Logic\Output\Filter\OutputFilterInterface;
6
use Finder\Logic\Output\TriggerableInterface;
7
8
use Symfony\Component\Finder\Finder;
9
use Finder\Contracts\Spider\Spider;
10
11
use Support\Helps\DebugHelper;
12
13
/**
14
 * Run all script analysers and outputs their result.
15
 */
16
class Photos extends Spider
17
{
18
19
    public function analyse()
20
    {
21
22
        $finder = new Finder();
23
        
24
        // Selecionando Diretorio
25
        $finder->in($this->getTargetPath());
26
27
28
        $finder->files()->name(
29
            ['*.jpg', '*.png']
30
        );
31
32
        // $finder->files()->contains('sierra');
33
34
        DebugHelper::info('Fotos encontradas: '.$finder->count());
35
36
37
        foreach ($finder as $file)
38
        {
39
40
41
    
42
            DebugHelper::info("Endereço Completo: ".$file->getRealPath());
43
            DebugHelper::info("Nome: ".$file->getRelativePathname());
44
45
            dd('PhotosFinderoi');
46
47
48
49
            
50
        }
51
        // dd($finder);
52
    }
53
54
55
}