Skip to content

Commit bcc2560

Browse files
authored
Override HandlesTraits trait (#727)
1 parent d49ef4e commit bcc2560

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

src/Generators/PestTestGenerator.php

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
use Blueprint\Blueprint;
66
use Blueprint\Concerns\HandlesImports;
7+
use Blueprint\Concerns\HandlesTraits;
78
use Blueprint\Contracts\Generator;
89
use Blueprint\Contracts\Model as BlueprintModel;
910
use Blueprint\Models\Column;
@@ -25,7 +26,7 @@
2526

2627
class PestTestGenerator extends AbstractClassGenerator implements Generator
2728
{
28-
use HandlesImports;
29+
use HandlesImports, HandlesTraits;
2930

3031
const TESTS_VIEW = 1;
3132

@@ -41,8 +42,6 @@ class PestTestGenerator extends AbstractClassGenerator implements Generator
4142

4243
protected array $types = ['controllers', 'tests'];
4344

44-
protected array $traits = [];
45-
4645
public function output(Tree $tree): array
4746
{
4847
$this->tree = $tree;
@@ -658,11 +657,6 @@ private function buildLines($lines): string
658657
return str_pad(' ', 4) . implode(PHP_EOL . str_pad(' ', 4), $lines);
659658
}
660659

661-
protected function addTrait(BlueprintModel $model, $trait): void
662-
{
663-
$this->traits[$model->name()][] = $trait;
664-
}
665-
666660
protected function buildTraits(BlueprintModel $model): string
667661
{
668662
if (empty($this->traits[$model->name()])) {

0 commit comments

Comments
 (0)