Skip to content

Commit 321fc47

Browse files
committed
intiial comit
0 parents  commit 321fc47

9 files changed

Lines changed: 1159 additions & 0 deletions

File tree

.codeclimate.yml

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
---
2+
engines:
3+
duplication:
4+
enabled: true
5+
config:
6+
languages:
7+
- javascript
8+
- php
9+
checks:
10+
ExcessivePublicCount:
11+
enabled: false
12+
Similar code:
13+
enabled: false
14+
Identical code:
15+
enabled: false
16+
fixme:
17+
enabled: true
18+
phpmd:
19+
enabled: true
20+
config:
21+
CyclomaticComplexity:
22+
reportLevel: 100
23+
ExcessiveClassComplexity:
24+
maximum: 200
25+
NpathComplexity:
26+
minimum: 500
27+
TooManyMethods:
28+
maxmethods: 50
29+
WeightedMethodCount:
30+
maxmethods: 50
31+
ExcessiveMethodLength:
32+
minimum: 250
33+
ignore-whitespace: true
34+
checks:
35+
UnusedFormalParameter:
36+
enabled: false
37+
Design/NpathComplexity:
38+
enabled: false
39+
Design/WeightedMethodCount:
40+
enabled: false
41+
Design/LongMethod:
42+
enabled: false
43+
CyclomaticComplexity:
44+
enabled: false
45+
ExcessivePublicCount:
46+
enabled: false
47+
Design/TooManyMethods:
48+
enabled: false
49+
Design/TooManyPublicMethods:
50+
enabled: false
51+
Naming/ShortVariable:
52+
enabled: false
53+
CleanCode/BooleanArgumentFlag:
54+
enabled: false
55+
Controversial/Superglobals:
56+
enabled: false
57+
CleanCode/ElseExpression:
58+
enabled: false
59+
CleanCode/StaticAccess:
60+
enabled: false
61+
ratings:
62+
paths:
63+
- "**.inc"
64+
- "**.js"
65+
- "**.php"
66+
exclude_paths:
67+
- tests/

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
composer.lock
2+
vendor/
3+
.bettercodehub.yml
4+
.idea/workspace.xml
5+
.idea/libraries

.scrutinizer.yml

