Fixed various PSR-2 violations thanks to Sonar Source. #299

Merged
merged 1 commit into from Aug 23, 2012

Projects

None yet

5 participants

@hhamon
Propel member

No description provided.

@travisbot

This pull request passes (merged 6d87ad2 into f86db9e).

@staabm
Propel member

@hhamon how did you get sonar to validate against psr-2?

@hhamon
Propel member

The new version of PHP_CodeSniffer now embeds a PSR1 and PSR2 ruleset file.

Look at the repository: https://github.com/squizlabs/PHP_CodeSniffer

@willdurand willdurand commented on the diff Aug 23, 2012
...Runtime/ActiveQuery/Criterion/CustomCriterionTest.php
@@ -24,7 +24,7 @@ class CustomCriterionTest extends BaseTestCase
{
public function testAppendPsToConcatenatesTheValue()
{
- $cton = new CustomCriterion(new Criteria(), 'A.COL', 'date_part(\'YYYY\', A.COL) = \'2007\'');
+ $cton = new CustomCriterion(new Criteria(), 'date_part(\'YYYY\', A.COL) = \'2007\'');
@hhamon
hhamon Aug 23, 2012

I removed this second argument from the constructor as it's not used in the constructor anywhere. The constructor signature changed and I have affected the code change everywhere ;)

@willdurand willdurand merged commit 99e125e into propelorm:master Aug 23, 2012

1 check passed

Details default The Travis build passed
@willdurand
Propel member

Great! Thank you Hugo.

@hhamon
Propel member

Welcome ;)

@staabm
Propel member

Thanks!

@simon77

@staabm I have written a blog that has the instructions for getting sonar to work with the PSR-1 and PSR-2 standards from codesniffer. http://gomadtech.wordpress.com/2012/12/21/sonar-psr-profiles/ Hope that helps.

@staabm
Propel member

Great, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment