diff options
| author | Sam Light <samlight1994@gmail.com> | 2025-04-25 23:07:58 +0100 | 
|---|---|---|
| committer | Sam Light <samlight1994@gmail.com> | 2025-04-25 23:07:58 +0100 | 
| commit | 2a227315dc46815bf06c046d636999d60a1de431 (patch) | |
| tree | 3aa28d196bae40c84e91f1c1930d30a5d9cd26d2 /src | |
| parent | b05d570d320a31bb96b1c1f48302c301d716f89f (diff) | |
Some larastan fixes
Diffstat (limited to 'src')
| -rw-r--r-- | src/Columns/Column.php | 7 | ||||
| -rw-r--r-- | src/Concerns/Makable.php | 2 | 
2 files changed, 3 insertions, 6 deletions
| diff --git a/src/Columns/Column.php b/src/Columns/Column.php index 2b033c7..46a03ba 100644 --- a/src/Columns/Column.php +++ b/src/Columns/Column.php @@ -3,6 +3,7 @@  namespace Lightscale\LaralightTables\Columns;  use Lightscale\LaralightTables\TableComponent; +use Lightscale\LaralightTables\Concerns\Makable;  use Illuminate\Database\Eloquent\Model;  use Illuminate\Database\Eloquent\Builder; @@ -12,6 +13,7 @@ use Illuminate\Support\HtmlString;  use Closure;  class Column { +    use Makable;      private TableComponent $table;      private bool $showInSelect; @@ -30,11 +32,6 @@ class Column {          $this->showInSelect = $this->title !== null;      } -    public static function make(string $name, ?string $title = null): static -    { -        return new static($name, $title); -    } -      public function setTable(TableComponent $table): void      {          $this->table = $table; diff --git a/src/Concerns/Makable.php b/src/Concerns/Makable.php index 7562970..b215b2d 100644 --- a/src/Concerns/Makable.php +++ b/src/Concerns/Makable.php @@ -6,6 +6,6 @@ trait Makable  {      public static function make(mixed ...$args): static      { -        return new static(...$args); +        return new static(...$args); // @phpstan-ignore new.static      }  } | 
