Skip to content

Commit 9f67971

Browse files
committed
1 parent f525d6f commit 9f67971

File tree

7 files changed

+132
-0
lines changed

7 files changed

+132
-0
lines changed

.codeclimate.yml

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
engines:
2+
fixme:
3+
enabled: true
4+
phpmd:
5+
enabled: true
6+
config:
7+
file_extensions: "php"
8+
rulesets: "phpmd.xml"
9+
markdownlint:
10+
enabled: true
11+
ratings:
12+
paths:
13+
- "**.php"
14+
exclude_paths:
15+
- config/**/*
16+
- examples/**/*
17+
- public/**/*
18+
- scripts/**/*
19+
- storage/**/*
20+
- tests/**/*
21+
- "**/vendor/**/*"

.scrutinizer.yml

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
filter:
2+
excluded_paths:
3+
- config/*
4+
- examples/*
5+
- public/*
6+
- scripts/*
7+
- storage/*
8+
- tests/*
9+
- vendor/*

.travis.yml

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
language: php
2+
3+
php:
4+
- 7.0
5+
- 7.1
6+
7+
services:
8+
- mysql
9+
- postgresql
10+
- sqlite3
11+
12+
before_install:
13+
- pip install --user codecov
14+
15+
install:
16+
- travis_retry composer install --no-interaction --prefer-source
17+
18+
before_script:
19+
- mysql -e 'create database dbtest;'
20+
- psql -c 'create database dbtest;' -U postgres
21+
22+
script:
23+
- vendor/bin/phpunit --configuration phpunit.xml --coverage-clover clover.xml
24+
25+
after_success:
26+
- codecov

LICENSE

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
The MIT License (MIT)
2+
3+
Copyright (c) 2017 Smiley <[email protected]>
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in
13+
all copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21+
THE SOFTWARE.

config/.env_travis

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
DB_MYSQLI_HOST=localhost
2+
DB_MYSQLI_PORT=3306
3+
DB_MYSQLI_DATABASE=dbtest
4+
DB_MYSQLI_USERNAME=root
5+
6+
DB_SQLITE3_DATABASE=/home/travis/build/chillerlan/database/storage/dbtest.sqlite
7+
8+
DB_POSTGRES_HOST=localhost
9+
DB_POSTGRES_PORT=5432
10+
DB_POSTGRES_DATABASE=dbtest
11+
DB_POSTGRES_USERNAME=postgres

phpmd.xml

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
<?xml version="1.0"?>
2+
<ruleset name="chillerlan/database PMD ruleset"
3+
xmlns="http://pmd.sf.net/ruleset/1.0.0"
4+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
5+
xsi:schemaLocation="http://pmd.sf.net/ruleset/1.0.0 http://pmd.sf.net/ruleset_xml_schema.xsd"
6+
xsi:noNamespaceSchemaLocation="http://pmd.sf.net/ruleset_xml_schema.xsd">
7+
<description>chillerlan/database PMD ruleset</description>
8+
<exclude-pattern>*/config/*</exclude-pattern>
9+
<exclude-pattern>*/examples/*</exclude-pattern>
10+
<exclude-pattern>*/public/*</exclude-pattern>
11+
<exclude-pattern>*/storage/*</exclude-pattern>
12+
<exclude-pattern>*/scripts/*</exclude-pattern>
13+
<exclude-pattern>*/tests/*</exclude-pattern>
14+
<rule ref="rulesets/cleancode.xml"/>
15+
<rule ref="rulesets/codesize.xml"/>
16+
<rule ref="rulesets/design.xml"/>
17+
<rule ref="rulesets/controversial.xml">
18+
<exclude name="CamelCaseMethodName"/>
19+
<exclude name="CamelCasePropertyName"/>
20+
<exclude name="CamelCaseParameterName"/>
21+
<exclude name="CamelCaseVariableName"/>
22+
</rule>
23+
<rule ref="rulesets/naming.xml">
24+
<exclude name="LongVariable"/>
25+
<exclude name="ShortVariable"/>
26+
</rule>
27+
<rule ref="rulesets/unusedcode.xml">
28+
<exclude name="UnusedFormalParameter"/>
29+
</rule>
30+
</ruleset>

public/index.php

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<?php
2+
/**
3+
*
4+
* @filesource index.php
5+
* @created 09.07.2017
6+
* @author Smiley <[email protected]>
7+
* @copyright 2017 Smiley
8+
* @license MIT
9+
*/
10+
11+
12+
phpinfo();
13+
14+

0 commit comments

Comments
 (0)