Skip to content

Commit

Permalink
inital commit
Browse files Browse the repository at this point in the history
  • Loading branch information
[email protected] committed Aug 29, 2016
0 parents commit 1aa57f7
Show file tree
Hide file tree
Showing 10 changed files with 194 additions and 0 deletions.
19 changes: 19 additions & 0 deletions .codeclimate.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
engines:
duplication:
enabled: true
config:
languages:
- php
fixme:
enabled: true
phpmd:
enabled: true
config:
file_extensions: "php"
rulesets: "unusedcode,codesize,controversial,design,cleancode,phpmd-ruleset.xml"
ratings:
paths:
- "**.inc"
- "**.php"
exclude_paths:
- tests/
9 changes: 9 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/tests export-ignore
.gitattributes export-ignore
.gitignore export-ignore
.travis.yml export-ignore
phpunit.xml export-ignore
.codeclimate.yml export-ignore
.travis_after_success.sh export-ignore
phpmd-ruleset.xml export-ignore
phpdoc.xml export-ignore
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.idea/
vendor/
composer.lock

26 changes: 26 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
sudo: false
language: php
php:
- 5.6
- 7.0
branches:
only:
- master
cache:
directories:
- "$HOME/.composer/cache/files"
install:
- mv /home/travis/.phpenv/versions/$(phpenv version-name)/etc/conf.d/xdebug.ini ~/xdebug.ini
before_script:
- composer install --no-interaction --prefer-dist --no-progress --quiet
- mv ~/xdebug.ini /home/travis/.phpenv/versions/$(phpenv version-name)/etc/conf.d/xdebug.ini
script:
- phpunit --coverage-clover build/logs/clover.xml
after_script:
- vendor/bin/test-reporter
addons:
code_climate:
repo_token: "$CODECLIMATE_TOKEN"
apt:
packages:
- graphviz
21 changes: 21 additions & 0 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2016 SARE SA

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.
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# SAREhub PHP Component Worker
[![Coding Standards](https://img.shields.io/badge/cs-PSR--2--R-yellow.svg)](https://github.com/php-fig-rectified/fig-rectified-standards)
*
* Home Page [here](https://sarehub.github.io/php_component_worker/)
* PHPDOC [here](https://sarehub.github.io/php_component_worker/docs/master)

### How do I get set up? ###
```
composer require sarehub/component_worker
```
25 changes: 25 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"name": "sarehub/component_worker",
"description": "utility staff for create/manage worker processes",
"license": "MIT",
"authors": [
{
"name": "Andrzej Wasiak",
"email": "[email protected]"
}
],
"require-dev": {
"phpunit/phpunit": "5.4.*",
"codeclimate/php-test-reporter": "dev-master",
"fig-r/psr2r-sniffer": "0.*",
"phpdocumentor/phpdocumentor": "2.9.*"
},
"require": {
"php": "^5.6 || ^7.0"
},
"autoload": {
"psr-4": {
"SAREhub\\": "src/SAREhub"
}
}
}
31 changes: 31 additions & 0 deletions phpdoc.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpdoc>
<title>SAREhub PHP Component Worker</title>
<parser>
<target>build/docs</target>
<encoding>utf8</encoding>
<markers>
<item>TODO</item>
</markers>
<visibility>public,protected</visibility>
<extensions>
<extension>php</extension>
</extensions>
</parser>
<transformer>
<target>build/docs</target>
</transformer>
<transformations>
<template name="clean"/>
</transformations>
<files>
<directory>src</directory>
</files>
<logging>
<level>err</level>
<paths>
<default>build/log/{DATE}.log</default>
<errors>build/log/{DATE}.errors.log</errors>
</paths>
</logging>
</phpdoc>
24 changes: 24 additions & 0 deletions phpmd-ruleset.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<?xml version="1.0"?>
<ruleset name="SAREhub PHPMD custom ruleset" 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>SAREhub PHPMD custom ruleset</description>

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

<rule ref="rulesets/naming.xml/ShortVariable">
<properties>
<property name="minimum" value="2"/>
</properties>
</rule>

<rule ref="rulesets/naming.xml/LongVariable">
<properties>
<property name="maximum" value="35"/>
</properties>
</rule>
</ruleset>
25 changes: 25 additions & 0 deletions phpunit.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>

<phpunit backupGlobals="false"
backupStaticAttributes="false"
bootstrap="vendor/autoload.php"
colors="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
processIsolation="false"
stopOnFailure="false"
syntaxCheck="false"
>
<testsuites>
<testsuite name="Component Worker">
<directory suffix="Test.php">./unit/tests/</directory>
</testsuite>
</testsuites>

<filter>
<whitelist>
<directory>./src/</directory>
</whitelist>
</filter>
</phpunit>

0 comments on commit 1aa57f7

Please sign in to comment.