Fix broken test "GeneratePhpdocWithExternalEloquentBuilder" (#1111)

* Fix code that was causing the test to break and fix bug with not built in types

* Run cs fixer

* Remove fetching the doc block type and the putting it as a type hint as a php doc block is sufficient

* Revert doc block type hinting

* Enchance doc block type hinting

* Combine replacements
This commit is contained in:
Kaloqn
2020-12-04 14:23:42 +01:00
committed by GitHub
parent ae5d7708b7
commit 9859958cfa
3 changed files with 87 additions and 24 deletions
@@ -4,6 +4,7 @@ declare(strict_types=1);
namespace Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithExternalEloquentBuilder\Builders;
use Barryvdh\LaravelIdeHelper\Console\ModelsCommand;
use Illuminate\Database\Eloquent\Builder;
class PostExternalQueryBuilder extends Builder
@@ -32,6 +33,38 @@ class PostExternalQueryBuilder extends Builder
return $this;
}
/**
* @param integer|null $number
* @return $this
*/
public function withTheNumberDifferently($number): self
{
return $this;
}
/**
* @param bool|null $number
* @return $this
*/
public function withBool($booleanVar): self
{
return $this;
}
/**
* @param bool|null $number
* @return $this
*/
public function withBoolDifferently($booleanVar): self
{
return $this;
}
public function withBoolTypeHinted(bool $booleanVar): self
{
return $this;
}
/**
* @param int|string $someone
* @return $this
@@ -49,4 +82,28 @@ class PostExternalQueryBuilder extends Builder
{
return $this;
}
public function withTestCommand(ModelsCommand $testCommand): self
{
return $this;
}
public function withNullTestCommand(?ModelsCommand $testCommand): self
{
return $this;
}
public function withNullAndAssignmentTestCommand(?ModelsCommand $testCommand = null): self
{
return $this;
}
/**
* @param ModelsCommand $testCommand
* @return $this
*/
public function withNullTestCommandInDocBlock($testCommand): self
{
return $this;
}
}