Skip to content

Commit 37619d2

Browse files
authored
Merge pull request #4949 from paulbalandan/headers
Normalize and add file-level headers to `system/`, `tests/`, `utils/`
2 parents a6cfb8c + 0ee2b2f commit 37619d2

File tree

655 files changed

+3826
-1085
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

655 files changed

+3826
-1085
lines changed

.no-header.php-cs-fixer.dist.php

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
/**
6+
* This file is part of CodeIgniter 4 framework.
7+
*
8+
* (c) CodeIgniter Foundation <[email protected]>
9+
*
10+
* For the full copyright and license information, please view
11+
* the LICENSE file that was distributed with this source code.
12+
*/
13+
14+
use Nexus\CsConfig\Factory;
15+
use PhpCsFixer\Finder;
16+
use Utils\PhpCsFixer\CodeIgniter4;
17+
18+
$finder = Finder::create()
19+
->files()
20+
->in([
21+
__DIR__ . '/admin',
22+
__DIR__ . '/app',
23+
__DIR__ . '/public',
24+
]);
25+
26+
$overrides = [
27+
'no_blank_lines_after_phpdoc' => false,
28+
];
29+
30+
$options = [
31+
'cacheFile' => 'build/.no-header.php-cs-fixer.cache',
32+
'finder' => $finder,
33+
];
34+
35+
return Factory::create(new CodeIgniter4(), $overrides, $options)->forProjects();

.php-cs-fixer.dist.php

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,22 @@
22

33
declare(strict_types=1);
44

5+
/**
6+
* This file is part of CodeIgniter 4 framework.
7+
*
8+
* (c) CodeIgniter Foundation <[email protected]>
9+
*
10+
* For the full copyright and license information, please view
11+
* the LICENSE file that was distributed with this source code.
12+
*/
13+
514
use Nexus\CsConfig\Factory;
615
use PhpCsFixer\Finder;
716
use Utils\PhpCsFixer\CodeIgniter4;
817

