mirror of
https://github.com/barryvdh/laravel-ide-helper.git
synced 2026-08-17 17:47:13 +00:00
* Add support for generating helpers for external eloquent builders * Extract external builder methods generator to its own method and add an option to toggle this feature * Check if we are using the default name of the eloquent builder * Add tests with snapshots for external eloquent builder feature * Refactor codegs * Allow for type hinting * Update test * Run cs fix * Update readme * Use getName for parameter instead of relying on __toString() * Do not use str_contains and use built in php method
53 lines
948 B
PHP
53 lines
948 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GeneratePhpdocWithExternalEloquentBuilder\Builders;
|
|
|
|
use Illuminate\Database\Eloquent\Builder;
|
|
|
|
class PostExternalQueryBuilder extends Builder
|
|
{
|
|
public function isActive(): self
|
|
{
|
|
return $this;
|
|
}
|
|
|
|
public function isStatus(string $status): self
|
|
{
|
|
return $this;
|
|
}
|
|
|
|
public function isLoadingWith(?string $with): self
|
|
{
|
|
return $this;
|
|
}
|
|
|
|
/**
|
|
* @param int|null $number
|
|
* @return $this
|
|
*/
|
|
public function withTheNumber($number): self
|
|
{
|
|
return $this;
|
|
}
|
|
|
|
/**
|
|
* @param int|string $someone
|
|
* @return $this
|
|
*/
|
|
public function withSomeone($someone): self
|
|
{
|
|
return $this;
|
|
}
|
|
|
|
/**
|
|
* @param mixed $option
|
|
* @return $this
|
|
*/
|
|
public function withMixedOption($option): self
|
|
{
|
|
return $this;
|
|
}
|
|
}
|