-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
60738fa
commit f54c0cb
Showing
5 changed files
with
91 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
<?php | ||
|
||
namespace Haemanthus\CodeIgniter3IdeHelper\Readers; | ||
|
||
/** | ||
* Undocumented class | ||
*/ | ||
class CoreReader extends AbstractFileReader | ||
{ | ||
/** | ||
* Undocumented variable | ||
* | ||
* @var array | ||
*/ | ||
protected array $patterns = []; | ||
|
||
/** | ||
* Undocumented variable | ||
* | ||
* @var string $path | ||
*/ | ||
protected string $path = './application/core/'; | ||
|
||
/** | ||
* Undocumented function | ||
* | ||
* @param array $patterns | ||
* @return self | ||
*/ | ||
public function setPatterns(array $patterns): self | ||
{ | ||
$this->patterns = $patterns; | ||
|
||
return $this; | ||
} | ||
|
||
/** | ||
* Undocumented function | ||
* | ||
* @return array<\Symfony\Component\Finder\SplFileInfo> | ||
*/ | ||
public function getFiles(): array | ||
{ | ||
array_walk($this->patterns, function ($pattern) { | ||
$this->finder->path($pattern); | ||
}); | ||
|
||
$this->finder | ||
->files() | ||
->in($this->getFullPath()) | ||
->name('*.php'); | ||
|
||
return iterator_to_array($this->finder, false); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters