-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #25 from Airmanbzh/dev
Dev
- Loading branch information
Showing
5 changed files
with
86 additions
and
56 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 |
---|---|---|
@@ -1,7 +1,39 @@ | ||
language: php | ||
dist: trusty | ||
php: | ||
- '5.3' | ||
- '5.4' | ||
- '5.5' | ||
- '5.6' | ||
- '7.0' | ||
- '7.0' | ||
|
||
matrix: | ||
include: | ||
- php: 5.3 | ||
dist: precise | ||
|
||
before_script: | ||
## PHP_CodeSniffer | ||
- if [[ ${TRAVIS_PHP_VERSION:0:1} != "7" ]]; then pear install pear/PHP_CodeSniffer; fi | ||
- if [[ ${TRAVIS_PHP_VERSION:0:1} != "7" ]]; then phpenv rehash; fi | ||
## PHP Copy/Paste Detector | ||
- curl -o phpcpd.phar https://phar.phpunit.de/phpcpd.phar | ||
## PHP Mess Detector | ||
## - pear config-set preferred_state beta | ||
## - printf "\n" | pecl install imagick | ||
## - pear channel-discover pear.phpmd.org | ||
## - pear channel-discover pear.pdepend.org | ||
## - pear install --alldeps phpmd/PHP_PMD | ||
## - phpenv rehash | ||
## PHPLOC | ||
- curl -o phploc.phar https://phar.phpunit.de/phploc.phar | ||
|
||
script: | ||
## PHP_CodeSniffer | ||
- if [[ ${TRAVIS_PHP_VERSION:0:1} != "7" ]]; then phpcs --standard=PSR1 src/ -v; fi | ||
- if [[ ${TRAVIS_PHP_VERSION:0:1} != "7" ]]; then phpcs --standard=PSR2 src/ -v; fi | ||
## PHP Copy/Paste Detector | ||
- php phpcpd.phar --verbose src/ | ||
## PHP Mess Detector | ||
## - phpmd src/ text codesize,unusedcode,naming,design | ||
## PHPLOC | ||
- php phploc.phar src/ |
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
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
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
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 |
---|---|---|
@@ -1,13 +1,14 @@ | ||
<?php | ||
function loader($class) | ||
{ | ||
$class = explode('\\', $class); | ||
$class = array_pop($class); | ||
|
||
|
||
$file = __DIR__ . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . $class . '.php'; | ||
if (file_exists($file)) { | ||
require $file; | ||
} | ||
} | ||
<?php | ||
function loader($class) | ||
{ | ||
$class = explode('\\', $class); | ||
$class = array_pop($class); | ||
|
||
$file = __DIR__ . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . 'src' . DIRECTORY_SEPARATOR . $class . '.php'; | ||
|
||
if (file_exists($file)) { | ||
require $file; | ||
} | ||
} | ||
|
||
spl_autoload_register('loader'); |