Skip to content

Commit d1264fe

Browse files
authored
Merge pull request #16 from tattersoftware/styles
Updated Coding Styles
2 parents 7aef8b9 + c6317b3 commit d1264fe

File tree

7 files changed

+5
-76
lines changed

7 files changed

+5
-76
lines changed

.php-cs-fixer.dist.php

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -10,25 +10,11 @@
1010
->exclude('build')
1111
->append([__FILE__]);
1212

13-
// Remove overrides for incremental changes
14-
$overrides = [
15-
'array_indentation' => false,
16-
'braces' => false,
17-
'indentation_type' => false,
18-
];
13+
$overrides = [];
1914

2015
$options = [
2116
'finder' => $finder,
2217
'cacheFile' => 'build/.php-cs-fixer.cache',
2318
];
2419

2520
return Factory::create(new CodeIgniter4(), $overrides, $options)->forProjects();
26-
27-
/* Reenable For libraries after incremental changes are applied
28-
return Factory::create(new CodeIgniter4(), $overrides, $options)->forLibrary(
29-
'Tatter ________',
30-
'Tatter Software',
31-
'',
32-
2021
33-
);
34-
*/

examples/Alerts.php

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,5 @@
11
<?php
22

3-
/**
4-
* This file is part of Tatter Alerts.
5-
*
6-
* (c) 2021 Tatter Software
7-
*
8-
* For the full copyright and license information, please view
9-
* the LICENSE file that was distributed with this source code.
10-
*/
11-
123
namespace Config;
134

145
/*

src/Alerts.php

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,5 @@
11
<?php
22

3-
/**
4-
* This file is part of Tatter Alerts.
5-
*
6-
* (c) 2021 Tatter Software
7-
*
8-
* For the full copyright and license information, please view
9-
* the LICENSE file that was distributed with this source code.
10-
*/
11-
123
namespace Tatter\Alerts;
134

145
use CodeIgniter\Session\Session;
@@ -48,11 +39,8 @@ class Alerts
4839

4940
/**
5041
* Initiates the library, check for existing session.
51-
*
52-
* @param AlertsConfig $config
53-
* @param RendererInterface|null $view
5442
*/
55-
public function __construct(AlertsConfig $config, RendererInterface $view = null)
43+
public function __construct(AlertsConfig $config, ?RendererInterface $view = null)
5644
{
5745
$this->config = $config;
5846
$this->session = service('session');

src/Config/Alerts.php

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,5 @@
11
<?php
22

3-
/**
4-
* This file is part of Tatter Alerts.
5-
*
6-
* (c) 2021 Tatter Software
7-
*
8-
* For the full copyright and license information, please view
9-
* the LICENSE file that was distributed with this source code.
10-
*/
11-
123
namespace Tatter\Alerts\Config;
134

145
use CodeIgniter\Config\BaseConfig;

src/Config/Services.php

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,5 @@
11
<?php
22

3-
/**
4-
* This file is part of Tatter Alerts.
5-
*
6-
* (c) 2021 Tatter Software
7-
*
8-
* For the full copyright and license information, please view
9-
* the LICENSE file that was distributed with this source code.
10-
*/
11-
123
namespace Tatter\Alerts\Config;
134

145
use CodeIgniter\View\RendererInterface;
@@ -18,7 +9,7 @@
189

1910
class Services extends BaseServices
2011
{
21-
public static function alerts(AlertsConfig $config = null, RendererInterface $view = null, bool $getShared = true)
12+
public static function alerts(?AlertsConfig $config = null, ?RendererInterface $view = null, bool $getShared = true)
2213
{
2314
if ($getShared) {
2415
return static::getSharedInstance('alerts', $config, $view);

src/Exceptions/AlertsException.php

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,18 @@
11
<?php
22

3-
/**
4-
* This file is part of Tatter Alerts.
5-
*
6-
* (c) 2021 Tatter Software
7-
*
8-
* For the full copyright and license information, please view
9-
* the LICENSE file that was distributed with this source code.
10-
*/
11-
123
namespace Tatter\Alerts\Exceptions;
134

145
use CodeIgniter\Exceptions\ExceptionInterface;
156
use CodeIgniter\Exceptions\FrameworkException;
167

178
class AlertsException extends FrameworkException implements ExceptionInterface
189
{
19-
public static function forInvalidTemplate(string $template = null)
10+
public static function forInvalidTemplate(?string $template = null)
2011
{
2112
return new static(lang('Alerts.invalidTemplate', [$template ?? '']));
2213
}
2314

24-
public static function forMissingTemplateView(string $template = null)
15+
public static function forMissingTemplateView(?string $template = null)
2516
{
2617
return new static(lang('Alerts.missingTemplateView', [$template ?? '']));
2718
}

src/Helpers/alerts_helper.php

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,5 @@
11
<?php
22

3-
/**
4-
* This file is part of Tatter Alerts.
5-
*
6-
* (c) 2021 Tatter Software
7-
*
8-
* For the full copyright and license information, please view
9-
* the LICENSE file that was distributed with this source code.
10-
*/
11-
123
if (! function_exists('alert')) {
134
/**
145
* Adds a new alert to the queue.

0 commit comments

Comments
 (0)