Skip to content

Commit 08637a1

Browse files
committed
Bugfix use app Services
1 parent ff6bf11 commit 08637a1

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

src/Alerts.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@
2323
***/
2424

2525
use CodeIgniter\Config\BaseConfig;
26-
use CodeIgniter\Config\Services;
2726
use CodeIgniter\View\RendererInterface;
27+
use Config\Services;
2828
use Tatter\Alerts\Exceptions\AlertsException;
2929

3030
/*** CLASS ***/

src/Config/Services.php

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,22 @@
11
<?php namespace Tatter\Alerts\Config;
22

3-
use CodeIgniter\Config\BaseService;
43
use CodeIgniter\View\RendererInterface;
54

6-
class Services extends BaseService
5+
class Services extends \Config\Services
76
{
87
public static function alerts(BaseConfig $config = null, RendererInterface $view = null, bool $getShared = true)
98
{
10-
if ($getShared):
9+
if ($getShared)
10+
{
1111
return static::getSharedInstance('alerts', $config, $view);
12-
endif;
12+
}
1313

1414
// If no config was injected then load one
1515
// Prioritizes app/Config if found
1616
if (empty($config))
17+
{
1718
$config = config('Alerts');
19+
}
1820

1921
return new \Tatter\Alerts\Alerts($config, $view);
2022
}

0 commit comments

Comments
 (0)