Skip to content

Commit

Permalink
fixed some CS
Browse files Browse the repository at this point in the history
  • Loading branch information
fabpot committed May 16, 2012
1 parent 90c26a4 commit 8cd6cbc
Show file tree
Hide file tree
Showing 8 changed files with 33 additions and 16 deletions.
Expand Up @@ -226,6 +226,8 @@ public function ignoreExtraKeys()
* ->append($this->getBarNodeDefinition())
* ;
*
* @param NodeDefinition $node A NodeDefinition instance
*
* @return ArrayNodeDefinition This node
*/
public function append(NodeDefinition $node)
Expand Down
Expand Up @@ -37,6 +37,8 @@ public function __construct(NodeDefinition $node)
/**
* Mark the expression as being always used.
*
* @param \Closure $then
*
* @return ExprBuilder
*/
public function always(\Closure $then = null)
Expand Down
Expand Up @@ -144,6 +144,8 @@ public function node($name, $type)
*
* @param string $type The name of the type
* @param string $class The fully qualified name the node definition class
*
* @return NodeBuilder This node builder
*/
public function setNodeClass($type, $class)
{
Expand Down
Expand Up @@ -53,6 +53,8 @@ public function __construct($name, NodeParentInterface $parent = null)
* Sets the parent node
*
* @param NodeParentInterface $parent The parent
*
* @return NodeDefinition
*/
public function setParent(NodeParentInterface $parent)
{
Expand Down Expand Up @@ -80,8 +82,7 @@ public function end()
*/
public function getNode($forceRootNode = false)
{
if ($forceRootNode)
{
if ($forceRootNode) {
$this->parent = null;
}

Expand Down
2 changes: 2 additions & 0 deletions src/Symfony/Component/Config/Loader/DelegatingLoader.php
Expand Up @@ -39,6 +39,8 @@ public function __construct(LoaderResolverInterface $resolver)
* @param mixed $resource A resource
* @param string $type The resource type
*
* @return mixed
*
* @throws FileLoaderLoadException if no loader is found.
*/
public function load($resource, $type = null)
Expand Down
16 changes: 8 additions & 8 deletions src/Symfony/Component/CssSelector/CssSelector.php
Expand Up @@ -84,11 +84,11 @@ static public function toXPath($cssExpr, $prefix = 'descendant-or-self::')
* Parses an expression and returns the Node object that represents
* the parsed expression.
*
* @throws \Exception When tokenizer throws it while parsing
*
* @param string $string The expression to parse
*
* @return Node\NodeInterface
*
* @throws \Exception When tokenizer throws it while parsing
*/
public function parse($string)
{
Expand Down Expand Up @@ -136,11 +136,11 @@ private function parseSelectorGroup($stream)
* Parses a selector contained in $stream and returns the Node
* object that represents it.
*
* @throws ParseException When expected selector but got something else
*
* @param TokenStream $stream The stream containing the selector.
*
* @return Node\NodeInterface
*
* @throws ParseException When expected selector but got something else
*/
private function parseSelector($stream)
{
Expand Down Expand Up @@ -177,11 +177,11 @@ private function parseSelector($stream)
* Parses a simple selector (the current token) from $stream and returns
* the resulting Node object.
*
* @throws ParseException When expected symbol but got something else
*
* @param TokenStream $stream The stream containing the selector.
*
* @return Node\NodeInterface
*
* @throws ParseException When expected symbol but got something else
*/
private function parseSimpleSelector($stream)
{
Expand Down Expand Up @@ -284,13 +284,13 @@ private function parseSimpleSelector($stream)
* Parses an attribute from a selector contained in $stream and returns
* the resulting AttribNode object.
*
* @throws ParseException When encountered unexpected selector
*
* @param Node\NodeInterface $selector The selector object whose attribute
* is to be parsed.
* @param TokenStream $stream The container token stream.
*
* @return Node\AttribNode
*
* @throws ParseException When encountered unexpected selector
*/
private function parseAttrib($selector, $stream)
{
Expand Down
Expand Up @@ -79,6 +79,8 @@ public function toXpath()
*
* @param XPathExpr $xpath The XPath expression for this object
* @param NodeInterface $sub The NodeInterface object to add
*
* @return XPathExpr An XPath instance
*/
protected function _xpath_descendant($xpath, $sub)
{
Expand All @@ -93,6 +95,8 @@ protected function _xpath_descendant($xpath, $sub)
*
* @param XPathExpr $xpath The parent XPath expression
* @param NodeInterface $sub The NodeInterface object to add
*
* @return XPathExpr An XPath instance
*/
protected function _xpath_child($xpath, $sub)
{
Expand All @@ -107,6 +111,8 @@ protected function _xpath_child($xpath, $sub)
*
* @param XPathExpr $xpath The parent XPath expression
* @param NodeInterface $sub The adjacent XPath expression
*
* @return XPathExpr An XPath instance
*/
protected function _xpath_direct_adjacent($xpath, $sub)
{
Expand All @@ -123,6 +129,8 @@ protected function _xpath_direct_adjacent($xpath, $sub)
*
* @param XPathExpr $xpath The parent XPath expression
* @param NodeInterface $sub The indirect adjacent NodeInterface object
*
* @return XPathExpr An XPath instance
*/
protected function _xpath_indirect_adjacent($xpath, $sub)
{
Expand Down
12 changes: 6 additions & 6 deletions src/Symfony/Component/CssSelector/Tokenizer.php
Expand Up @@ -109,12 +109,12 @@ public function tokenize($s)
* and returns an array holding the unquoted string contained by $s and
* the new position from which tokenizing should take over.
*
* @throws ParseException When expected closing is not found
*
* @param string $s The selector string containing the quoted string.
* @param integer $pos The starting position for the quoted string.
*
* @return array
*
* @throws ParseException When expected closing is not found
*/
private function tokenizeEscapedString($s, $pos)
{
Expand Down Expand Up @@ -146,11 +146,11 @@ private function tokenizeEscapedString($s, $pos)
/**
* Unescapes a string literal and returns the unescaped string.
*
* @throws ParseException When invalid escape sequence is found
*
* @param string $literal The string literal to unescape.
*
* @return string
*
* @throws ParseException When invalid escape sequence is found
*/
private function unescapeStringLiteral($literal)
{
Expand All @@ -172,12 +172,12 @@ private function unescapeStringLiteral($literal)
* contained in it and the new position from which tokenizing should take
* over.
*
* @throws ParseException When Unexpected symbol is found
*
* @param string $s The selector string.
* @param integer $pos The position in $s at which the symbol starts.
*
* @return array
*
* @throws ParseException When Unexpected symbol is found
*/
private function tokenizeSymbol($s, $pos)
{
Expand Down

0 comments on commit 8cd6cbc

Please sign in to comment.