-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 1aa57f7
Showing
10 changed files
with
194 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
.idea/ | ||
vendor/ | ||
composer.lock | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |