Skip to content
This repository was archived by the owner on Jun 15, 2023. It is now read-only.

Commit fadb2be

Browse files
committed
Initial commit
0 parents  commit fadb2be

File tree

822 files changed

+127425
-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.

822 files changed

+127425
-0
lines changed

.babelrc

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"presets": [
3+
["@babel/env", {
4+
"forceAllTransforms": true,
5+
"targets": {
6+
"node": "current"
7+
}
8+
}]
9+
],
10+
"sourceMaps": true
11+
}

.editorconfig

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
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

.env.example

+108
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
1+
APP_NAME="CrapNewsApp"
2+
APP_ENV=local
3+
APP_KEY=
4+
APP_URL=http://localhost
5+
APP_LOCALE=en
6+
APP_FALLBACK_LOCALE=en
7+
APP_LOCALE_PHP=en_US
8+
APP_TIMEZONE=UTC
9+
LOG_CHANNEL=daily
10+
11+
DB_CONNECTION=mysql
12+
DB_HOST=127.0.0.1
13+
DB_PORT=3306
14+
DB_DATABASE=
15+
DB_USERNAME=
16+
DB_PASSWORD=
17+
18+
BROADCAST_DRIVER=log
19+
CACHE_DRIVER=file
20+
QUEUE_CONNECTION=sync
21+
SESSION_DRIVER=file
22+
SESSION_LIFETIME=120
23+
SESSION_ENCRYPT=false
24+
25+
REDIS_HOST=127.0.0.1
26+
REDIS_PASSWORD=null
27+
REDIS_PORT=6379
28+
29+
MAIL_DRIVER=smtp
30+
MAIL_HOST=localhost
31+
MAIL_PORT=1025
32+
MAIL_USERNAME=null
33+
MAIL_PASSWORD=null
34+
MAIL_ENCRYPTION=null
35+
MAIL_FROM_ADDRESS=[email protected]
36+
MAIL_FROM_NAME="${APP_NAME}"
37+
38+
AWS_ACCESS_KEY_ID=
39+
AWS_SECRET_ACCESS_KEY=
40+
AWS_DEFAULT_REGION=us-east-1
41+
AWS_BUCKET=
42+
43+
PUSHER_APP_ID=
44+
PUSHER_APP_KEY=
45+
PUSHER_APP_SECRET=
46+
PUSHER_APP_CLUSTER=mt1
47+
48+
MIX_PUSHER_APP_KEY="${PUSHER_APP_KEY}"
49+
MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}"
50+
51+
# News API
52+
NEWS_SOURCE_ENDPOINT='https://newsapi.org/v2/sources'
53+
NEWS_API_ENDPOINT='https://newsapi.org/v2/everything'
54+
NEWS_API_SECRET=''
55+
56+
# Access
57+
ENABLE_REGISTRATION=true
58+
CHANGE_EMAIL=false
59+
PASSWORD_HISTORY=3
60+
PASSWORD_EXPIRES_DAYS=90
61+
62+
# This should be one or the other, or neither
63+
REQUIRES_APPROVAL=false
64+
CONFIRM_EMAIL=true
65+
#//
66+
67+
# Get your credentials at: https://www.google.com/recaptcha/admin
68+
CONTACT_CAPTCHA_STATUS=false
69+
REGISTRATION_CAPTCHA_STATUS=false
70+
LOGIN_CAPTCHA_STATUS=false
71+
72+
INVISIBLE_RECAPTCHA_SITEKEY=
73+
INVISIBLE_RECAPTCHA_SECRETKEY=
74+
INVISIBLE_RECAPTCHA_BADGEHIDE=false
75+
INVISIBLE_RECAPTCHA_DATABADGE='bottomright'
76+
INVISIBLE_RECAPTCHA_TIMEOUT=5
77+
INVISIBLE_RECAPTCHA_DEBUG=false
78+
79+
# Socialite Providers
80+
FACEBOOK_ACTIVE=false
81+
#FACEBOOK_CLIENT_ID=
82+
#FACEBOOK_CLIENT_SECRET=
83+
#FACEBOOK_REDIRECT=${APP_URL}/login/facebook/callback
84+
85+
BITBUCKET_ACTIVE=false
86+
#BITBUCKET_CLIENT_ID=
87+
#BITBUCKET_CLIENT_SECRET=
88+
#BITBUCKET_REDIRECT=${APP_URL}/login/bitbucket/callback
89+
90+
GITHUB_ACTIVE=false
91+
#GITHUB_CLIENT_ID=
92+
#GITHUB_CLIENT_SECRET=
93+
#GITHUB_REDIRECT=${APP_URL}/login/github/callback
94+
95+
GOOGLE_ACTIVE=false
96+
#GOOGLE_CLIENT_ID=
97+
#GOOGLE_CLIENT_SECRET=
98+
#GOOGLE_REDIRECT=${APP_URL}/login/google/callback
99+
100+
LINKEDIN_ACTIVE=false
101+
#LINKEDIN_CLIENT_ID=
102+
#LINKEDIN_CLIENT_SECRET=
103+
#LINKEDIN_REDIRECT=${APP_URL}/login/linkedin/callback
104+
105+
TWITTER_ACTIVE=false
106+
#TWITTER_CLIENT_ID=
107+
#TWITTER_CLIENT_SECRET=
108+
#TWITTER_REDIRECT=${APP_URL}/login/twitter/callback

