fixed some CS

This commit is contained in:
Fabien Potencier 2012-05-16 09:53:50 +02:00
parent 90c26a48cd
commit 8cd6cbcfc4
8 changed files with 33 additions and 16 deletions

View File

@ -226,6 +226,8 @@ class ArrayNodeDefinition extends NodeDefinition implements ParentNodeDefinition
* ->append($this->getBarNodeDefinition())
* ;
*
* @param NodeDefinition $node A NodeDefinition instance
*
* @return ArrayNodeDefinition This node
*/
public function append(NodeDefinition $node)

View File

@ -37,6 +37,8 @@ class ExprBuilder
/**
* Mark the expression as being always used.
*
* @param \Closure $then
*
* @return ExprBuilder
*/
public function always(\Closure $then = null)

View File

@ -144,6 +144,8 @@ class NodeBuilder implements NodeParentInterface
*
* @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)
{

View File

@ -53,6 +53,8 @@ abstract class NodeDefinition implements NodeParentInterface
* Sets the parent node
*
* @param NodeParentInterface $parent The parent
*
* @return NodeDefinition
*/
public function setParent(NodeParentInterface $parent)
{
@ -80,8 +82,7 @@ abstract class NodeDefinition implements NodeParentInterface
*/
public function getNode($forceRootNode = false)
{
if ($forceRootNode)
{
if ($forceRootNode) {
$this->parent = null;
}

View File

@ -39,6 +39,8 @@ class DelegatingLoader extends Loader
* @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)

View File

@ -84,11 +84,11 @@ class CssSelector
* 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)
{
@ -136,11 +136,11 @@ class CssSelector
* 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)
{
@ -177,11 +177,11 @@ class CssSelector
* 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)
{
@ -284,13 +284,13 @@ class CssSelector
* 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)
{

View File

@ -79,6 +79,8 @@ class CombinedSelectorNode implements NodeInterface
*
* @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)
{
@ -93,6 +95,8 @@ class CombinedSelectorNode implements NodeInterface
*
* @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)
{
@ -107,6 +111,8 @@ class CombinedSelectorNode implements NodeInterface
*
* @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)
{
@ -123,6 +129,8 @@ class CombinedSelectorNode implements NodeInterface
*
* @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)
{

View File

@ -109,12 +109,12 @@ class Tokenizer
* 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)
{
@ -146,11 +146,11 @@ class Tokenizer
/**
* 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)
{
@ -172,12 +172,12 @@ class Tokenizer
* 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)
{