mirror of
https://github.com/codeguy/php-the-right-way.git
synced 2025-08-25 14:30:47 +02:00
Use PHP constructor property promotion
This commit is contained in:
@@ -82,11 +82,8 @@ namespace Database;
|
||||
|
||||
class Database
|
||||
{
|
||||
protected $adapter;
|
||||
|
||||
public function __construct(AdapterInterface $adapter)
|
||||
public function __construct(protected AdapterInterface $adapter)
|
||||
{
|
||||
$this->adapter = $adapter;
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user