-
Notifications
You must be signed in to change notification settings - Fork 28
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 #91 from koriym/2016
year 2016
- Loading branch information
Showing
8 changed files
with
96 additions
and
75 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,17 +1,15 @@ | ||
sudo: false | ||
language: php | ||
|
||
php: | ||
- 5.5 | ||
- 5.6 | ||
- hhvm | ||
- 7 | ||
|
||
install: travis_retry composer install --no-interaction --prefer-source | ||
|
||
before_script: | ||
- composer self-update | ||
- composer install | ||
script: | ||
- if [ "$TRAVIS_PHP_VERSION" == "hhvm" ]; then phpunit; fi | ||
- if [ "$TRAVIS_PHP_VERSION" != "hhvm" ]; then phpunit --coverage-text --coverage-clover=coverage.clover; fi | ||
|
||
- phpunit --coverage-clover=coverage.clover | ||
after_script: | ||
- wget https://scrutinizer-ci.com/ocular.phar | ||
- if [ "$TRAVIS_PHP_VERSION" != "hhvm" ]; then php ocular.phar code-coverage:upload --format=php-clover coverage.clover; fi | ||
- wget https://scrutinizer-ci.com/ocular.phar | ||
- php ocular.phar code-coverage:upload --format=php-clover coverage.clover |
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,4 +1,4 @@ | ||
Copyright (c) 2012-2015, Akihito Koriyama <[email protected]> | ||
Copyright (c) 2012-2016, Akihito Koriyama <[email protected]> | ||
All rights reserved. | ||
|
||
Redistribution and use in source and binary forms, with or without | ||
|
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,19 +1,24 @@ | ||
<?xml version="1.0"?> | ||
<ruleset name="BEAR"> | ||
<description>The BEAR coding standard.</description> | ||
<!-- 2. General --> | ||
<ruleset> | ||
<description>The coding standard used for applications using BEAR.Sunday Framework.</description> | ||
<rule ref="Generic.NamingConventions.UpperCaseConstantName"/> | ||
<rule ref="Generic.CodeAnalysis.UnusedFunctionParameter"/> | ||
<rule ref="Generic.Strings.UnnecessaryStringConcat"/> | ||
<!-- Include the whole PSR-2 standard --> | ||
<rule ref="PSR2"> | ||
<exclude name="Generic.Files.LineLength"/> | ||
<exclude name="PSR2.Classes.PropertyDeclaration.Underscore"/> | ||
<exclude name="PSR2.Methods.MethodDeclaration.Underscore"/> | ||
</rule> | ||
<rule ref="PEAR.Commenting.FunctionComment"> | ||
<exclude name="PEAR.Commenting.FunctionComment.MissingReturn"/> | ||
<exclude name="PEAR.Commenting.FunctionComment.MissingParamComment"/> | ||
<exclude name="PEAR.Commenting.FunctionComment.SpacingBeforeTags"/> | ||
<exclude name="PEAR.Commenting.FunctionComment.MissingParamTag"/> | ||
<exclude name="PEAR.Commenting.FunctionComment.Missing"/> | ||
<exclude name="PEAR.Commenting.FunctionComment.MissingReturn"/> | ||
<exclude name="PEAR.Commenting.FunctionComment.ParameterCommentsNotAligned"/> | ||
<exclude name="PEAR.Commenting.FileComment.Missing"/> | ||
</rule> | ||
<file>src</file> | ||
<file>tests</file> | ||
</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 |
---|---|---|
@@ -1,40 +1,50 @@ | ||
<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"> | ||
<ruleset | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xmlns="http://pmd.sf.net/ruleset/1.0.0" | ||
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"> | ||
<!--codesize--> | ||
<rule ref="rulesets/codesize.xml/CyclomaticComplexity" /> | ||
<rule ref="rulesets/codesize.xml/NPathComplexity" /> | ||
<rule ref="rulesets/codesize.xml/ExcessiveClassComplexity" /> | ||
<rule ref="rulesets/codesize.xml/ExcessiveClassLength" /> | ||
<rule ref="rulesets/codesize.xml/ExcessiveMethodLength" /> | ||
<rule ref="rulesets/codesize.xml/ExcessiveParameterList" /> | ||
<rule ref="rulesets/codesize.xml/ExcessivePublicCount" /> | ||
<rule ref="rulesets/codesize.xml/TooManyFields" /> | ||
<rule ref="rulesets/codesize.xml/TooManyMethods" /> | ||
<rule ref="rulesets/codesize.xml/CyclomaticComplexity"> | ||
<properties> | ||
<property name="reportLevel" value="20"/> | ||
</properties> | ||
</rule> | ||
<rule ref="rulesets/codesize.xml/NPathComplexity"> | ||
<properties> | ||
<property name="minimum" value="200"/> | ||
</properties> | ||
</rule> | ||
<rule ref="rulesets/codesize.xml/ExcessiveClassComplexity"> | ||
<properties> | ||
<property name="maximum" value="100"/> | ||
</properties> | ||
</rule> | ||
<rule ref="rulesets/codesize.xml/ExcessiveClassLength"/> | ||
<rule ref="rulesets/codesize.xml/ExcessiveMethodLength"/> | ||
<rule ref="rulesets/codesize.xml/ExcessiveParameterList"/> | ||
<rule ref="rulesets/codesize.xml/ExcessivePublicCount"/> | ||
<rule ref="rulesets/codesize.xml/TooManyFields"/> | ||
<rule ref="rulesets/codesize.xml/TooManyMethods"/> | ||
<!--design--> | ||
<rule ref="rulesets/design.xml/EvalExpression" /> | ||
<rule ref="rulesets/design.xml/ExitExpression" /> | ||
<rule ref="rulesets/design.xml/GotoStatement" /> | ||
<rule ref="rulesets/design.xml/NumberOfChildren" /> | ||
<rule ref="rulesets/design.xml/DepthOfInheritance" /> | ||
<rule ref="rulesets/design.xml/CouplingBetweenObjects" /> | ||
<rule ref="rulesets/design.xml/EvalExpression"/> | ||
<rule ref="rulesets/design.xml/ExitExpression"/> | ||
<rule ref="rulesets/design.xml/GotoStatement" /> | ||
<rule ref="rulesets/design.xml/NumberOfChildren"/> | ||
<rule ref="rulesets/design.xml/DepthOfInheritance"/> | ||
<!-- <rule ref="rulesets/design.xml/CouplingBetweenObjects" /> --> | ||
<!--naming--> | ||
<rule ref="rulesets/naming.xml/ConstantNamingConventions" /> | ||
<rule ref="rulesets/naming.xml/BooleanGetMethodName" /> | ||
<rule ref="rulesets/naming.xml/ConstantNamingConventions"/> | ||
<rule ref="rulesets/naming.xml/BooleanGetMethodName"/> | ||
<!--unusedcode--> | ||
<rule ref="rulesets/unusedcode.xml/UnusedFormalParameter" /> | ||
<rule ref="rulesets/unusedcode.xml/UnusedLocalVariable" /> | ||
<rule ref="rulesets/unusedcode.xml/UnusedPrivateField" /> | ||
<rule ref="rulesets/unusedcode.xml/UnusedPrivateMethod" /> | ||
<rule ref="rulesets/unusedcode.xml/UnusedFormalParameter"/> | ||
<rule ref="rulesets/unusedcode.xml/UnusedLocalVariable"/> | ||
<rule ref="rulesets/unusedcode.xml/UnusedPrivateField"/> | ||
<rule ref="rulesets/unusedcode.xml/UnusedPrivateMethod"/> | ||
<!--controversial--> | ||
<rule ref="rulesets/controversial.xml/Superglobals" /> | ||
<rule ref="rulesets/controversial.xml/CamelCaseClassName" /> | ||
<rule ref="rulesets/controversial.xml/CamelCasePropertyName" /> | ||
<rule ref="rulesets/controversial.xml/CamelCaseMethodName" /> | ||
<rule ref="rulesets/controversial.xml/CamelCaseParameterName" /> | ||
<rule ref="rulesets/controversial.xml/CamelCaseVariableName" /> | ||
<rule ref="rulesets/controversial.xml/CamelCaseClassName"/> | ||
<rule ref="rulesets/controversial.xml/CamelCasePropertyName"/> | ||
<rule ref="rulesets/controversial.xml/CamelCaseMethodName"/> | ||
<!--cleancode--> | ||
<rule ref="rulesets/cleancode.xml/BooleanArgumentFlag" /> | ||
<rule ref="rulesets/cleancode.xml/ElseExpression" /> | ||
<rule ref="rulesets/cleancode.xml/BooleanArgumentFlag"/> | ||
<!-- <rule ref="rulesets/cleancode.xml/ElseExpression" /> --> | ||
</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
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 |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<?php | ||
|
||
namespace BEAR\Sunday; | ||
|
||
use Ray\Di\Di\Inject; | ||
use Ray\Di\Di\Named; | ||
|
||
class FakeApplication | ||
{ | ||
public $dir; | ||
public $id; | ||
|
||
/** | ||
* @Inject | ||
* @Named("path") | ||
*/ | ||
public function setPath($dir) | ||
{ | ||
$this->dir = $dir; | ||
} | ||
|
||
/** | ||
* @Inject | ||
* @Named("id") | ||
*/ | ||
public function setId($id) | ||
{ | ||
$this->id = $id; | ||
} | ||
} |
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