Skip to content

Commit

Permalink
Don't proxy make methods on PHPFile
Browse files Browse the repository at this point in the history
  • Loading branch information
ajthinking committed Apr 23, 2022
1 parent 01791d1 commit 7bdc788
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 14 deletions.
13 changes: 4 additions & 9 deletions src/PHPFile.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ class PHPFile

protected string $fileQueryBuilder = Endpoints\PHP\PHPFileQueryBuilder::class;

protected string $maker = Endpoints\PHP\Make::class;

public string $astQueryBuilder = ASTQueryBuilder::class;

protected $ast;
Expand Down Expand Up @@ -80,17 +82,10 @@ public function getReflection()
$handler = new ReflectionProxy($this);
return $handler->getReflection();
}

public function file(string $name = 'dummy.php')
{
$handler = new Make($this);
return $handler->file($name);
}

public function class($name = \App\Dummy::class)
public function make()
{
$handler = new Make($this);
return $handler->class($name);
return new $this->maker($this);
}

public function __construct(
Expand Down
5 changes: 0 additions & 5 deletions src/Traits/HasSyntacticSweeteners.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,6 @@ public function it()
return $this;
}

public function make()
{
return $this;
}

public function please()
{
return $this;
Expand Down

0 comments on commit 7bdc788

Please sign in to comment.