Update Factory.php

This commit is contained in:
Joby Elliott 2020-09-22 09:28:54 -06:00 committed by GitHub
parent d5dcb941a4
commit 2f94e2f7eb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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;