Skip to content

Commit

Permalink
Phan fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
brianlmoon committed Oct 21, 2024
1 parent 46c1e75 commit 8921c10
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/AbstractMapper.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ abstract class AbstractMapper extends \DealNews\DataMapper\AbstractMapper {
*
* @param \DealNews\DB\CRUD|null $crud Optional CRUD object
*/
public function __construct(CRUD $crud = null) {
public function __construct(?CRUD $crud = null) {
if ($crud !== null) {
$this->crud = $crud;
} elseif (!empty($this::DATABASE_NAME)) {
Expand Down
6 changes: 3 additions & 3 deletions src/Factory.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class Factory {
* @throws \PDOException
* @throws \LogicException
*/
public static function init(string $db, array $options = null, string $type = null): PDO {
public static function init(string $db, ?array $options = null, ?string $type = null): PDO {
static $objs = [];

if (!empty($type)) {
Expand Down Expand Up @@ -91,7 +91,7 @@ public static function build(array $config): PDO {
* @throws \LogicException
* @throws \UnexpectedValueException
*/
public static function loadConfig(array $config, array $options = null, string $type = null): array {
public static function loadConfig(array $config, ?array $options = null, ?string $type = null): array {
if (empty($config['server']) && empty($config['dsn'])) {
throw new \LogicException('Either `server` or `dsn` is required', 3);
} elseif (!empty($config['server'])) {
Expand Down Expand Up @@ -157,7 +157,7 @@ public static function loadConfig(array $config, array $options = null, string $
* @return array
* @throws \LogicException
*/
public static function getConfig(string $db, GetConfig $cfg = null): array {
public static function getConfig(string $db, ?GetConfig $cfg = null): array {
if (empty($cfg)) {
$cfg = new GetConfig();
}
Expand Down

0 comments on commit 8921c10

Please sign in to comment.