Lines changed: 186 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,186 @@
1+
filter:
2+
excluded_paths:
3+
- tests/*
4+
build:
5+
environment:
6+
php: 7.0
7+
cache:
8+
disabled: false
9+
directories:
10+
- ~/.composer/cache
11+
- tmp/
12+
- vendor/
13+
- composer.lock
14+
dependencies:
15+
override:
16+
- composer self-update
17+
- composer install --no-interaction --dev --prefer-dist --ansi
18+
tests:
19+
override:
20+
#- jshint-run $(ls public_html/js/*.js)
21+
#- shellcheck-run -s bash $(ls scripts/*/*.sh)
22+
#- csslint-run --exclude-list=public_html/css/domains.css,public_html/css/minified,public_html/css/reset.css,public_html/css/price_win.css public_html/css
23+
-
24+
command: 'vendor/bin/phpunit --bootstrap vendor/autoload.php tests/ -v --coverage-clover coverage.xml --whitelist src/'
25+
#command: 'phpdbg -qrr vendor/bin/phpunit --bootstrap vendor/autoload.php tests/ -v --coverage-clover coverage.xml --whitelist src/'
26+
coverage:
27+
file: 'coverage.xml'
28+
format: 'clover'
29+
checks:
30+
php:
31+
duplication: true
32+
uppercase_constants: true
33+
return_doc_comment_if_not_inferrable: true
34+
return_doc_comments: true
35+
remove_extra_empty_lines: true
36+
phpunit_assertions: true
37+
avoid_fixme_comments: true
38+
param_doc_comment_if_not_inferrable: true
39+
parameter_doc_comments: true
40+
simplify_boolean_return: true
41+
remove_extra_empty_lines: true
42+
property_assignments: true
43+
properties_in_camelcaps: true
44+
precedence_mistakes: true
45+
precedence_in_conditions: true
46+
phpunit_assertions: true
47+
php5_style_constructor: true
48+
parse_doc_comments: true
49+
parameters_in_camelcaps: true
50+
parameter_doc_comments: true
51+
param_doc_comment_if_not_inferrable: true
52+
one_class_per_file: true
53+
non_commented_empty_catch_block: true
54+
no_unnecessary_if: true
55+
no_trailing_whitespace: true
56+
no_short_open_tag: true
57+
no_non_implemented_abstract_methods: true
58+
no_goto: true
59+
no_long_variable_names:
60+
maximum: '25'
61+
more_specific_types_in_doc_comments: true
62+
missing_arguments: true
63+
instanceof_class_exists: true
64+
fix_use_statements:
65+
remove_unused: true
66+
preserve_multiple: false
67+
preserve_blanklines: false
68+
order_alphabetically: true
69+
fix_doc_comments: true
70+
encourage_shallow_comparison: true
71+
deprecated_code_usage: true
72+
deadlock_detection_in_loops: true
73+
comparison_always_same_result: true
74+
code_rating: true
75+
blank_line_after_namespace_declaration: true
76+
avoid_usage_of_logical_operators: true
77+
avoid_perl_style_comments: true
78+
avoid_fixme_comments: true
79+
avoid_duplicate_types: true
80+
avoid_corrupting_byteorder_marks: true
81+
avoid_closing_tag: true
82+
argument_type_checks: true
83+
coding_style:
84+
php:
85+
indentation:
86+
general:
87+
use_tabs: true
88+
size: 4
89+
switch:
90+
indent_case: true
91+
spaces:
92+
general:
93+
linefeed_character: newline
94+
before_parentheses:
95+
function_declaration: false
96+
closure_definition: false
97+
function_call: false
98+
if: true
99+
for: true
100+
while: true
101+
switch: true
102+
catch: true
103+
array_initializer: false
104+
around_operators:
105+
assignment: true
106+
logical: true
107+
equality: true
108+
relational: true
109+
bitwise: true
110+
additive: true
111+
multiplicative: true
112+
shift: true
113+
unary_additive: false
114+
concatenation: false
115+
negation: false
116+
before_left_brace:
117+
class: true
118+
function: true
119+
if: true
120+
else: true
121+
for: true
122+
while: true
123+
do: true
124+
switch: true
125+
try: true
126+
catch: true
127+
finally: true
128+
before_keywords:
129+
else: true
130+
while: true
131+
catch: true
132+
finally: true
133+
within:
134+
brackets: false
135+
array_initializer: false
136+
grouping: false
137+
function_call: false
138+
function_declaration: false
139+
if: false
140+
for: false
141+
while: false
142+
switch: false
143+
catch: false
144+
type_cast: false
145+
ternary_operator:
146+
before_condition: true
147+
after_condition: true
148+
before_alternative: true
149+
after_alternative: true
150+
in_short_version: false
151+
other:
152+
before_comma: false
153+
after_comma: true
154+
before_semicolon: false
155+
after_semicolon: true
156+
after_type_cast: true
157+
braces:
158+
classes_functions:
159+
class: end-of-line
160+
function: end-of-line
161+
closure: end-of-line
162+
if:
163+
opening: end-of-line
164+
always: false
165+
else_on_new_line: false
166+
for:
167+
opening: end-of-line
168+
always: false
169+
while:
170+
opening: end-of-line
171+
always: false
172+
do_while:
173+
opening: end-of-line
174+
always: false
175+
while_on_new_line: false
176+
switch:
177+
opening: end-of-line
178+
try:
179+
opening: end-of-line
180+
catch_on_new_line: false
181+
finally_on_new_line: false
182+
upper_lower_casing:
183+
keywords:
184+
general: lower
185+
constants:
186+
true_false_null: lower

