Skip to content

Commit 1726c0c

Browse files
committed
Commit first draft
0 parents  commit 1726c0c

30 files changed

+2311
-0
lines changed

.codeclimate.yml

+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
---
2+
engines:
3+
duplication:
4+
enabled: true
5+
config:
6+
languages:
7+
- ruby
8+
- javascript
9+
- python
10+
- php
11+
eslint:
12+
enabled: true
13+
fixme:
14+
enabled: true
15+
phpmd:
16+
enabled: true
17+
checks:
18+
Design/TooManyPublicMethods:
19+
enabled: false
20+
Naming/ShortVariable:
21+
enabled: false
22+
CleanCode/ElseExpression:
23+
enabled: false
24+
CleanCode/BooleanArgumentFlag:
25+
enabled: false
26+
ratings:
27+
paths:
28+
- "**.inc"
29+
- "**.js"
30+
- "**.jsx"
31+
- "**.module"
32+
- "**.php"
33+
- "**.py"
34+
- "**.rb"
35+
exclude_paths:
36+
- "build/*"
37+
- "tests/*"
38+
- "vendor/*"

.editorconfig

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# http://editorconfig.org
2+
root = true
3+
4+
[*]
5+
charset = utf-8
6+
end_of_line = lf
7+
indent_size = 4
8+
indent_style = space
9+
insert_final_newline = true
10+
max_line_length = 80
11+
trim_trailing_whitespace = true
12+
13+
[*.md]
14+
max_line_length = 0
15+
trim_trailing_whitespace = false
16+
17+
[COMMIT_EDITMSG]
18+
max_line_length = 0

.gitattributes

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* text=auto

.gitignore

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
/build
2+
/vendor
3+
/node_modules
4+
composer.phar
5+
composer.lock

.scrutinizer.yml

