Skip to content

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

Merged
merged 1 commit into from Aug 23, 2012

5 participants

@hhamon
Propel member
hhamon commented Aug 23, 2012

No description provided.

@travisbot

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

@staabm
Propel member
staabm commented Aug 23, 2012

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

@hhamon
Propel member
hhamon commented Aug 23, 2012

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\'');
@willdurand
Propel member
willdurand added a note Aug 23, 2012

whaaaa?

@hhamon
Propel member
hhamon added a note 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 ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@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
hhamon commented Aug 23, 2012

Welcome ;)

@staabm
Propel member
staabm commented Aug 23, 2012

Thanks!

@simon77
simon77 commented Dec 22, 2012

@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
staabm commented Dec 22, 2012

Great, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.