[CssSelector] fixed coding standards: removed useless else statements

This commit is contained in:
Pascal Borreli 2010-04-02 23:54:42 +00:00 committed by Fabien Potencier
parent 5d99cba7ab
commit 45a0d739b9
5 changed files with 20 additions and 28 deletions

View File

@ -117,11 +117,9 @@ class AttribNode implements NodeInterface
{
return '@'.$this->attrib;
}
else
{
return sprintf('@%s:%s', $this->namespace, $this->attrib);
}
}
protected function formatAttrib()
{
@ -129,9 +127,7 @@ class AttribNode implements NodeInterface
{
return $this->attrib;
}
else
{
return sprintf('%s|%s', $this->namespace, $this->attrib);
}
}
}

View File

@ -45,11 +45,9 @@ class ElementNode implements NodeInterface
{
return $this->element;
}
else
{
return sprintf('%s|%s', $this->namespace, $this->element);
}
}
public function toXpath()
{

View File

@ -208,11 +208,13 @@ class FunctionNode implements NodeInterface
{
return array(2, 1);
}
elseif ($s == 'even')
if ($s == 'even')
{
return array(2, 0);
}
elseif ($s == 'n')
if ($s == 'n')
{
return array(1, 0);
}

View File

@ -104,11 +104,9 @@ class Parser
{
return $result[0];
}
else
{
return new Node\OrNode($result);
}
}
protected function parseSelector($stream)
{

View File

@ -52,8 +52,7 @@ class TokenStream
return $this->peeked;
}
else
{
if (!count($this->tokens))
{
return null;
@ -64,7 +63,6 @@ class TokenStream
return $next;
}
}
public function peek()
{