.travis.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
env:
2+
global:
3+
- GIT_COMMITTED_AT="$(if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then git log -1 --pretty=format:%ct; else git log -1 --skip 1 --pretty=format:%ct; fi)"
4+
language: php
5+
os: linux
6+
dist: trusty
7+
sudo: false
8+
php:
9+
- 5.4
10+
- 5.5
11+
- 5.6
12+
- 7.0
13+
- 7.1
14+
cache:
15+
directories:
16+
- $HOME/.composer/cache/files
17+
- tmp/pear/download/
18+
- vendor/
19+
- composer.lock
20+
addons:
21+
code_climate:
22+
repo_token: $CODECLIMATE_REPO_TOKEN
23+
before_script:
24+
- mkdir -p build/logs
25+
- phpenv config-rm xdebug.ini
26+
- phpenv rehash
27+
- travis_retry composer self-update
28+
- travis_retry composer install --no-interaction --dev --prefer-dist --ansi
29+
script:
30+
- if [ "$TRAVIS_PHP_VERSION" = "7.0" ]; then phpdbg -qrr vendor/bin/phpunit --bootstrap vendor/autoload.php tests/ -v --coverage-clover coverage.xml --whitelist src/; fi;
31+
- if [ "$TRAVIS_PHP_VERSION" != "7.0" ]; then vendor/bin/phpunit --bootstrap vendor/autoload.php tests/ -v; fi
32+
after_success:
33+
- if [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "$TRAVIS_PHP_VERSION" == "7.0" ]; then travis_retry vendor/bin/test-reporter --coverage-report=coverage.xml; fi
34+
- if [ "$TRAVIS_PHP_VERSION" = "7.0" ]; then travis_retry bash <(curl -s https://codecov.io/bash); fi;
35+
- if [ "$TRAVIS_PHP_VERSION" = "7.0" ]; then travis_retry php vendor/bin/coveralls -v --coverage_clover=coverage.xml; fi;
36+
- if [ "$TRAVIS_PHP_VERSION" = "7.0" ]; then travis_retry php vendor/bin/codacycoverage clover coverage.xml; fi;

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
2+
API Info and Docs at https://www.directadmin.com/api.php
3+
4+
httpsocket from http://files.directadmin.com/services/all/httpsocket/httpsocket.php
5+
6+
sample at http://www.directadmin.com/sample_api.txt
7+
8+
more examples at http://files.directadmin.com/services/all/httpsocket/examples/

composer.json

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
{
2+
"name": "detain/myadmin-directadmin-storage",
3+
"type": "myadmin-plugin",
4+
"description": "Directadmin Storage Class",
5+
"keywords": [
6+
"directadmin",
7+
"administration",
8+
"storage"
9+
],
10+
"license": "LGPL-2.1-only",
11+
"authors": [
12+
{
13+
"name": "Joe Huss",
14+
"homepage": "https:\/\/my.interserver.net\/"
15+
}
16+
],
17+
"config": {
18+
"bin-dir": "vendor\/bin",
19+
"minimum-stability": "dev"
20+
},
21+
"require": {
22+
"php": ">=5.0.0",
23+
"ext-curl": "*",
24+
"symfony/event-dispatcher": ">=2.8.26",
25+
"detain/myadmin-plugin-installer": "dev-master"
26+
},
27+
"require-dev": {
28+
"phpunit/phpunit": "*",
29+
"phpunit/phpunit-mock-objects": "*",
30+
"vlucas/phpdotenv": "*",
31+
"codeclimate/php-test-reporter": "dev-master",
32+
"satooshi/php-coveralls": "*",
33+
"codacy/coverage": "dev-master"
34+
},
35+
"autoload": {
36+
"psr-4": {
37+
"Detain\\MyAdminDirectAdminStorage\\": "src/"
38+
}
39+
}
40+
}

0 commit comments

Comments
 (0)