| Conditions | 6 |
| Paths | 24 |
| Total Lines | 26 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 27 | public function getFinder($fast = true) |
||
| 28 | { |
||
| 29 | |||
| 30 | try { |
||
| 31 | if (!$this->finder) { |
||
| 32 | $this->finder = new Finder(); |
||
|
|
|||
| 33 | $this->finder->ignoreUnreadableDirs(); |
||
| 34 | if ($fast) { |
||
| 35 | if (file_exists($this->getTargetPath().'gitignore')) { |
||
| 36 | // excludes files/directories matching the .gitignore patterns |
||
| 37 | $this->finder->ignoreVCSIgnored(true); |
||
| 38 | } |
||
| 39 | } |
||
| 40 | // Ignorar Recursividade |
||
| 41 | $this->finder->depth('== 0'); |
||
| 42 | // Buscar Pastas e Arquivos |
||
| 43 | $this->finder->in($this->getTargetPath()); |
||
| 44 | } |
||
| 45 | } catch (\Symfony\Component\Finder\Exception\DirectoryNotFoundException $e) { |
||
| 46 | DebugHelper::warning('Diretório não existe: '. $e->getMessage()); |
||
| 47 | } catch (Exception $e) { |
||
| 48 | DebugHelper::warning('Exceção capturada: '. $e->getMessage()); |
||
| 49 | } |
||
| 50 | |||
| 51 | return $this->finder; |
||
| 52 | } |
||
| 53 | |||
| 54 | } |
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..