.gitattributes

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
* text=auto
2+
3+
# Enforce Unix newlines
4+
*.css text eol=lf linguist-vendored
5+
*.html text eol=lf
6+
*.js text eol=lf linguist-vendored
7+
*.json text eol=lf
8+
*.md text eol=lf
9+
*.scss text eol=lf linguist-vendored
10+
*.svg text eol=lf
11+
*.txt text eol=lf
12+
*.xml text eol=lf
13+
*.yml text eol=lf
14+
15+
# Don't diff or textually merge source maps
16+
*.map binary
17+
18+
CHANGELOG.md export-ignore

.gitignore

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
/node_modules
2+
/public/hot
3+
/public/storage
4+
/public/images
5+
/storage/*.key
6+
/vendor
7+
/.idea
8+
/.vagrant
9+
/nbproject
10+
Homestead.json
11+
Homestead.yaml
12+
npm-debug.log
13+
yarn-error.log
14+
.env
15+
.env.backup
16+
.DS_Store
17+
Thumbs.db
18+
*.sublime-project
19+
*.sublime-workspace
20+
.project
21+
_ide_helper.php
22+
.phpstorm.meta.php
23+
composer.phar
24+
error.log
25+
output.txt
26+
/.vscode
27+
.php_cs.cache
28+
coverage.xml
29+
/coverage
30+
.phpunit.result.cache

.php_cs.dist

+141
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,141 @@
1+
#!/usr/bin/env php
2+
<?php
3+
4+
$rules = [
5+
'array_indentation' => true,
6+
'array_syntax' => ['syntax' => 'short'],
7+
'binary_operator_spaces' => ['default' => 'single_space'],
8+
'blank_line_after_namespace' => true,
9+
'blank_line_after_opening_tag' => true,
10+
'blank_line_before_statement' => [
11+
'statements' => [
12+
'continue', 'declare', 'return', 'throw', 'try', 'do', 'if',
13+
'switch'
14+
]
15+
],
16+
'braces' => true,
17+
'cast_spaces' => ['space' => 'single'],
18+
'class_attributes_separation' => true,
19+
'class_definition' => ['singleLine' => true],
20+
'concat_space' => ['spacing' => 'none'],
21+
'declare_equal_normalize' => ['space' => 'none'],
22+
'elseif' => true,
23+
'encoding' => true,
24+
'full_opening_tag' => true,
25+
'function_declaration' => true,
26+
'function_typehint_space' => true,
27+
'heredoc_to_nowdoc' => true,
28+
'include' => true,
29+
'indentation_type' => true,
30+
'line_ending' => true,
31+
'linebreak_after_opening_tag' => true,
32+
'lowercase_cast' => true,
33+
'lowercase_constants' => true,
34+
'lowercase_keywords' => true,
35+
'magic_constant_casing' => true,
36+
'method_argument_space' => ['on_multiline' => 'ensure_fully_multiline'],
37+
'method_chaining_indentation' => true,
38+
'multiline_whitespace_before_semicolons' => ['strategy' => 'no_multi_line'],
39+
'native_function_casing' => true,
40+
'no_alias_functions' => ['sets' => ['@internal', '@IMAP']], // Risky
41+
'no_blank_lines_after_class_opening' => true,
42+
'no_blank_lines_after_phpdoc' => true,
43+
'no_closing_tag' => true,
44+
'no_empty_comment' => false,
45+
'no_empty_phpdoc' => true,
46+
'no_empty_statement' => true,
47+
'no_extra_blank_lines' => [
48+
'break', 'case', 'continue', 'curly_brace_block', 'default', 'extra',
49+
'parenthesis_brace_block', 'square_brace_block', 'throw',
50+
'use', 'useTrait', 'use_trait'
51+
],
52+
'no_leading_import_slash' => true,
53+
'no_leading_namespace_whitespace' => true,
54+
'no_mixed_echo_print' => ['use' => 'echo'],
55+
'no_multiline_whitespace_around_double_arrow' => true,
56+
'no_php4_constructor' => true,
57+
'no_short_bool_cast' => true,
58+
'no_singleline_whitespace_before_semicolons' => true,
59+
'no_spaces_after_function_name' => true,
60+
'no_spaces_inside_parenthesis' => true,
61+
'no_trailing_comma_in_list_call' => true,
62+
'no_trailing_comma_in_singleline_array' => true,
63+
'no_trailing_whitespace_in_comment' => true,
64+
'no_trailing_whitespace' => true,
65+
'no_unneeded_control_parentheses' => true,
66+
'no_unused_imports' => true,
67+
'no_useless_else' => true,
68+
'no_useless_return' => true,
69+
'no_whitespace_before_comma_in_array' => true,
70+
'no_whitespace_in_blank_line' => true,
71+
'normalize_index_brace' => true,
72+
'not_operator_with_successor_space' => true,
73+
'object_operator_without_whitespace' => true,
74+
'ordered_imports' => ['sortAlgorithm' => 'length'],
75+
'php_unit_strict' => true,
76+
'phpdoc_indent' => true,
77+
'phpdoc_inline_tag' => true,
78+
'phpdoc_no_access' => true,
79+
'phpdoc_no_empty_return' => true,
80+
'phpdoc_no_package' => true,
81+
'phpdoc_no_useless_inheritdoc' => true,
82+
'phpdoc_order' => true,
83+
'phpdoc_scalar' => [
84+
'types' => [
85+
'boolean', 'double', 'integer', 'real', 'str'
86+
]
87+
],
88+
'phpdoc_single_line_var_spacing' => true,
89+
'phpdoc_summary' => true,
90+
'phpdoc_to_comment' => true,
91+
'phpdoc_trim' => true,
92+
'phpdoc_types' => ['groups' => ['simple', 'alias', 'meta']],
93+
'phpdoc_var_without_name' => true,
94+
'psr4' => true,
95+
'self_accessor' => true,
96+
'short_scalar_cast' => true,
97+
'simplified_null_return' => true,
98+
'single_blank_line_at_eof' => true,
99+
'single_blank_line_before_namespace' => true,
100+
'single_class_element_per_statement' => ['const', 'property'],
101+
'single_import_per_statement' => true,
102+
'single_line_after_imports' => true,
103+
'single_line_comment_style' => true, // defaults comment_types => ['asterisk', 'hash']
104+
'single_quote' => true,
105+
'space_after_semicolon' => true,
106+
'standardize_increment' => true,
107+
'standardize_not_equals' => true,
108+
'switch_case_semicolon_to_colon' => true,
109+
'switch_case_space' => true,
110+
'ternary_operator_spaces' => true,
111+
'trailing_comma_in_multiline_array' => true,
112+
'trim_array_spaces' => true,
113+
'unary_operator_spaces' => true,
114+
'visibility_required' => ['property', 'method'],
115+
'whitespace_after_comma_in_array' => true,
116+
// 'align_phpdoc' => true,
117+
// 'concat_without_spaces' => true,
118+
// 'hash_to_slash_comment' => true,
119+
// 'no_unreachable_default_argument_value' => true, // risky
120+
// 'strict_comparison' => true // risky
121+
];
122+
123+
$excludes = [
124+
'bootstrap/cache',
125+
'node_modules',
126+
'storage',
127+
'public',
128+
'docs'
129+
];
130+
131+
$finder = PhpCsFixer\Finder::create()
132+
->exclude($excludes)
133+
->in(__DIR__)
134+
->notName('*.blade.php')
135+
->notName('.phpstorm.meta.php')
136+
->notName('_ide_*.php');
137+
138+
return PhpCsFixer\Config::create()
139+
->setRiskyAllowed(true)
140+
->setRules($rules)
141+
->setFinder($finder);

.styleci.yml

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
preset: laravel

0 commit comments

Comments
 (0)