mirror of
https://github.com/HDInnovations/UNIT3D-Community-Edition.git
synced 2026-04-26 04:59:16 -05:00
refactor: constructor promotions
This commit is contained in:
@@ -28,37 +28,21 @@ use App\Repositories\ChatRepository;
|
||||
use Carbon\Carbon;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use App\Interfaces\ByteUnitsInterface;
|
||||
|
||||
/**
|
||||
* @see \Tests\Feature\Http\Controllers\BonusControllerTest
|
||||
*/
|
||||
class BonusController extends Controller
|
||||
{
|
||||
/**
|
||||
* @var ChatRepository
|
||||
*/
|
||||
private $chatRepository;
|
||||
|
||||
/**
|
||||
* The library used for parsing byte units.
|
||||
*
|
||||
* @var ByteUnits
|
||||
*/
|
||||
protected $byteUnits;
|
||||
|
||||
/**
|
||||
* BonusController Constructor.
|
||||
*
|
||||
* @param \App\Interfaces\ByteUnitsInterface $byteUnits
|
||||
* @param \App\Repositories\ChatRepository $chatRepository
|
||||
*/
|
||||
public function __construct(
|
||||
\App\Interfaces\ByteUnitsInterface $byteUnits,
|
||||
ChatRepository $chatRepository
|
||||
) {
|
||||
$this->byteUnits = $byteUnits;
|
||||
|
||||
$this->chatRepository = $chatRepository;
|
||||
public function __construct(protected ByteUnitsIsnterface $byteUnits, private ChatRepository $chatRepository)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user