Skip to content

Commit 3e3d59d

Browse files
committed
chore: restructure application structure
1 parent 5533d81 commit 3e3d59d

14 files changed

Lines changed: 116 additions & 64 deletions

β€Ž.editorconfigβ€Ž

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
; top-most EditorConfig file
2+
root = true
3+
4+
; Unix-style newlines
5+
[*]
6+
charset = utf-8
7+
end_of_line = LF
8+
insert_final_newline = true
9+
trim_trailing_whitespace = true
10+
11+
[*.php]
12+
indent_style = space
13+
indent_size = 4
14+
15+
[*.md]
16+
max_line_length = 80
17+
18+
[COMMIT_EDITMSG]
19+
max_line_length = 0

β€Ž.gitattributesβ€Ž

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1-
*.json text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
2-
*.lock text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
3-
*.php text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 diff=php linguist-language=php
1+
* text=auto eol=lf
2+
3+
*.md diff=markdown
4+
*.php diff=php
5+
6+
/.github export-ignore
7+
/.editorconfig export-ignore
8+
/.gitattributes export-ignore
9+
/.gitignore export-ignore
10+
/.php-cs-fixer.dist.php export-ignore
11+
/tests export-ignore
12+
/phpstan.neon.dist export-ignore
13+
/phpunit.xml.dist export-ignore

β€Ž.gitignoreβ€Ž

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,7 @@
88
composer.lock
99
composer.phar
1010
vendor/
11+
12+
# php-cs-fixer
13+
.php-cs-fixer.cache
14+
.php-cs-fixer.php
Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,21 @@
11
<?php
22

3-
use PhpCsFixer\Config;
4-
use PhpCsFixer\Finder;
3+
/*
4+
* This file is part of the sxbrsky/aether.
5+
*
6+
* Copyright (C) 2024 Dominik Szamburski
7+
*
8+
* This software may be modified and distributed under the terms
9+
* of the MIT license. See the LICENSE file for details.
10+
*/
511

6-
$finder = Finder::create()
7-
->in([
8-
__DIR__ . '/lib',
9-
__DIR__ . '/tests',
10-
])
12+
$finder = PhpCsFixer\Finder::create()
1113
->name('*.php')
1214
->ignoreDotFiles(TRUE)
1315
->ignoreVCS(TRUE);
1416

15-
return (new Config())
17+
$config = new PhpCsFixer\Config();
18+
$config->setFinder($finder)
1619
->setRules([
1720
'@PSR12' => TRUE,
1821
'array_syntax' => ['syntax' => 'short'],
@@ -51,6 +54,6 @@
5154
'keep_multiple_spaces_after_comma' => TRUE,
5255
],
5356
'single_trait_insert_per_statement' => TRUE,
54-
])
55-
->setFinder($finder);
57+
]);
5658

59+
return $config;

β€Žcomposer.jsonβ€Ž

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,22 @@
77
"source": "https://github.com/sxbrsky/aether"
88
},
99
"require": {
10-
"aether/core": "self.version"
10+
"php": ">=8.2"
11+
},
12+
"require-dev": {
13+
"friendsofphp/php-cs-fixer": "^3.64",
14+
"phpstan/phpstan": "^1.12",
15+
"phpunit/phpunit": "^11.3"
1116
},
12-
"repositories": [
13-
{
14-
"type": "path",
15-
"url": "app/core"
16-
}
17-
],
1817
"minimum-stability": "dev",
1918
"prefer-stable": true,
19+
"autoload": {
20+
"Aether\\Framework\\": "system/Framework"
21+
},
22+
"autoload-dev": {
23+
"Aehger\\Tests\\PHPStan\\": "dev/phpstan/",
24+
"Aether\\Tests\\Unit\\": "dev/tests/unit/"
25+
},
2026
"config": {
2127
"platform": {
2228
"php": "8.3.0"

β€Žcore/.gitignoreβ€Ž

Lines changed: 0 additions & 23 deletions
This file was deleted.

β€Žcore/composer.jsonβ€Ž

Lines changed: 0 additions & 15 deletions
This file was deleted.

β€Žcore/phpstan.neon.distβ€Ž

Lines changed: 0 additions & 6 deletions
This file was deleted.
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
parameters:
2+
fileExtensions:
3+
- php
4+
- dist
5+
6+
excludePaths:
7+
- */vendor/
8+
9+
level: max
10+
inferPrivatePropertyTypeFromConstructor: true
11+
reportUnmatchedIgnoredErrors: false
12+
treatPhpDocTypesAsCertain: false
13+

β€Ždev/tests/bootstrap.phpβ€Ž

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<?php declare(strict_types=1);
2+
3+
require_once __DIR__ . '/../../vendor/autoload.php';

0 commit comments

Comments
Β (0)