Skip to content

Commit

Permalink
prepare to tag
Browse files Browse the repository at this point in the history
  • Loading branch information
mosbth committed May 4, 2017
0 parents commit 41d80da
Show file tree
Hide file tree
Showing 20 changed files with 849 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
/.bin
/build
/vendor
27 changes: 27 additions & 0 deletions .phpcs.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<?xml version="1.0"?>
<ruleset name="PHPCS rule set">
<description>Custom rule set.</description>

<file>src</file>
<file>test</file>

<exclude-pattern>*.tpl.*</exclude-pattern>
<exclude-pattern>test/config.php</exclude-pattern>

<!--
<arg name="encoding" value="utf-8"/>
<arg name="show_warnings" value="1"/>
<arg name="colors" value="1"/>
<arg name="tab_width" value="4"/>
-->
<!--<arg name="extensions" value=".php"/>-->
<!--<arg name="warning-severity" value="5"/>-->

<rule ref="PSR2">
<!--
<exclude name="PSR1.Classes.ClassDeclaration.MissingNamespace" /> <exclude name="Squiz.Commenting.FileComment" />
<exclude name="Squiz.ControlStructures.ControlSignature.NewlineAfterOpenBrace" />
-->
</rule>
</ruleset>
13 changes: 13 additions & 0 deletions .phpdoc.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8" ?>
<phpdoc>
<title>Anax API Documentation</title>
<parser>
<target>doc/api</target>
</parser>
<transformer>
<target>doc/api</target>
</transformer>
<files>
<directory>src</directory>
</files>
</phpdoc>
40 changes: 40 additions & 0 deletions .phpmd.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
<?xml version="1.0"?>
<ruleset name="PHPMD rule set"
xmlns="http://pmd.sf.net/ruleset/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://pmd.sf.net/ruleset/1.0.0
http://pmd.sf.net/ruleset_xml_schema.xsd"
xsi:noNamespaceSchemaLocation="
http://pmd.sf.net/ruleset_xml_schema.xsd">
<description>
Custom rule set for htmlphp course.
</description>

<exclude-pattern>vendor</exclude-pattern>

<rule ref="rulesets/cleancode.xml">
<exclude name="BooleanArgumentFlag" />
<exclude name="ElseExpression" />
</rule>

<rule ref="rulesets/codesize.xml" />

<rule ref="rulesets/controversial.xml">
<exclude name="Superglobals" />
</rule>

<rule ref="rulesets/design.xml" />

<rule ref="rulesets/naming.xml">
<exclude name="ShortVariable" />
</rule>

<rule ref="rulesets/naming.xml/ShortVariable">
<properties>
<property name="exceptions" value="i,j,db,id" />
</properties>
</rule>

<rule ref="rulesets/unusedcode.xml" />

</ruleset>
22 changes: 22 additions & 0 deletions .phpunit.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?xml version="1.0" encoding="UTF-8" ?>
<phpunit
bootstrap="test/config.php">

<testsuites>
<testsuite name="all">
<directory>test</directory>
</testsuite>
</testsuites>

<filter>
<whitelist processUncoveredFilesFromWhitelist="true">
<directory suffix=".php">src</directory>
</whitelist>
</filter>

<logging>
<log type="coverage-html" target="build/coverage" charset="UTF-8" highlight="true" lowUpperBound="35" highLowerBound="70" />
<log type="coverage-clover" target="build/coverage.clover" />
</logging>

</phpunit>
20 changes: 20 additions & 0 deletions .scrutinizer.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
imports:
- php

filter:
excluded_paths: [vendor/*, test/*]

build:

dependencies:
before:
-
command: "mkdir build"

tests:
override:
-
command: "phpunit --configuration .phpunit.xml"
coverage:
file: "build/coverage.clover"
format: "php-clover"
55 changes: 55 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
language: php

php:
- 5.6
- "7.0"
- "7.1"
- hhvm
- nightly



sudo: false



git:
submodules: false



addons:
apt:
packages:
#- php-codesniffer
#- phpmd
#- shellcheck



matrix:
allow_failures:
- php: "7.0"
- php: "7.1"
- php: nightly
- php: hhvm



before_script:
- make install


script:
- make check
- make test



notifications:
irc: "irc.freenode.org#dbwebb"
urls:
- https://webhooks.gitter.im/e/6e4660b0024de67de0af
on_success: change # options: [always|never|change] default: always
on_failure: always # options: [always|never|change] default: always
on_start: never # options: [always|never|change] default: always
21 changes: 21 additions & 0 deletions LICENSE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
The MIT License (MIT)

Copyright (c) 2013 - 2017 Mikael Roos ([email protected])

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
Loading

0 comments on commit 41d80da

Please sign in to comment.