Skip to content

Commit

Permalink
first commit
Browse files Browse the repository at this point in the history
  • Loading branch information
mosbth committed Oct 11, 2018
0 parents commit 0be7c44
Show file tree
Hide file tree
Showing 31 changed files with 2,936 additions and 0 deletions.
45 changes: 45 additions & 0 deletions .circleci/config.yml
@@ -0,0 +1,45 @@
version: 2
jobs:
build:
docker:
# specify the version you desire here
#- image: circleci/php:7.1.5-browsers
- image: anax/dev

# Specify service dependencies here if necessary
# CircleCI maintains a library of pre-built images
# documented at https://circleci.com/docs/2.0/circleci-images/
# - image: circleci/mysql:9.4

working_directory: ~/repo

steps:
- checkout

# Download and cache dependencies
- restore_cache:
keys:
- v1-dependencies-{{ checksum "composer.json" }}
# fallback to using the latest cache if no exact match
# is found
- v1-dependencies-

#- run: composer install -n --prefer-dist
- run: make install

- save_cache:
paths:
- ./vendor
key: v1-dependencies-{{ checksum "composer.json" }}

- run: make check
- run: make test



notify:
webhooks:
# canax
- url: https://webhooks.gitter.im/e/c8ff44f50de935adf880
# canax/page
- url: https://webhooks.gitter.im/e/bc3b7bdf43289a6bb91d
5 changes: 5 additions & 0 deletions .gitignore
@@ -0,0 +1,5 @@
/.bin
/build
/vendor
memory::
composer.lock
19 changes: 19 additions & 0 deletions .phpcs.xml
@@ -0,0 +1,19 @@
<?xml version="1.0"?>
<ruleset name="PHPCS rule set">
<description>Custom rule set.</description>

<file>.</file>

<exclude-pattern>.bin</exclude-pattern>
<exclude-pattern>build</exclude-pattern>
<exclude-pattern>cache</exclude-pattern>
<exclude-pattern>doc</exclude-pattern>
<exclude-pattern>htdocs</exclude-pattern>
<exclude-pattern>test/config.php</exclude-pattern>
<exclude-pattern>vendor</exclude-pattern>

<arg name="encoding" value="utf-8"/>
<arg name="warning-severity" value="0"/>

<rule ref="PSR2" />
</ruleset>
13 changes: 13 additions & 0 deletions .phpdoc.xml
@@ -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>
42 changes: 42 additions & 0 deletions .phpmd.xml
@@ -0,0 +1,42 @@
<?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>
<exclude-pattern>htdocs</exclude-pattern>
<exclude-pattern>cache</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,di" />
</properties>
</rule>

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

</ruleset>
23 changes: 23 additions & 0 deletions .phpunit.xml
@@ -0,0 +1,23 @@
<?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">config</directory>
<directory suffix=".php">src</directory>
</whitelist>
</filter>

<logging>
<log type="coverage-html" target="build/coverage" lowUpperBound="35" highLowerBound="70" />
<log type="coverage-clover" target="build/coverage.clover" />
</logging>

</phpunit>
23 changes: 23 additions & 0 deletions .scrutinizer.yml
@@ -0,0 +1,23 @@
imports:
- php

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

build:

# dependencies:
# before:
# -
# command: "mkdir build"
# after:
# - "composer require --dev phpunit/phpunit"

tests:
override:
-
#command: "vendor/bin/phpunit --configuration .phpunit.xml"
command: "make phpunit"
coverage:
file: "build/coverage.clover"
format: "php-clover"
53 changes: 53 additions & 0 deletions .travis.yml
@@ -0,0 +1,53 @@
language: php

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



matrix:
allow_failures:
- php: nightly
- php: hhvm



sudo: false



git:
submodules: false



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



before_script:
- make install check


script:
- make test



notifications:
irc: "irc.freenode.org#dbwebb"
urls:
- https://webhooks.gitter.im/e/6067b703887eb5d1e1cd
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
34 changes: 34 additions & 0 deletions CONTRIBUTING.md
@@ -0,0 +1,34 @@
How to Contribute to Anax
=================================



Talk with users and developers
---------------------------------

Chat with developers and users on the organisation on [Gitter Anax](https://gitter.im/canax).



Report bugs, questions, other issues?
---------------------------------

Use GitHub issues and make best effort to explain and provide details.

Feel free to help answering issues.



Create pull request
---------------------------------

Explain what you did and why, reference the issue, if any. There should be an issue prior to a pull request.

Ensure it passes the tests and CI-chain.



Acknowledge the license
---------------------------------

Everything you supply will be within the same license the repo uses.
21 changes: 21 additions & 0 deletions LICENSE.txt
@@ -0,0 +1,21 @@
The MIT License (MIT)

Copyright (c) 2013 - 2018 Mikael Roos (mos@dbwebb.se)

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.

0 comments on commit 0be7c44

Please sign in to comment.