Skip to content

Commit 5839e9c

Browse files
committed
Simplifies constructor data loading.
1 parent 8324f66 commit 5839e9c

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/Provider.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,7 @@ public static function instance(string $provider, array $data = array())
4141
*/
4242
public function __construct(array $data = array())
4343
{
44-
if (!empty($data)) {
45-
$this->loadData($data);
46-
}
44+
$this->loadData($data);
4745
}
4846

4947
/**
@@ -53,7 +51,7 @@ public function __construct(array $data = array())
5351
*
5452
* @return void
5553
*/
56-
public function loadData(array $data = array())
54+
protected function loadData(array $data = array())
5755
{
5856
foreach ($data as $key => $value) {
5957
if (property_exists($this, $key)) {

0 commit comments

Comments
 (0)