Skip to content

Commit 73c4fc4

Browse files
committed
intial adding of the plugin
0 parents  commit 73c4fc4

File tree

8 files changed

+432
-0
lines changed

8 files changed

+432
-0
lines changed

.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: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
composer.lock
2+
vendor/

.scrutinizer.yml

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

.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+
addons:
20+
code_climate:
21+
repo_token: $CODECLIMATE_REPO_TOKEN
22+
before_script:
23+
- mkdir -p build/logs
24+
- phpenv config-rm xdebug.ini
25+
- pear install pear/XML_RPC2
26+
- phpenv rehash
27+
- travis_retry composer self-update
28+
- travis_retry composer update --with-dependencies --no-interaction --dev --prefer-dist
29+
script:
30+
- if [ "$TRAVIS_PHP_VERSION" = "7.0" ]; then phpdbg -qrr vendor/bin/phpunit --bootstrap tests/bootstrap.php tests/ -v --coverage-clover coverage.xml --whitelist src/; fi;
31+
- if [ "$TRAVIS_PHP_VERSION" != "7.0" ]; then vendor/bin/phpunit --bootstrap tests/bootstrap.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: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# Monitoring handling plugin for MyAdmin
2+
3+
Monitoring handling plugin for MyAdmin
4+
5+
## Build Status and Code Analysis
6+
7+
Site | Status
8+
--------------|---------------------------
9+
Travis-CI | [![Build Status](https://travis-ci.org/detain/myadmin-monitoring-plugin.svg?branch=master)](https://travis-ci.org/detain/myadmin-monitoring-plugin)
10+
Code Climate | [![Code Climate](https://codeclimate.com/github/detain/myadmin-monitoring-plugin/badges/gpa.svg)](https://codeclimate.com/github/detain/myadmin-monitoring-plugin) [![Test Coverage](https://codeclimate.com/github/detain/myadmin-monitoring-plugin/badges/coverage.svg)](https://codeclimate.com/github/detain/myadmin-monitoring-plugin/coverage) [![Issue Count](https://codeclimate.com/github/detain/myadmin-monitoring-plugin/badges/issue_count.svg)](https://codeclimate.com/github/detain/myadmin-monitoring-plugin)
11+
Scrutinizer | [![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/myadmin-plugins/myadmin-monitoring-plugin/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/myadmin-plugins/myadmin-monitoring-plugin/?branch=master) [![Code Coverage](https://scrutinizer-ci.com/g/myadmin-plugins/myadmin-monitoring-plugin/badges/coverage.png?b=master)](https://scrutinizer-ci.com/g/myadmin-plugins/myadmin-monitoring-plugin/?branch=master) [![Build Status](https://scrutinizer-ci.com/g/myadmin-plugins/myadmin-monitoring-plugin/badges/build.png?b=master)](https://scrutinizer-ci.com/g/myadmin-plugins/myadmin-monitoring-plugin/build-status/master)
12+
Codacy | [![Codacy Badge](https://api.codacy.com/project/badge/Grade/226251fc068f4fd5b4b4ef9a40011d06)](https://www.codacy.com/app/detain/myadmin-monitoring-plugin) [![Codacy Badge](https://api.codacy.com/project/badge/Coverage/25fa74eb74c947bf969602fcfe87e349)](https://www.codacy.com/app/detain/myadmin-monitoring-plugin?utm_source=github.com&utm_medium=referral&utm_content=detain/myadmin-monitoring-plugin&utm_campaign=Badge_Coverage)
13+
VersionEye | [![Reference Status](https://www.versioneye.com/php/detain:myadmin-monitoring-plugin/reference_badge.svg?style=flat)](https://www.versioneye.com/php/detain:myadmin-monitoring-plugin/references) [![Dependency Status](https://www.versioneye.com/user/projects/592f7318bafc5500414dfd2a/badge.svg?style=flat-square)](https://www.versioneye.com/user/projects/592f7318bafc5500414dfd2a)
14+
Packagist | [![Latest Stable Version](https://poser.pugx.org/detain/myadmin-monitoring-plugin/version)](https://packagist.org/packages/detain/myadmin-monitoring-plugin) [![Total Downloads](https://poser.pugx.org/detain/myadmin-monitoring-plugin/downloads)](https://packagist.org/packages/detain/myadmin-monitoring-plugin) [![Latest Unstable Version](https://poser.pugx.org/detain/myadmin-monitoring-plugin/v/unstable)](//packagist.org/packages/detain/myadmin-monitoring-plugin) [![Monthly Downloads](https://poser.pugx.org/detain/myadmin-monitoring-plugin/d/monthly)](https://packagist.org/packages/detain/myadmin-monitoring-plugin) [![Daily Downloads](https://poser.pugx.org/detain/myadmin-monitoring-plugin/d/daily)](https://packagist.org/packages/detain/myadmin-monitoring-plugin) [![License](https://poser.pugx.org/detain/myadmin-monitoring-plugin/license)](https://packagist.org/packages/detain/myadmin-monitoring-plugin)
15+
16+
17+
## Installation
18+
19+
Install with composer like
20+
21+
```sh
22+
composer require detain/myadmin-monitoring-plugin
23+
```
24+
25+
## License
26+
27+
The Monitoring handling plugin for MyAdmin class is licensed under the LGPL-v2 license.
28+

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-monitoring-plugin",
3+
"type": "myadmin-plugin",
4+
"description": "Monitoring handling plugin for MyAdmin",
5+
"keywords": [
6+
"abuse",
7+
"administration",
8+
"spam"
9+
],
10+
"license": "LGPL-2.1",
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-soap": "*",
24+
"symfony/event-dispatcher": "*",
25+
"detain/myadmin-plugin-installer": "dev-master",
26+
"roave/security-advisories": "dev-master"
27+
},
28+
"require-dev": {
29+
"phpunit/phpunit": "*",
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\\MyAdminMonitoring\\": "src\/"
38+
}
39+
}
40+
}

0 commit comments

Comments
 (0)