@@ -53,6 +53,9 @@ discard block |
||
| 53 | 53 | return $attributes; |
| 54 | 54 | } |
| 55 | 55 | |
| 56 | + /** |
|
| 57 | + * @return string |
|
| 58 | + */ |
|
| 56 | 59 | public function render() |
| 57 | 60 | { |
| 58 | 61 | return $this->format($this->renderStub(), Arr::get($this->config, 'sort', true)); |
@@ -92,6 +95,9 @@ discard block |
||
| 92 | 95 | return strtr($this->files->get($this->config['stub']), $this->getDummyAttributes()); |
| 93 | 96 | } |
| 94 | 97 | |
| 98 | + /** |
|
| 99 | + * @param string $content |
|
| 100 | + */ |
|
| 95 | 101 | private function format($content, $useSort = false) |
| 96 | 102 | { |
| 97 | 103 | return $useSort === true ? $this->useSortFixer->fix($content) : $content; |
@@ -2,9 +2,9 @@ |
||
| 2 | 2 | |
| 3 | 3 | namespace Recca0120\Generator; |
| 4 | 4 | |
| 5 | +use Illuminate\Filesystem\Filesystem; |
|
| 5 | 6 | use Illuminate\Support\Arr; |
| 6 | 7 | use Illuminate\Support\Str; |
| 7 | -use Illuminate\Filesystem\Filesystem; |
|
| 8 | 8 | use Recca0120\Generator\Fixers\UseSortFixer; |
| 9 | 9 | |
| 10 | 10 | class Code |
@@ -2,8 +2,8 @@ |
||
| 2 | 2 | |
| 3 | 3 | namespace Recca0120\Generator; |
| 4 | 4 | |
| 5 | -use Illuminate\Support\Arr; |
|
| 6 | 5 | use Illuminate\Filesystem\Filesystem; |
| 6 | +use Illuminate\Support\Arr; |
|
| 7 | 7 | use Recca0120\Generator\Fixers\UseSortFixer; |
| 8 | 8 | |
| 9 | 9 | class Generator |