@@ -37,8 +37,8 @@ |
||
| 37 | 37 | public function __construct(string $source, string $name) |
| 38 | 38 | { |
| 39 | 39 | $this->setSourcePath($source) |
| 40 | - ->setName($name) |
|
| 41 | - ->loadContent(); |
|
| 40 | + ->setName($name) |
|
| 41 | + ->loadContent(); |
|
| 42 | 42 | } |
| 43 | 43 | |
| 44 | 44 | /** |
@@ -99,12 +99,12 @@ |
||
| 99 | 99 | return $this->templatePath; |
| 100 | 100 | } |
| 101 | 101 | |
| 102 | - /** |
|
| 103 | - * Retorna caminho baseado nas configurações de template |
|
| 104 | - * |
|
| 105 | - * @param string $file |
|
| 106 | - * @return string |
|
| 107 | - */ |
|
| 102 | + /** |
|
| 103 | + * Retorna caminho baseado nas configurações de template |
|
| 104 | + * |
|
| 105 | + * @param string $file |
|
| 106 | + * @return string |
|
| 107 | + */ |
|
| 108 | 108 | public function findByTemplate(string $template) : string |
| 109 | 109 | { |
| 110 | 110 | $folder = $this->finder->findByTemplate($template); |
@@ -5,7 +5,7 @@ |
||
| 5 | 5 | use Maestriam\FileSystem\Concerns\FluentGetter; |
| 6 | 6 | |
| 7 | 7 | class StructureDirectory |
| 8 | -{ |
|
| 8 | +{ |
|
| 9 | 9 | use FluentGetter; |
| 10 | 10 | |
| 11 | 11 | /** |
@@ -22,7 +22,8 @@ |
||
| 22 | 22 | |
| 23 | 23 | private function registerFacade() |
| 24 | 24 | { |
| 25 | - $this->app->bind('filesystem',function() { |
|
| 25 | + $this->app->bind('filesystem',function() |
|
| 26 | + { |
|
| 26 | 27 | return new FileSystem(); |
| 27 | 28 | }); |
| 28 | 29 | } |
@@ -3,7 +3,7 @@ |
||
| 3 | 3 | namespace Maestriam\FileSystem\Foundation\Drive; |
| 4 | 4 | |
| 5 | 5 | abstract class PathSanitizer |
| 6 | -{ |
|
| 6 | +{ |
|
| 7 | 7 | /** |
| 8 | 8 | * Ajusta uma string de caminho para |
| 9 | 9 | * |
@@ -8,7 +8,9 @@ |
||
| 8 | 8 | |
| 9 | 9 | static public function read(string $path, int $level) : array |
| 10 | 10 | { |
| 11 | - if (! is_dir($path)) return []; |
|
| 11 | + if (! is_dir($path)) { |
|
| 12 | + return []; |
|
| 13 | + } |
|
| 12 | 14 | |
| 13 | 15 | self::scan($path, 1, $level); |
| 14 | 16 | |
@@ -6,7 +6,7 @@ discard block |
||
| 6 | 6 | use Maestriam\FileSystem\Foundation\Drive\StructureDirectory; |
| 7 | 7 | |
| 8 | 8 | class PathFinder |
| 9 | -{ |
|
| 9 | +{ |
|
| 10 | 10 | private array $structureDirectory; |
| 11 | 11 | |
| 12 | 12 | /** |
@@ -89,8 +89,7 @@ discard block |
||
| 89 | 89 | { |
| 90 | 90 | $structure = $this->getStructureDirectory(); |
| 91 | 91 | |
| 92 | - foreach($structure as $key => $path) |
|
| 93 | - { |
|
| 92 | + foreach($structure as $key => $path) { |
|
| 94 | 93 | if ($key == '*') { |
| 95 | 94 | return $path; |
| 96 | 95 | } |
@@ -39,7 +39,7 @@ |
||
| 39 | 39 | |
| 40 | 40 | $files = array_diff(scandir($folder), array('.', '..')); |
| 41 | 41 | |
| 42 | - foreach ($files as $file) { |
|
| 42 | + foreach ($files as $file) { |
|
| 43 | 43 | |
| 44 | 44 | $item = "$folder/$file"; |
| 45 | 45 | |
@@ -45,11 +45,11 @@ |
||
| 45 | 45 | { |
| 46 | 46 | $items = array_diff(scandir($path), array('.', '..')); |
| 47 | 47 | |
| 48 | - foreach ($items as $item) { |
|
| 48 | + foreach ($items as $item) { |
|
| 49 | 49 | |
| 50 | 50 | $item = "$path/$item"; |
| 51 | 51 | |
| 52 | - if (is_dir($item)) { |
|
| 52 | + if (is_dir($item)) { |
|
| 53 | 53 | $this->scan($item, $pattern); |
| 54 | 54 | continue; |
| 55 | 55 | } |