+301
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,301 @@
1+
inherit: true
2+
3+
checks:
4+
php:
5+
verify_property_names: true
6+
verify_argument_usable_as_reference: true
7+
verify_access_scope_valid: true
8+
variable_existence: true
9+
useless_calls: true
10+
use_statement_alias_conflict: true
11+
fix_doc_comments: false
12+
avoid_corrupting_byteorder_marks: true
13+
unused_variables: true
14+
argument_type_checks: true
15+
assignment_of_null_return: true
16+
avoid_aliased_php_functions: true
17+
avoid_closing_tag: true
18+
avoid_conflicting_incrementers: true
19+
avoid_duplicate_types: true
20+
avoid_entity_manager_injection: true
21+
avoid_fixme_comments: true
22+
avoid_length_functions_in_loops: true
23+
avoid_multiple_statements_on_same_line: true
24+
avoid_perl_style_comments: true
25+
avoid_superglobals: true
26+
avoid_todo_comments: true
27+
avoid_usage_of_logical_operators: true
28+
avoid_useless_overridden_methods: true
29+
blank_line_after_namespace_declaration: true
30+
catch_class_exists: true
31+
classes_in_camel_caps: true
32+
closure_use_modifiable: true
33+
closure_use_not_conflicting: true
34+
code_rating: true
35+
deadlock_detection_in_loops: true
36+
deprecated_code_usage: true
37+
duplication: true
38+
encourage_shallow_comparison: true
39+
encourage_single_quotes: true
40+
foreach_traversable: true
41+
foreach_usable_as_reference: true
42+
function_in_camel_caps: true
43+
instanceof_class_exists: true
44+
line_length:
45+
max_length: '120'
46+
method_calls_on_non_object: true
47+
missing_arguments: true
48+
more_specific_types_in_doc_comments: true
49+
newline_at_end_of_file: true
50+
no_commented_out_code: true
51+
no_debug_code: true
52+
no_duplicate_arguments: true
53+
no_empty_statements: true
54+
no_error_suppression: true
55+
no_eval: true
56+
no_exit: true
57+
no_global_keyword: true
58+
no_goto: true
59+
no_long_variable_names:
60+
maximum: '20'
61+
no_non_implemented_abstract_methods: true
62+
no_property_on_interface: true
63+
no_short_method_names:
64+
minimum: '3'
65+
no_short_open_tag: true
66+
no_short_variable_names:
67+
minimum: '3'
68+
no_trailing_whitespace: true
69+
no_trait_type_hints: true
70+
no_underscore_prefix_in_methods: true
71+
no_underscore_prefix_in_properties: true
72+
no_unnecessary_final_modifier: true
73+
no_unnecessary_if: true
74+
non_commented_empty_catch_block: true
75+
one_class_per_file: true
76+
overriding_private_members: true
77+
parameter_non_unique: true
78+
parse_doc_comments: true
79+
optional_parameters_at_the_end: true
80+
param_doc_comment_if_not_inferrable: true
81+
parameter_doc_comments: true
82+
parameters_in_camelcaps: true
83+
php5_style_constructor: true
84+
precedence_in_conditions: true
85+
precedence_mistakes: true
86+
prefer_while_loop_over_for_loop: true
87+
properties_in_camelcaps: true
88+
property_assignments: true
89+
psr2_class_declaration: true
90+
psr2_switch_declaration: true
91+
require_php_tag_first: true
92+
require_scope_for_methods: true
93+
require_scope_for_properties: true
94+
return_doc_comment_if_not_inferrable: true
95+
return_doc_comments: true
96+
security_vulnerabilities: true
97+
side_effects_or_types: true
98+
simplify_boolean_return: true
99+
single_namespace_per_use: true
100+
sql_injection_vulnerabilities: true
101+
symfony_request_injection: true
102+
switch_fallthrough_commented: true
103+
too_many_arguments: true
104+
unreachable_code: true
105+
unused_methods: true
106+
unused_parameters: true
107+
unused_properties: true
108+
uppercase_constants: true
109+
use_self_instead_of_fqcn: true
110+
111+
112+
filter:
113+
excluded_paths:
114+
- 'build/*'
115+
- 'tests/*'
116+
- 'vendor/*'
117+
118+
tools:
119+
120+
# PHP Code Similarity Analyzer (https://scrutinizer-ci.com/docs/tools/php/code-similarity-analyzer/)
121+
php_sim:
122+
min_mass: 30 # Defaults to 16
123+
124+
125+
# SensioLabs Security Checker (https://scrutinizer-ci.com/docs/tools/php/security-advisory-checker/)
126+
sensiolabs_security_checker:
127+
enabled: true
128+
129+
130+
# PHP Code Sniffer (https://scrutinizer-ci.com/docs/tools/php/code-sniffer/)
131+
php_code_sniffer:
132+
enabled: true
133+
config:
134+
standard: PSR2
135+
filter:
136+
excluded_paths:
137+
- 'build/*'
138+
- 'tests/*'
139+
- 'vendor/*'
140+
141+
142+
# PHP Copy/Paste Detector
143+
php_cpd:
144+
enabled: true
145+
excluded_dirs:
146+
- 'build'
147+
- 'tests'
148+
- 'vendor'
149+
150+
151+
# Analyzes the size and structure of a PHP project.
152+
php_loc:
153+
enabled: true
154+
excluded_dirs:
155+
- 'build'
156+
- 'tests'
157+
- 'vendor'
158+
159+
160+
# PHP Mess Detector
161+
php_mess_detector:
162+
enabled: true
163+
config:
164+
rulesets:
165+
- codesize
166+
- unusedcode
167+
- naming
168+
- design
169+
- controversial
170+
filter:
171+
excluded_paths:
172+
- 'build/*'
173+
- 'tests/*'
174+
- 'vendor/*'
175+
176+
177+
# PHP PDepend (https://scrutinizer-ci.com/docs/tools/php/pdepend/)
178+
php_pdepend:
179+
enabled: true
180+
excluded_dirs:
181+
- 'build'
182+
- 'tests'
183+
- 'vendor'
184+
185+
186+
# PHP Analyzer (https://scrutinizer-ci.com/docs/tools/php/php-analyzer/)
187+
php_analyzer:
188+
enabled: true
189+
config:
190+
parameter_reference_check:
191+
enabled: true
192+
checkstyle:
193+
enabled: true
194+
no_trailing_whitespace: true
195+
naming:
196+
enabled: true
197+
local_variable: ^[a-z][a-zA-Z0-9]*$
198+
abstract_class_name: ^Abstract|Factory$
199+
utility_class_name: Utils?$
200+
constant_name: ^[A-Z][A-Z0-9]*(?:_[A-Z0-9]+)*$
201+
property_name: ^[a-z][a-zA-Z0-9]*$
202+
method_name: ^(?:[a-z]|__)[a-zA-Z0-9]*$
203+
parameter_name: ^[a-z][a-zA-Z0-9]*$
204+
interface_name: ^[A-Z][a-zA-Z0-9]*Interface$
205+
type_name: ^[A-Z][a-zA-Z0-9]*$
206+
exception_name: ^[A-Z][a-zA-Z0-9]*Exception$
207+
isser_method_name: ^(?:is|has|should|may|supports)
208+
unreachable_code:
209+
enabled: true
210+
check_access_control:
211+
enabled: true
212+
typo_checks:
213+
enabled: true
214+
check_variables:
215+
enabled: true
216+
check_calls:
217+
enabled: true
218+
method_call_validity: true
219+
too_many_arguments: true
220+
missing_argument: true
221+
argument_type_checks: lenient # Allowed Values: "disabled", "lenient", "strict"
222+
check_debug_code:
223+
enabled: true
224+
check_property_assignments:
225+
enabled: true
226+
method_contract_checks:
227+
enabled: true
228+
verify_interface_like_constraints: true
229+
verify_documented_constraints: true
230+
verify_parent_constraints: true
231+
check_request_data_usage:
232+
enabled: true
233+
suspicious_code:
234+
enabled: true
235+
overriding_parameter: false
236+
overriding_closure_use: true
237+
parameter_closure_use_conflict: true
238+
parameter_multiple_times: true
239+
non_existent_class_in_instanceof_check: true
240+
non_existent_class_in_catch_clause: true
241+
assignment_of_null_return: true
242+
non_commented_switch_fallthrough: true
243+
non_commented_empty_catch_block: true
244+
overriding_private_members: true
245+
use_statement_alias_conflict: true
246+
precedence_in_condition_assignment: true
247+
dead_assignments:
248+
enabled: true
249+
deadlock_detection:
250+
enabled: true
251+
verify_php_doc_comments:
252+
enabled: true
253+
parsable: true
254+
traits_are_not_type_hinted: true
255+
parameters: true
256+
return: true
257+
suggest_more_specific_types: true
258+
ask_for_return_if_not_inferrable: true
259+
ask_for_param_type_annotation: ~
260+
loops_must_use_braces:
261+
enabled: true
262+
check_usage_context:
263+
enabled: true
264+
foreach:
265+
value_as_reference: true
266+
traversable: true
267+
missing_argument: ~
268+
argument_type_checks: ~
269+
simplify_boolean_return:
270+
enabled: true
271+
phpunit_checks:
272+
enabled: false
273+
reflection_checks:
274+
enabled: true
275+
276+
# Checks Common Precedence Mistakes
277+
precedence_checks:
278+
enabled: true
279+
assignment_in_condition: true
280+
comparison_of_bit_result: true
281+
basic_semantic_checks:
282+
enabled: true
283+
property_on_interface: true
284+
missing_abstract_methods: true
285+
unused_code:
286+
enabled: true
287+
methods: true
288+
parameters: true
289+
deprecation_checks:
290+
enabled: true
291+
useless_function_calls:
292+
enabled: true
293+
metrics_lack_of_cohesion_methods:
294+
enabled: true
295+
metrics_coupling:
296+
enabled: true
297+
stable_code:
298+
namespace_prefixes: []
299+
classes: []
300+
symfony_request_injection:
301+
enabled: true

.styleci.yml

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
preset: recommended
2+
risky: false
3+
linting: true
4+
5+
enabled:
6+
- not_operator_with_successor_space
7+
- no_short_echo_tag
8+
- align_equals
9+
10+
disabled:
11+
- ordered_imports
12+
- phpdoc_no_package
13+
- unalign_equals

CHANGELOG.md

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Rinvex Authy Changelog
2+
3+
All notable changes to this project will be documented in this file.
4+
5+
This project adheres to [Semantic Versioning](CONTRIBUTING.md).
6+
7+
8+
## v0.0.1 - 2016-11-14
9+
- Commit first draft

0 commit comments

Comments
 (0)