Update Factory.php
This commit is contained in:
parent
d5dcb941a4
commit
2f94e2f7eb
1 changed files with 3 additions and 2 deletions
|
@ -1,5 +1,6 @@
|
||||||
<?php
|
<?php
|
||||||
/* Destructr | https://github.com/jobyone/destructr | MIT License */
|
/* Destructr | https://github.com/jobyone/destructr | MIT License */
|
||||||
|
|
||||||
namespace Destructr;
|
namespace Destructr;
|
||||||
|
|
||||||
use Destructr\Drivers\AbstractDriver;
|
use Destructr\Drivers\AbstractDriver;
|
||||||
|
@ -141,7 +142,7 @@ class Factory
|
||||||
* @param array $data
|
* @param array $data
|
||||||
* @return string|null
|
* @return string|null
|
||||||
*/
|
*/
|
||||||
function class (array $data): ?string
|
function class(?array $data): ?string
|
||||||
{
|
{
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
@ -161,7 +162,7 @@ class Factory
|
||||||
return $this->update($dso, true);
|
return $this->update($dso, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function create(array $data = array()): DSOInterface
|
public function create(?array $data = array()): DSOInterface
|
||||||
{
|
{
|
||||||
if (!($class = $this->class($data))) {
|
if (!($class = $this->class($data))) {
|
||||||
$class = DSO::class;
|
$class = DSO::class;
|
||||||
|
|
Loading…
Reference in a new issue