Skip to content

Commit d9a3128

Browse files
committed
Import
0 parents  commit d9a3128

File tree

500 files changed

+62265
-0
lines changed

Some content is hidden

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

500 files changed

+62265
-0
lines changed

.babelrc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"presets": ["@babel/preset-env"]
3+
}

.bladeignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Ignore email templates
2+
resources/views/emails/**

.editorconfig

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
root = true
2+
3+
[*]
4+
charset = utf-8
5+
end_of_line = lf
6+
insert_final_newline = true
7+
indent_style = space
8+
indent_size = 4
9+
trim_trailing_whitespace = true
10+
11+
[*.md]
12+
trim_trailing_whitespace = false
13+
14+
[*.{yml,yaml}]
15+
indent_size = 2
16+

.env.example

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
APP_NAME="Website Factory"
2+
APP_ENV=local
3+
APP_KEY=
4+
APP_DEBUG=true
5+
APP_URL=http://localhost
6+
7+
LOG_CHANNEL=stack
8+
LOG_LEVEL=debug
9+
10+
DB_CONNECTION=pgsql
11+
DB_HOST=pgsql
12+
DB_PORT=5432
13+
DB_DATABASE=website_factory
14+
DB_USERNAME=sail
15+
DB_PASSWORD=password
16+
17+
BROADCAST_DRIVER=log
18+
CACHE_DRIVER=redis
19+
FILESYSTEM_DRIVER=local
20+
QUEUE_CONNECTION=sync
21+
SESSION_DRIVER=cookie
22+
SESSION_LIFETIME=120
23+
24+
MEMCACHED_HOST=memcached
25+
26+
REDIS_HOST=redis
27+
REDIS_PASSWORD=null
28+
REDIS_PORT=6379
29+
30+
MAIL_MAILER=smtp
31+
MAIL_HOST=mailhog
32+
MAIL_PORT=1025
33+
MAIL_USERNAME=null
34+
MAIL_PASSWORD=null
35+
MAIL_ENCRYPTION=null
36+
MAIL_FROM_ADDRESS=[email protected]
37+
MAIL_FROM_NAME="${APP_NAME}"
38+
39+
APP_PORT=8080

.gitattributes

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
* text=auto
2+
*.css linguist-vendored
3+
*.scss linguist-vendored
4+
*.js linguist-vendored
5+
CHANGELOG.md export-ignore

.github/workflows/tests.yml

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
name: Tests
2+
3+
on: [push]
4+
5+
jobs:
6+
test:
7+
name: PHP ${{ matrix.php-version }} - ${{ matrix.dependency-version }}
8+
runs-on: ubuntu-latest
9+
timeout-minutes: 10
10+
strategy:
11+
fail-fast: false
12+
matrix:
13+
php-version:
14+
- '8.1'
15+
dependency-version:
16+
- prefer-stable
17+
18+
env:
19+
extensions: mbstring, sqlite, pdo_sqlite, intl, gd
20+
21+
steps:
22+
- name: Checkout
23+
uses: actions/checkout@v2
24+
25+
- name: Setup cache environment
26+
id: extcache
27+
uses: shivammathur/cache-extensions@v1
28+
with:
29+
php-version: ${{ matrix.php-version }}
30+
extensions: ${{ env.extensions }}
31+
key: php-extensions-cache
32+
33+
- name: Cache extensions
34+
uses: actions/cache@v2
35+
with:
36+
path: ${{ steps.extcache.outputs.dir }}
37+
key: ${{ steps.extcache.outputs.key }}
38+
restore-keys: ${{ steps.extcache.outputs.key }}
39+
40+
- name: Setup PHP
41+
uses: shivammathur/setup-php@v2
42+
with:
43+
php-version: ${{ matrix.php-version }}
44+
extensions: ${{ env.extensions }}
45+
coverage: pcov
46+
tools: composer:v2
47+
48+
- name: Setup Node.js
49+
uses: actions/setup-node@v2
50+
with:
51+
node-version: 16
52+
53+
- name: Get composer cache directory
54+
id: composercache
55+
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
56+
57+
- name: Cache composer dependencies
58+
uses: actions/cache@v2
59+
with:
60+
path: ${{ steps.composercache.outputs.dir }}
61+
key: dependencies-composer-${{ hashFiles('composer.lock') }}-php-${{ matrix.php-version }}-${{ matrix.dependency-version }}
62+
restore-keys: dependencies-composer-
63+
64+
- name: Get npm cache directory
65+
id: npmcache
66+
run: echo "::set-output name=dir::$(npm config get cache)"
67+
68+
- name: Cache npm dependencies
69+
uses: actions/cache@v2
70+
with:
71+
path: ${{ steps.npmcache.outputs.dir }}
72+
key: dependencies-npm-${{ hashFiles('package-lock.json') }}
73+
restore-keys: dependencies-npm-
74+
75+
- name: Install composer dependencies
76+
run: composer update --prefer-dist --no-interaction --no-scripts --${{ matrix.dependency-version }}
77+
78+
- name: Install npm dependencies
79+
run: npm ci --prefer-offline
80+
81+
- name: Build frontend
82+
run: npm run production
83+
84+
- name: Setup env
85+
run: composer env
86+
87+
- name: Run tests
88+
run: php artisan test

.gitignore

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
/.idea
2+
/.vscode
3+
/coverage
4+
/node_modules
5+
/public/assets
6+
/public/hot
7+
/public/mix-manifest.json
8+
/public/storage
9+
/public/vendor
10+
/storage/*.key
11+
/vendor
12+
_ide_helper_models.php
13+
_ide_helper.php
14+
.env
15+
.env.backup
16+
.php_cs.cache
17+
.php-cs-fixer.cache
18+
.phpstorm.meta.php
19+
.phpunit.result.cache
20+
docker-compose.override.yml
21+
Homestead.json
22+
Homestead.yaml
23+
npm-debug.log
24+
phpunit.xml
25+
yarn-error.log

.husky/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
_

.husky/prepare-commit-msg

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/sh
2+
. "$(dirname "$0")/_/husky.sh"
3+
4+
exec < /dev/tty && node_modules/.bin/cz --hook || true

.nvmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
v16

.php-cs-fixer.dist.php

Lines changed: 201 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,201 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
use PhpCsFixer\Config;
6+
use PhpCsFixer\Finder;
7+
8+
$rules = [
9+
'align_multiline_comment' => true,
10+
'array_indentation' => true,
11+
'array_syntax' => ['syntax' => 'short'],
12+
13+
'binary_operator_spaces' => [
14+
'default' => 'single_space',
15+
'operators' => ['=>' => null],
16+
],
17+
'blank_line_after_namespace' => true,
18+
'blank_line_after_opening_tag' => true,
19+
'blank_line_before_statement' => [
20+
'statements' => ['return'],
21+
],
22+
'braces' => true,
23+
'cast_spaces' => true,
24+
'class_attributes_separation' => [
25+
'elements' => ['method'],
26+
],
27+
'class_definition' => true,
28+
'concat_space' => [
29+
'spacing' => 'one',
30+
],
31+
'declare_equal_normalize' => true,
32+
'declare_strict_types' => true,
33+
'elseif' => true,
34+
'encoding' => true,
35+
'full_opening_tag' => true,
36+
'fully_qualified_strict_types' => true, // added by Shift
37+
'function_declaration' => true,
38+
'function_typehint_space' => true,
39+
'heredoc_to_nowdoc' => true,
40+
'include' => true,
41+
'increment_style' => ['style' => 'post'],
42+
'indentation_type' => true,
43+
'linebreak_after_opening_tag' => true,
44+
'line_ending' => true,
45+
'lowercase_cast' => true,
46+
'lowercase_keywords' => true,
47+
'lowercase_static_reference' => true, // added from Symfony
48+
'magic_method_casing' => true, // added from Symfony
49+
'magic_constant_casing' => true,
50+
'method_argument_space' => true,
51+
'method_chaining_indentation' => true,
52+
'native_constant_invocation' => [
53+
'fix_built_in' => true,
54+
'scope' => 'namespaced',
55+
'strict' => true,
56+
],
57+
'native_function_casing' => true,
58+
'native_function_invocation' => [
59+
'include' => ['@compiler_optimized'],
60+
'scope' => 'namespaced',
61+
'strict' => true,
62+
],
63+
'no_alias_functions' => true,
64+
'no_extra_blank_lines' => [
65+
'tokens' => [
66+
'extra',
67+
'throw',
68+
'use',
69+
'use_trait',
70+
],
71+
],
72+
'no_blank_lines_after_class_opening' => true,
73+
'no_blank_lines_after_phpdoc' => true,
74+
'no_closing_tag' => true,
75+
'no_empty_phpdoc' => true,
76+
'no_empty_statement' => true,
77+
'no_leading_import_slash' => true,
78+
'no_leading_namespace_whitespace' => true,
79+
'no_mixed_echo_print' => [
80+
'use' => 'echo',
81+
],
82+
'no_multiline_whitespace_around_double_arrow' => true,
83+
'multiline_whitespace_before_semicolons' => [
84+
'strategy' => 'no_multi_line',
85+
],
86+
'no_short_bool_cast' => true,
87+
'no_singleline_whitespace_before_semicolons' => true,
88+
'no_spaces_after_function_name' => true,
89+
'no_spaces_inside_parenthesis' => true,
90+
'no_trailing_comma_in_list_call' => true,
91+
'no_trailing_comma_in_singleline_array' => true,
92+
'no_trailing_whitespace' => true,
93+
'no_trailing_whitespace_in_comment' => true,
94+
'no_unreachable_default_argument_value' => true,
95+
'no_unused_imports' => true,
96+
'no_useless_return' => true,
97+
'no_whitespace_before_comma_in_array' => true,
98+
'no_whitespace_in_blank_line' => true,
99+
'normalize_index_brace' => true,
100+
'not_operator_with_successor_space' => true,
101+
'object_operator_without_whitespace' => true,
102+
'phpdoc_align' => true,
103+
'phpdoc_indent' => true,
104+
'phpdoc_no_access' => true,
105+
'phpdoc_no_package' => true,
106+
'phpdoc_no_useless_inheritdoc' => true,
107+
'phpdoc_scalar' => true,
108+
'phpdoc_single_line_var_spacing' => true,
109+
'phpdoc_summary' => true,
110+
'phpdoc_to_comment' => true,
111+
'phpdoc_trim' => true,
112+
'phpdoc_types' => true,
113+
'phpdoc_var_without_name' => true,
114+
'return_type_declaration' => true,
115+
'self_accessor' => true,
116+
'short_scalar_cast' => true,
117+
'simplified_null_return' => false, // disabled by Shift
118+
'single_blank_line_at_eof' => true,
119+
'single_blank_line_before_namespace' => true,
120+
'single_class_element_per_statement' => true,
121+
'single_import_per_statement' => true,
122+
'single_line_after_imports' => true,
123+
'single_line_comment_style' => [
124+
'comment_types' => ['hash'],
125+
],
126+
'single_quote' => true,
127+
'single_trait_insert_per_statement' => true,
128+
'space_after_semicolon' => true,
129+
'standardize_not_equals' => true,
130+
'switch_case_semicolon_to_colon' => true,
131+
'switch_case_space' => true,
132+
'ternary_operator_spaces' => true,
133+
134+
'trim_array_spaces' => true,
135+
'unary_operator_spaces' => true,
136+
'whitespace_after_comma_in_array' => true,
137+
138+
// php-cs-fixer 3: Renamed rules
139+
'constant_case' => ['case' => 'lower'],
140+
'general_phpdoc_tag_rename' => true,
141+
'phpdoc_inline_tag_normalizer' => true,
142+
'phpdoc_tag_type' => true,
143+
'psr_autoloading' => true,
144+
'trailing_comma_in_multiline' => ['elements' => ['arrays']],
145+
146+
// php-cs-fixer 3: Changed options
147+
'binary_operator_spaces' => [
148+
'default' => 'single_space',
149+
'operators' => ['=>' => null],
150+
],
151+
'blank_line_before_statement' => [
152+
'statements' => ['return'],
153+
],
154+
'class_attributes_separation' => [
155+
'elements' => [
156+
'const' => 'one',
157+
'method' => 'one',
158+
'property' => 'one',
159+
],
160+
],
161+
'class_definition' => [
162+
'multi_line_extends_each_single_line' => true,
163+
'single_item_single_line' => true,
164+
'single_line' => true,
165+
],
166+
'ordered_imports' => [
167+
'sort_algorithm' => 'alpha',
168+
],
169+
170+
// php-cs-fixer 3: Removed rootless options (*)
171+
'no_unneeded_control_parentheses' => [
172+
'statements' => ['break', 'clone', 'continue', 'echo_print', 'return', 'switch_case', 'yield'],
173+
],
174+
'no_spaces_around_offset' => [
175+
'positions' => ['inside', 'outside'],
176+
],
177+
'visibility_required' => [
178+
'elements' => ['property', 'method', 'const'],
179+
],
180+
181+
];
182+
183+
$finder = Finder::create()
184+
->in([
185+
__DIR__ . '/app',
186+
__DIR__ . '/config',
187+
__DIR__ . '/database',
188+
__DIR__ . '/resources',
189+
__DIR__ . '/routes',
190+
__DIR__ . '/tests',
191+
])
192+
->name('*.php')
193+
->notName('*.blade.php')
194+
->ignoreDotFiles(true)
195+
->ignoreVCS(true);
196+
197+
return (new Config())
198+
->setFinder($finder)
199+
->setRules($rules)
200+
->setRiskyAllowed(true)
201+
->setUsingCache(true);

0 commit comments

Comments
 (0)