918
$finder = Finder::create()
1019
->files()
1120
->in([
12-
__DIR__ . '/admin', // @todo relocate when `header_comment` is enabled
13-
__DIR__ . '/app', // @todo relocate when `header_comment` is enabled
14-
__DIR__ . '/public', // @todo relocate when `header_comment` is enabled
1521
__DIR__ . '/system',
1622
__DIR__ . '/tests',
1723
__DIR__ . '/utils',
@@ -20,6 +26,7 @@
2026
->notName('#Foobar.php$#')
2127
->append([
2228
__FILE__,
29+
__DIR__ . '/.no-header.php-cs-fixer.dist.php',
2330
__DIR__ . '/rector.php',
2431
__DIR__ . '/spark',
2532
]);
@@ -31,5 +38,8 @@
3138
'finder' => $finder,
3239
];
3340

34-
// @todo change to `forLibrary()` when `header_comment` is enabled
35-
return Factory::create(new CodeIgniter4(), $overrides, $options)->forProjects();
41+
return Factory::create(new CodeIgniter4(), $overrides, $options)->forLibrary(
42+
'CodeIgniter 4 framework',
43+
'CodeIgniter Foundation',
44+
45+
);

rector.php

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

3+
/**
4+
* This file is part of CodeIgniter 4 framework.
5+
*
6+
* (c) CodeIgniter Foundation <[email protected]>
7+
*
8+
* For the full copyright and license information, please view
9+
* the LICENSE file that was distributed with this source code.
10+
*/
11+
312
use Rector\CodeQuality\Rector\Expression\InlineIfToExplicitIfRector;
413
use Rector\CodeQuality\Rector\For_\ForToForeachRector;
514
use Rector\CodeQuality\Rector\Foreach_\UnusedForeachValueToArrayKeysRector;

system/API/ResponseTrait.php

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

33
/**
4-
* This file is part of the CodeIgniter 4 framework.
4+
* This file is part of CodeIgniter 4 framework.
55
*
66
* (c) CodeIgniter Foundation <[email protected]>
77
*
8-
* For the full copyright and license information, please view the LICENSE
9-
* file that was distributed with this source code.
8+
* For the full copyright and license information, please view
9+
* the LICENSE file that was distributed with this source code.
1010
*/
1111

1212
namespace CodeIgniter\API;

system/Autoloader/Autoloader.php

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

33
/**
4-
* This file is part of the CodeIgniter 4 framework.
4+
* This file is part of CodeIgniter 4 framework.
55
*
66
* (c) CodeIgniter Foundation <[email protected]>
77
*
8-
* For the full copyright and license information, please view the LICENSE
9-
* file that was distributed with this source code.
8+
* For the full copyright and license information, please view
9+
* the LICENSE file that was distributed with this source code.
1010
*/
1111

1212
namespace CodeIgniter\Autoloader;

system/Autoloader/FileLocator.php

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

33
/**
4-
* This file is part of the CodeIgniter 4 framework.
4+
* This file is part of CodeIgniter 4 framework.
55
*
66
* (c) CodeIgniter Foundation <[email protected]>
77
*
8-
* For the full copyright and license information, please view the LICENSE
9-
* file that was distributed with this source code.
8+
* For the full copyright and license information, please view
9+
* the LICENSE file that was distributed with this source code.
1010
*/
1111

1212
namespace CodeIgniter\Autoloader;

system/BaseModel.php

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

33
/**
4-
* This file is part of the CodeIgniter 4 framework.
4+
* This file is part of CodeIgniter 4 framework.
55
*
66
* (c) CodeIgniter Foundation <[email protected]>
77
*
8-
* For the full copyright and license information, please view the LICENSE
9-
* file that was distributed with this source code.
8+
* For the full copyright and license information, please view
9+
* the LICENSE file that was distributed with this source code.
1010
*/
1111

1212
namespace CodeIgniter;

system/CLI/BaseCommand.php

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

33
/**
4-
* This file is part of the CodeIgniter 4 framework.
4+
* This file is part of CodeIgniter 4 framework.
55
*
66
* (c) CodeIgniter Foundation <[email protected]>
77
*
8-
* For the full copyright and license information, please view the LICENSE
9-
* file that was distributed with this source code.
8+
* For the full copyright and license information, please view
9+
* the LICENSE file that was distributed with this source code.
1010
*/
1111

1212
namespace CodeIgniter\CLI;

system/CLI/CLI.php

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

33
/**
4-
* This file is part of the CodeIgniter 4 framework.
4+
* This file is part of CodeIgniter 4 framework.
55
*
66
* (c) CodeIgniter Foundation <[email protected]>
77
*
8-
* For the full copyright and license information, please view the LICENSE
9-
* file that was distributed with this source code.
8+
* For the full copyright and license information, please view
9+
* the LICENSE file that was distributed with this source code.
1010
*/
1111

1212
namespace CodeIgniter\CLI;

system/CLI/CommandRunner.php

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

33
/**
4-
* This file is part of the CodeIgniter 4 framework.
4+
* This file is part of CodeIgniter 4 framework.
55
*
66
* (c) CodeIgniter Foundation <[email protected]>
77
*
8-
* For the full copyright and license information, please view the LICENSE
9-
* file that was distributed with this source code.
8+
* For the full copyright and license information, please view
9+
* the LICENSE file that was distributed with this source code.
1010
*/
1111

1212
namespace CodeIgniter\CLI;

system/CLI/Commands.php

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

33
/**
4-
* This file is part of the CodeIgniter 4 framework.
4+
* This file is part of CodeIgniter 4 framework.
55
*
66
* (c) CodeIgniter Foundation <[email protected]>
77
*
8-
* For the full copyright and license information, please view the LICENSE
9-
* file that was distributed with this source code.
8+
* For the full copyright and license information, please view
9+
* the LICENSE file that was distributed with this source code.
1010
*/
1111

1212
namespace CodeIgniter\CLI;

system/CLI/Console.php

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

33
/**
4-
* This file is part of the CodeIgniter 4 framework.
4+
* This file is part of CodeIgniter 4 framework.
55
*
66
* (c) CodeIgniter Foundation <[email protected]>
77
*
8-
* For the full copyright and license information, please view the LICENSE
9-
* file that was distributed with this source code.
8+
* For the full copyright and license information, please view
9+
* the LICENSE file that was distributed with this source code.
1010
*/
1111

1212
namespace CodeIgniter\CLI;

system/CLI/Exceptions/CLIException.php

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

33
/**
4-
* This file is part of the CodeIgniter 4 framework.
4+
* This file is part of CodeIgniter 4 framework.
55
*
66
* (c) CodeIgniter Foundation <[email protected]>
77
*
8-
* For the full copyright and license information, please view the LICENSE
9-
* file that was distributed with this source code.
8+
* For the full copyright and license information, please view
9+
* the LICENSE file that was distributed with this source code.
1010
*/
1111

1212
namespace CodeIgniter\CLI\Exceptions;

system/CLI/GeneratorTrait.php

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

33
/**
4-
* This file is part of the CodeIgniter 4 framework.
4+
* This file is part of CodeIgniter 4 framework.
55
*
66
* (c) CodeIgniter Foundation <[email protected]>
77
*
8-
* For the full copyright and license information, please view the LICENSE
9-
* file that was distributed with this source code.
8+
* For the full copyright and license information, please view
9+
* the LICENSE file that was distributed with this source code.
1010
*/
1111

1212
namespace CodeIgniter\CLI;

system/Cache/CacheFactory.php

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

33
/**
4-
* This file is part of the CodeIgniter 4 framework.
4+
* This file is part of CodeIgniter 4 framework.
55
*
66
* (c) CodeIgniter Foundation <[email protected]>
77
*
8-
* For the full copyright and license information, please view the LICENSE
9-
* file that was distributed with this source code.
8+
* For the full copyright and license information, please view
9+
* the LICENSE file that was distributed with this source code.
1010
*/
1111

1212
namespace CodeIgniter\Cache;

system/Cache/CacheInterface.php

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

33
/**
4-
* This file is part of the CodeIgniter 4 framework.
4+
* This file is part of CodeIgniter 4 framework.
55
*
66
* (c) CodeIgniter Foundation <[email protected]>
77
*
8-
* For the full copyright and license information, please view the LICENSE
9-
* file that was distributed with this source code.
8+
* For the full copyright and license information, please view
9+
* the LICENSE file that was distributed with this source code.
1010
*/
1111

1212
namespace CodeIgniter\Cache;

system/Cache/Exceptions/CacheException.php

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

33
/**
4-
* This file is part of the CodeIgniter 4 framework.
4+
* This file is part of CodeIgniter 4 framework.
55
*
66
* (c) CodeIgniter Foundation <[email protected]>
77
*
8-
* For the full copyright and license information, please view the LICENSE
9-
* file that was distributed with this source code.
8+
* For the full copyright and license information, please view
9+
* the LICENSE file that was distributed with this source code.
1010
*/
1111

1212
namespace CodeIgniter\Cache\Exceptions;

system/Cache/Exceptions/ExceptionInterface.php

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

33
/**
4-
* This file is part of the CodeIgniter 4 framework.
4+
* This file is part of CodeIgniter 4 framework.
55
*
66
* (c) CodeIgniter Foundation <[email protected]>
77
*
8-
* For the full copyright and license information, please view the LICENSE
9-
* file that was distributed with this source code.
8+
* For the full copyright and license information, please view
9+
* the LICENSE file that was distributed with this source code.
1010
*/
1111

1212
namespace CodeIgniter\Cache\Exceptions;

system/Cache/Handlers/BaseHandler.php

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

33
/**
4-
* This file is part of the CodeIgniter 4 framework.
4+
* This file is part of CodeIgniter 4 framework.
55
*
66
* (c) CodeIgniter Foundation <[email protected]>
77
*
8-
* For the full copyright and license information, please view the LICENSE
9-
* file that was distributed with this source code.
8+
* For the full copyright and license information, please view
9+
* the LICENSE file that was distributed with this source code.
1010
*/
1111

1212
namespace CodeIgniter\Cache\Handlers;

system/Cache/Handlers/DummyHandler.php

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

33
/**
4-
* This file is part of the CodeIgniter 4 framework.
4+
* This file is part of CodeIgniter 4 framework.
55
*
66
* (c) CodeIgniter Foundation <[email protected]>
77
*
8-
* For the full copyright and license information, please view the LICENSE
9-
* file that was distributed with this source code.
8+
* For the full copyright and license information, please view
9+
* the LICENSE file that was distributed with this source code.
1010
*/
1111

1212
namespace CodeIgniter\Cache\Handlers;

system/Cache/Handlers/FileHandler.php

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

33
/**
4-
* This file is part of the CodeIgniter 4 framework.
4+
* This file is part of CodeIgniter 4 framework.
55
*
66
* (c) CodeIgniter Foundation <[email protected]>
77
*
8-
* For the full copyright and license information, please view the LICENSE
9-
* file that was distributed with this source code.
8+
* For the full copyright and license information, please view
9+
* the LICENSE file that was distributed with this source code.
1010
*/
1111

1212
namespace CodeIgniter\Cache\Handlers;

system/Cache/Handlers/MemcachedHandler.php

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

33
/**
4-
* This file is part of the CodeIgniter 4 framework.
4+
* This file is part of CodeIgniter 4 framework.
55
*
66
* (c) CodeIgniter Foundation <[email protected]>
77
*
8-
* For the full copyright and license information, please view the LICENSE
9-
* file that was distributed with this source code.
8+
* For the full copyright and license information, please view
9+
* the LICENSE file that was distributed with this source code.
1010
*/
1111

1212
namespace CodeIgniter\Cache\Handlers;

0 commit comments

Comments
 (0)