orchidsoftware / platform

Orchid is a @laravel package that allows for rapid application development of back-office applications, admin/user panels, and dashboards.
https://orchid.software
MIT License
4.4k stars 646 forks source link

Fix fluent method return types in Orchid\Screen\Cell #2624

Closed giant-robot closed 1 year ago

giant-robot commented 1 year ago

It's a bit frustrating to use the fluent syntax of classes like TD and Sight in projects that are analyzed by PHPStan. The reason is that these classes inherit fluent methods from Orchid\Screen\Cell, where the return type is set to self. This raises errors when using the inherited methods because the return type of the method chain is changed from the desired TD or Sight to Cell.

It would be nice to change the return type of the fluent methods to static.