Fix several cs #2306

Merged
merged 5 commits into from Sep 13, 2012

Conversation

Projects
None yet
3 participants
Contributor

blanchonvincent commented Sep 6, 2012

Fix several coding standard to keep new 2.0.0 more clean :)

blanchonvincent added some commits Sep 6, 2012

fix "use" and multiple spaces
fix "use" and multiple spaces
add fix cs with space after comma
add fix cs with space after comma
add space with string concatenation
add space with string concatenation
library/Zend/Mvc/Router/Console/Simple.php
// found param
$param = $params[$x];
// prevent further scanning of this param
- array_splice($params,$x,1);
+ array_splice($params, $x,1);
@Maks3w

Maks3w Sep 7, 2012

Member

space before 1

library/Zend/Mvc/Router/Console/Simple.php
@@ -570,16 +570,16 @@ public function match(Request $request, $pathOffset = null)
if ($part['short'] === true) {
// short variant
if ($part['hasValue']) {
- $regex = '/^\-'.$part['name'].'(?:\=(?<value>.*?)$)?$/';
+ $regex = '/^\-' . $part['name'].'(?:\=(?<value>.*?)$)?$/';
@Maks3w

Maks3w Sep 7, 2012

Member

spaces around .

Apply the same to the rest of the file

library/Zend/Mvc/Router/Console/Simple.php
@@ -642,7 +642,7 @@ public function match(Request $request, $pathOffset = null)
$value = $params[$x];
// prevent further scanning of this param
- array_splice($params,$x,1);
+ array_splice($params, $x,1);
@Maks3w

Maks3w Sep 7, 2012

Member

here too

library/Zend/Mvc/View/Console/RouteNotFoundStrategy.php
@@ -369,7 +369,7 @@ protected function renderTable($data, $cols, $consoleWidth)
}
if ($width >= $consoleWidth - 10) {
foreach ($data as $row) {
- $result .= join(" ",$row)."\n";
+ $result .= join(" ", $row)."\n";
@Maks3w

Maks3w Sep 7, 2012

Member

spaces around .

@Maks3w

Maks3w Sep 7, 2012

Member

apply the same to the rest of the PR

-use A\B\C,
- A\B\C\D as E;
+use A\B\C;
+use A\B\C\D as E;
@Maks3w

Maks3w Sep 7, 2012

Member

You shouldn't change nothing in Code TestAssets, could change the behavior of the tests

@blanchonvincent

blanchonvincent Sep 8, 2012

Contributor

Ok but i run tests before commit, must i undo the change ?

Contributor

blanchonvincent commented Sep 8, 2012

Maks3w, add new commit to add CS with your comment.

Contributor

blanchonvincent commented Sep 8, 2012

New fixs and fix with your comment.

fix whitespace CS
fix whitespace CS
@@ -61,7 +61,7 @@ public function __construct(XMLRPCClient $client, $namespace = '')
*/
public function __get($namespace)
{
- $namespace = ltrim("$this->namespace.$namespace", '.');
+ $namespace = ltrim("$this->namespace . $namespace", '.');
@weierophinney

weierophinney Sep 13, 2012

Owner

This is not doing what you think it's doing, and causes a test failure.

weierophinney added a commit that referenced this pull request Sep 13, 2012

[#2306] Fixed failing XmlRpc test
- CS does not apply within strings

@weierophinney weierophinney merged commit 10ee647 into zendframework:master Sep 13, 2012

1 check failed

default The Travis build failed
Details
Owner

weierophinney commented Sep 13, 2012

Fixed the XmlRpc testing issue, and merged to release and master.

@ghost ghost assigned weierophinney Sep 13, 2012

Contributor

blanchonvincent commented Sep 13, 2012

oh, don't see, sorry!

weierophinney added a commit to zendframework/zend-xmlrpc that referenced this pull request May 15, 2015

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