+ */
+class ValidationBuilder
+{
+ public $parent;
+ public $rules;
+
+ /**
+ * Constructor
+ *
+ * @param Symfony\Component\Config\Definition\Builder\NodeBuilder $parent
+ */
+ public function __construct($parent)
+ {
+ $this->parent = $parent;
+
+ $this->rules = array();
+ }
+
+ /**
+ * Registers a closure to run as normalization or an expression builder to build it if null is provided.
+ *
+ * @param \Closure $closure
+ *
+ * @return Symfony\Component\Config\Definition\Builder\ExprBuilder|Symfony\Component\Config\Definition\Builder\ValidationBuilder
+ */
+ public function rule(\Closure $closure = null)
+ {
+ if (null !== $closure) {
+ $this->rules[] = $closure;
+
+ return $this;
+ }
+
+ return $this->rules[] = new ExprBuilder($this->parent);
+ }
}
\ No newline at end of file
diff --git a/src/Symfony/Component/CssSelector/Node/CombinedSelectorNode.php b/src/Symfony/Component/CssSelector/Node/CombinedSelectorNode.php
index 80e88e130a51f..428c1e1adc62b 100644
--- a/src/Symfony/Component/CssSelector/Node/CombinedSelectorNode.php
+++ b/src/Symfony/Component/CssSelector/Node/CombinedSelectorNode.php
@@ -23,7 +23,7 @@
*/
class CombinedSelectorNode implements NodeInterface
{
- static protected $_method_mapping = array(
+ static protected $methodMapping = array(
' ' => 'descendant',
'>' => 'child',
'+' => 'direct_adjacent',
@@ -64,11 +64,11 @@ public function __toString()
*/
public function toXpath()
{
- if (!isset(self::$_method_mapping[$this->combinator])) {
+ if (!isset(self::$methodMapping[$this->combinator])) {
throw new SyntaxError(sprintf('Unknown combinator: %s', $this->combinator));
}
- $method = '_xpath_'.self::$_method_mapping[$this->combinator];
+ $method = '_xpath_'.self::$methodMapping[$this->combinator];
$path = $this->selector->toXpath();
return $this->$method($path, $this->subselector);
diff --git a/src/Symfony/Component/CssSelector/Node/FunctionNode.php b/src/Symfony/Component/CssSelector/Node/FunctionNode.php
index 8de049672d80e..e666e33fae5f3 100644
--- a/src/Symfony/Component/CssSelector/Node/FunctionNode.php
+++ b/src/Symfony/Component/CssSelector/Node/FunctionNode.php
@@ -61,7 +61,7 @@ public function __toString()
*/
public function toXpath()
{
- $sel_path = $this->selector->toXpath();
+ $selPath = $this->selector->toXpath();
if (in_array($this->name, self::$unsupported)) {
throw new SyntaxError(sprintf('The pseudo-class %s is not supported', $this->name));
}
@@ -70,7 +70,7 @@ public function toXpath()
throw new SyntaxError(sprintf('The pseudo-class %s is unknown', $this->name));
}
- return $this->$method($sel_path, $this->expr);
+ return $this->$method($selPath, $this->expr);
}
/**
@@ -113,13 +113,13 @@ protected function _xpath_nth_child($xpath, $expr, $last = false, $addNameTest =
}
if ($b > 0) {
- $b_neg = -$b;
+ $bNeg = -$b;
} else {
- $b_neg = sprintf('+%s', -$b);
+ $bNeg = sprintf('+%s', -$b);
}
if ($a != 1) {
- $expr = array(sprintf('(position() %s) mod %s = 0', $b_neg, $a));
+ $expr = array(sprintf('(position() %s) mod %s = 0', $bNeg, $a));
} else {
$expr = array();
}
diff --git a/src/Symfony/Component/CssSelector/Node/PseudoNode.php b/src/Symfony/Component/CssSelector/Node/PseudoNode.php
index d0d9166ca4283..462a57b97c217 100644
--- a/src/Symfony/Component/CssSelector/Node/PseudoNode.php
+++ b/src/Symfony/Component/CssSelector/Node/PseudoNode.php
@@ -67,7 +67,7 @@ public function __toString()
*/
public function toXpath()
{
- $el_xpath = $this->element->toXpath();
+ $elXpath = $this->element->toXpath();
if (in_array($this->ident, self::$unsupported)) {
throw new SyntaxError(sprintf('The pseudo-class %s is unsupported', $this->ident));
@@ -77,7 +77,7 @@ public function toXpath()
throw new SyntaxError(sprintf('The pseudo-class %s is unknown', $this->ident));
}
- return $this->$method($el_xpath);
+ return $this->$method($elXpath);
}
/**
diff --git a/src/Symfony/Component/CssSelector/Parser.php b/src/Symfony/Component/CssSelector/Parser.php
index 612e556d2607b..baf266c2bbd48 100644
--- a/src/Symfony/Component/CssSelector/Parser.php
+++ b/src/Symfony/Component/CssSelector/Parser.php
@@ -147,12 +147,12 @@ protected function parseSelector($stream)
$combinator = ' ';
}
$consumed = count($stream->getUsed());
- $next_selector = $this->parseSimpleSelector($stream);
+ $nextSelector = $this->parseSimpleSelector($stream);
if ($consumed == count($stream->getUsed())) {
throw new SyntaxError(sprintf("Expected selector, got '%s'", $stream->peek()));
}
- $result = new Node\CombinedSelectorNode($result, $combinator, $next_selector);
+ $result = new Node\CombinedSelectorNode($result, $combinator, $nextSelector);
}
return $result;
@@ -193,11 +193,11 @@ protected function parseSimpleSelector($stream)
}
$result = new Node\ElementNode($namespace, $element);
- $has_hash = false;
+ $hasHash = false;
while (true) {
$peek = $stream->peek();
if ('#' == $peek) {
- if ($has_hash) {
+ if ($hasHash) {
/* You can't have two hashes
(FIXME: is there some more general rule I'm missing?) */
// @codeCoverageIgnoreStart
@@ -206,7 +206,7 @@ protected function parseSimpleSelector($stream)
}
$stream->next();
$result = new Node\HashNode($result, $stream->next());
- $has_hash = true;
+ $hasHash = true;
continue;
} elseif ('.' == $peek) {
diff --git a/src/Symfony/Component/CssSelector/Tokenizer.php b/src/Symfony/Component/CssSelector/Tokenizer.php
index 0fea426f19d2b..30f6294e6390d 100644
--- a/src/Symfony/Component/CssSelector/Tokenizer.php
+++ b/src/Symfony/Component/CssSelector/Tokenizer.php
@@ -42,10 +42,10 @@ public function tokenize($s)
while (true) {
if (preg_match('#\s+#A', $s, $match, 0, $pos)) {
- $preceding_whitespace_pos = $pos;
+ $precedingWhitespacePos = $pos;
$pos += strlen($match[0]);
} else {
- $preceding_whitespace_pos = 0;
+ $precedingWhitespacePos = 0;
}
if ($pos >= strlen($s)) {
@@ -74,8 +74,8 @@ public function tokenize($s)
}
if (in_array($c, array('>', '+', '~', ',', '.', '*', '=', '[', ']', '(', ')', '|', ':', '#'))) {
- if (in_array($c, array('.', '#', '[')) && $preceding_whitespace_pos > 0) {
- $tokens[] = new Token('Token', ' ', $preceding_whitespace_pos);
+ if (in_array($c, array('.', '#', '[')) && $precedingWhitespacePos > 0) {
+ $tokens[] = new Token('Token', ' ', $precedingWhitespacePos);
}
$tokens[] = new Token('Token', $c, $pos);
++$pos;
@@ -85,18 +85,18 @@ public function tokenize($s)
if ('"' === $c || "'" === $c) {
// Quoted string
- $old_pos = $pos;
+ $oldPos = $pos;
list($sym, $pos) = $this->tokenizeEscapedString($s, $pos);
- $tokens[] = new Token('String', $sym, $old_pos);
+ $tokens[] = new Token('String', $sym, $oldPos);
continue;
}
- $old_pos = $pos;
+ $oldPos = $pos;
list($sym, $pos) = $this->tokenizeSymbol($s, $pos);
- $tokens[] = new Token('Symbol', $sym, $old_pos);
+ $tokens[] = new Token('Symbol', $sym, $oldPos);
continue;
}
diff --git a/src/Symfony/Component/DependencyInjection/Compiler/ResolveReferencesToAliasesPass.php b/src/Symfony/Component/DependencyInjection/Compiler/ResolveReferencesToAliasesPass.php
index a2bd3f6add794..e307d553f4098 100644
--- a/src/Symfony/Component/DependencyInjection/Compiler/ResolveReferencesToAliasesPass.php
+++ b/src/Symfony/Component/DependencyInjection/Compiler/ResolveReferencesToAliasesPass.php
@@ -33,8 +33,7 @@ public function process(ContainerBuilder $container)
{
$this->container = $container;
- foreach ($container->getDefinitions() as $definition)
- {
+ foreach ($container->getDefinitions() as $definition) {
if ($definition->isSynthetic() || $definition->isAbstract()) {
continue;
}
@@ -62,7 +61,7 @@ protected function processArguments(array $arguments)
foreach ($arguments as $k => $argument) {
if (is_array($argument)) {
$arguments[$k] = $this->processArguments($argument);
- } else if ($argument instanceof Reference) {
+ } elseif ($argument instanceof Reference) {
$defId = $this->getDefinitionId($id = (string) $argument);
if ($defId !== $id) {
diff --git a/src/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php b/src/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php
index 1442f4f43ce8e..fae9700a9fd8a 100644
--- a/src/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php
+++ b/src/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php
@@ -1094,19 +1094,16 @@ protected function getNextVariableName()
$nonFirstChars = self::NON_FIRST_CHARS;
$nonFirstCharsLength = strlen($nonFirstChars);
- while (true)
- {
+ while (true) {
$name = '';
$i = $this->variableCount;
- if ('' === $name)
- {
+ if ('' === $name) {
$name .= $firstChars[$i%$firstCharsLength];
$i = intval($i/$firstCharsLength);
}
- while ($i > 0)
- {
+ while ($i > 0) {
$i -= 1;
$name .= $nonFirstChars[$i%$nonFirstCharsLength];
$i = intval($i/$nonFirstCharsLength);
diff --git a/src/Symfony/Component/DependencyInjection/Dumper/XmlDumper.php b/src/Symfony/Component/DependencyInjection/Dumper/XmlDumper.php
index c095769052b84..de27bf932cc39 100644
--- a/src/Symfony/Component/DependencyInjection/Dumper/XmlDumper.php
+++ b/src/Symfony/Component/DependencyInjection/Dumper/XmlDumper.php
@@ -150,13 +150,13 @@ protected function addService($definition, $id, \DOMElement $parent)
$service->setAttribute('class', $definition->getClass());
}
if ($definition->getFactoryMethod()) {
- $service->setAttribute ('factory-method', $definition->getFactoryMethod());
+ $service->setAttribute('factory-method', $definition->getFactoryMethod());
}
if ($definition->getFactoryService()) {
- $service->setAttribute ('factory-service', $definition->getFactoryService());
+ $service->setAttribute('factory-service', $definition->getFactoryService());
}
if (ContainerInterface::SCOPE_CONTAINER !== $scope = $definition->getScope()) {
- $service->setAttribute ('scope', $scope);
+ $service->setAttribute('scope', $scope);
}
foreach ($definition->getTags() as $name => $tags) {
diff --git a/src/Symfony/Component/DependencyInjection/Scope.php b/src/Symfony/Component/DependencyInjection/Scope.php
index fd43751ebe6a3..1af4e2834e3a3 100644
--- a/src/Symfony/Component/DependencyInjection/Scope.php
+++ b/src/Symfony/Component/DependencyInjection/Scope.php
@@ -1,30 +1,30 @@
-
- */
-class Scope implements ScopeInterface
-{
- protected $name;
- protected $parentName;
-
- public function __construct($name, $parentName = ContainerInterface::SCOPE_CONTAINER)
- {
- $this->name = $name;
- $this->parentName = $parentName;
- }
-
- public function getName()
- {
- return $this->name;
- }
-
- public function getParentName()
- {
- return $this->parentName;
- }
+
+ */
+class Scope implements ScopeInterface
+{
+ protected $name;
+ protected $parentName;
+
+ public function __construct($name, $parentName = ContainerInterface::SCOPE_CONTAINER)
+ {
+ $this->name = $name;
+ $this->parentName = $parentName;
+ }
+
+ public function getName()
+ {
+ return $this->name;
+ }
+
+ public function getParentName()
+ {
+ return $this->parentName;
+ }
}
\ No newline at end of file
diff --git a/src/Symfony/Component/DependencyInjection/ScopeInterface.php b/src/Symfony/Component/DependencyInjection/ScopeInterface.php
index 59a893c9b6f53..b0f2911f677ed 100644
--- a/src/Symfony/Component/DependencyInjection/ScopeInterface.php
+++ b/src/Symfony/Component/DependencyInjection/ScopeInterface.php
@@ -1,14 +1,14 @@
-
- */
-interface ScopeInterface
-{
- function getName();
- function getParentName();
+
+ */
+interface ScopeInterface
+{
+ function getName();
+ function getParentName();
}
\ No newline at end of file
diff --git a/src/Symfony/Component/DomCrawler/Crawler.php b/src/Symfony/Component/DomCrawler/Crawler.php
index 9918a5026dbc5..f8a7b27dd903c 100644
--- a/src/Symfony/Component/DomCrawler/Crawler.php
+++ b/src/Symfony/Component/DomCrawler/Crawler.php
@@ -592,7 +592,7 @@ protected function sibling($node, $siblingDir = 'nextSibling')
if ($node !== $this->getNode(0) && $node->nodeType === 1) {
$nodes[] = $node;
}
- } while($node = $node->$siblingDir);
+ } while ($node = $node->$siblingDir);
return $nodes;
}
diff --git a/src/Symfony/Component/Form/FieldFactory/EntityFieldFactoryGuesser.php b/src/Symfony/Component/Form/FieldFactory/EntityFieldFactoryGuesser.php
index 3e716d6a9c87b..8dd25fd7fbe69 100644
--- a/src/Symfony/Component/Form/FieldFactory/EntityFieldFactoryGuesser.php
+++ b/src/Symfony/Component/Form/FieldFactory/EntityFieldFactoryGuesser.php
@@ -37,9 +37,9 @@ public function __construct(EntityManager $em)
}
/**
- * Returns whether Doctrine 2 metadata exists for that class
- *
- * @return boolean
+ * Returns whether Doctrine 2 metadata exists for that class
+ *
+ * @return boolean
*/
protected function isMappedClass($class)
{
@@ -59,7 +59,7 @@ public function guessClass($class, $property)
$mapping = $metadata->getAssociationMapping($property);
return new FieldFactoryClassGuess(
- 'Symfony\Component\Form\EntityChoiceField',
+ 'Symfony\Component\Form\EntityChoiceField',
array(
'em' => $this->em,
'class' => $mapping['targetEntity'],
@@ -72,13 +72,13 @@ public function guessClass($class, $property)
{
// case 'array':
// return new FieldFactoryClassGuess(
- // 'Symfony\Component\Form\CollectionField',
+ // 'Symfony\Component\Form\CollectionField',
// array(),
// FieldFactoryGuess::HIGH_CONFIDENCE
// );
case 'boolean':
return new FieldFactoryClassGuess(
- 'Symfony\Component\Form\CheckboxField',
+ 'Symfony\Component\Form\CheckboxField',
array(),
FieldFactoryGuess::HIGH_CONFIDENCE
);
@@ -86,20 +86,20 @@ public function guessClass($class, $property)
case 'vardatetime':
case 'datetimetz':
return new FieldFactoryClassGuess(
- 'Symfony\Component\Form\DateTimeField',
+ 'Symfony\Component\Form\DateTimeField',
array(),
FieldFactoryGuess::HIGH_CONFIDENCE
);
case 'date':
return new FieldFactoryClassGuess(
- 'Symfony\Component\Form\DateField',
+ 'Symfony\Component\Form\DateField',
array(),
FieldFactoryGuess::HIGH_CONFIDENCE
);
case 'decimal':
case 'float':
return new FieldFactoryClassGuess(
- 'Symfony\Component\Form\NumberField',
+ 'Symfony\Component\Form\NumberField',
array(),
FieldFactoryGuess::MEDIUM_CONFIDENCE
);
@@ -107,25 +107,25 @@ public function guessClass($class, $property)
case 'bigint':
case 'smallint':
return new FieldFactoryClassGuess(
- 'Symfony\Component\Form\IntegerField',
+ 'Symfony\Component\Form\IntegerField',
array(),
FieldFactoryGuess::MEDIUM_CONFIDENCE
);
case 'string':
return new FieldFactoryClassGuess(
- 'Symfony\Component\Form\TextField',
+ 'Symfony\Component\Form\TextField',
array(),
FieldFactoryGuess::MEDIUM_CONFIDENCE
);
case 'text':
return new FieldFactoryClassGuess(
- 'Symfony\Component\Form\TextareaField',
+ 'Symfony\Component\Form\TextareaField',
array(),
FieldFactoryGuess::MEDIUM_CONFIDENCE
);
case 'time':
return new FieldFactoryClassGuess(
- 'Symfony\Component\Form\TimeField',
+ 'Symfony\Component\Form\TimeField',
array(),
FieldFactoryGuess::HIGH_CONFIDENCE
);
@@ -135,7 +135,7 @@ public function guessClass($class, $property)
}
return new FieldFactoryClassGuess(
- 'Symfony\Component\Form\TextField',
+ 'Symfony\Component\Form\TextField',
array(),
FieldFactoryGuess::LOW_CONFIDENCE
);
diff --git a/src/Symfony/Component/Form/FieldFactory/ValidatorFieldFactoryGuesser.php b/src/Symfony/Component/Form/FieldFactory/ValidatorFieldFactoryGuesser.php
index b4964cf52bdf4..0882766de8c64 100644
--- a/src/Symfony/Component/Form/FieldFactory/ValidatorFieldFactoryGuesser.php
+++ b/src/Symfony/Component/Form/FieldFactory/ValidatorFieldFactoryGuesser.php
@@ -142,7 +142,7 @@ public function guessClassForConstraint(Constraint $constraint)
);
case '\DateTime':
return new FieldFactoryClassGuess(
- 'Symfony\Component\Form\DateField',
+ 'Symfony\Component\Form\DateField',
array(),
FieldFactoryGuess::MEDIUM_CONFIDENCE
);
diff --git a/src/Symfony/Component/HttpFoundation/SessionStorage/PdoSessionStorage.php b/src/Symfony/Component/HttpFoundation/SessionStorage/PdoSessionStorage.php
index 348ba170ad8fa..2e3db13979b09 100644
--- a/src/Symfony/Component/HttpFoundation/SessionStorage/PdoSessionStorage.php
+++ b/src/Symfony/Component/HttpFoundation/SessionStorage/PdoSessionStorage.php
@@ -97,11 +97,11 @@ public function sessionClose()
public function sessionDestroy($id)
{
// get table/column
- $db_table = $this->options['db_table'];
- $db_id_col = $this->options['db_id_col'];
+ $dbTable = $this->options['db_table'];
+ $dbIdCol = $this->options['db_id_col'];
// delete the record associated with this id
- $sql = 'DELETE FROM '.$db_table.' WHERE '.$db_id_col.'= ?';
+ $sql = 'DELETE FROM '.$dbTable.' WHERE '.$dbIdCol.'= ?';
try {
$stmt = $this->db->prepare($sql);
@@ -126,11 +126,11 @@ public function sessionDestroy($id)
public function sessionGC($lifetime)
{
// get table/column
- $db_table = $this->options['db_table'];
- $db_time_col = $this->options['db_time_col'];
+ $dbTable = $this->options['db_table'];
+ $dbTimeCol = $this->options['db_time_col'];
// delete the record associated with this id
- $sql = 'DELETE FROM '.$db_table.' WHERE '.$db_time_col.' < '.(time() - $lifetime);
+ $sql = 'DELETE FROM '.$dbTable.' WHERE '.$dbTimeCol.' < '.(time() - $lifetime);
try {
$this->db->query($sql);
@@ -153,13 +153,13 @@ public function sessionGC($lifetime)
public function sessionRead($id)
{
// get table/columns
- $db_table = $this->options['db_table'];
- $db_data_col = $this->options['db_data_col'];
- $db_id_col = $this->options['db_id_col'];
- $db_time_col = $this->options['db_time_col'];
+ $dbTable = $this->options['db_table'];
+ $dbDataCol = $this->options['db_data_col'];
+ $dbIdCol = $this->options['db_id_col'];
+ $dbTimeCol = $this->options['db_time_col'];
try {
- $sql = 'SELECT '.$db_data_col.' FROM '.$db_table.' WHERE '.$db_id_col.'=?';
+ $sql = 'SELECT '.$dbDataCol.' FROM '.$dbTable.' WHERE '.$dbIdCol.'=?';
$stmt = $this->db->prepare($sql);
$stmt->bindParam(1, $id, \PDO::PARAM_STR, 255);
@@ -173,7 +173,7 @@ public function sessionRead($id)
return $sessionRows[0][0];
} else {
// session does not exist, create it
- $sql = 'INSERT INTO '.$db_table.'('.$db_id_col.', '.$db_data_col.', '.$db_time_col.') VALUES (?, ?, ?)';
+ $sql = 'INSERT INTO '.$dbTable.'('.$dbIdCol.', '.$dbDataCol.', '.$dbTimeCol.') VALUES (?, ?, ?)';
$stmt = $this->db->prepare($sql);
$stmt->bindParam(1, $id, \PDO::PARAM_STR);
@@ -201,12 +201,12 @@ public function sessionRead($id)
public function sessionWrite($id, $data)
{
// get table/column
- $db_table = $this->options['db_table'];
- $db_data_col = $this->options['db_data_col'];
- $db_id_col = $this->options['db_id_col'];
- $db_time_col = $this->options['db_time_col'];
+ $dbTable = $this->options['db_table'];
+ $dbDataCol = $this->options['db_data_col'];
+ $dbIdCol = $this->options['db_id_col'];
+ $dbTimeCol = $this->options['db_time_col'];
- $sql = 'UPDATE '.$db_table.' SET '.$db_data_col.' = ?, '.$db_time_col.' = '.time().' WHERE '.$db_id_col.'= ?';
+ $sql = 'UPDATE '.$dbTable.' SET '.$dbDataCol.' = ?, '.$dbTimeCol.' = '.time().' WHERE '.$dbIdCol.'= ?';
try {
$stmt = $this->db->prepare($sql);
diff --git a/src/Symfony/Component/Routing/Loader/XmlFileLoader.php b/src/Symfony/Component/Routing/Loader/XmlFileLoader.php
index 9d6b7a94d7786..9ccb16dfdb698 100644
--- a/src/Symfony/Component/Routing/Loader/XmlFileLoader.php
+++ b/src/Symfony/Component/Routing/Loader/XmlFileLoader.php
@@ -103,7 +103,7 @@ protected function parseRoute(RouteCollection $collection, \DOMElement $definiti
switch ($node->tagName) {
case 'default':
$defaults[(string) $node->getAttribute('key')] = trim((string) $node->nodeValue);
- break;
+ break;
case 'option':
$options[(string) $node->getAttribute('key')] = trim((string) $node->nodeValue);
break;
diff --git a/src/Symfony/Component/Security/Acl/Dbal/AclProvider.php b/src/Symfony/Component/Security/Acl/Dbal/AclProvider.php
index c45a597decded..f88359991883c 100644
--- a/src/Symfony/Component/Security/Acl/Dbal/AclProvider.php
+++ b/src/Symfony/Component/Security/Acl/Dbal/AclProvider.php
@@ -437,8 +437,7 @@ protected function hydrateObjectIdentities(Statement $stmt, array $oidLookup, ar
// fill-in parent ACLs where this hasn't been done yet cause the parent ACL was not
// yet available
$processed = 0;
- foreach ($parentIdToFill as $acl)
- {
+ foreach ($parentIdToFill as $acl) {
$parentId = $parentIdToFill->offsetGet($acl);
// let's see if we have already hydrated this
diff --git a/src/Symfony/Component/Security/Acl/Dbal/MutableAclProvider.php b/src/Symfony/Component/Security/Acl/Dbal/MutableAclProvider.php
index da5ded92e2c32..3a8eebc16c810 100644
--- a/src/Symfony/Component/Security/Acl/Dbal/MutableAclProvider.php
+++ b/src/Symfony/Component/Security/Acl/Dbal/MutableAclProvider.php
@@ -860,8 +860,7 @@ protected function updateAceProperty($name, array $changes)
*/
protected function updateAces(\SplObjectStorage $aces)
{
- foreach ($aces as $ace)
- {
+ foreach ($aces as $ace) {
$propertyChanges = $aces->offsetGet($ace);
$sets = array();
diff --git a/src/Symfony/Component/Serializer/Encoder/XmlEncoder.php b/src/Symfony/Component/Serializer/Encoder/XmlEncoder.php
index f951d2ecd5019..2b13dee61354d 100644
--- a/src/Symfony/Component/Serializer/Encoder/XmlEncoder.php
+++ b/src/Symfony/Component/Serializer/Encoder/XmlEncoder.php
@@ -133,13 +133,13 @@ protected function buildXml($parentNode, $data)
if (is_array($data) || $data instanceof \Traversable) {
foreach ($data as $key => $data) {
//Ah this is the magic @ attribute types.
- if (strpos($key,"@")===0 && is_scalar($data) && $this->isElementNameValid($attributeName = substr($key,1))) {
+ if (0 === strpos($key, "@") && is_scalar($data) && $this->isElementNameValid($attributeName = substr($key,1))) {
$parentNode->setAttribute($attributeName, $data);
} elseif (is_array($data) && false === is_numeric($key)) {
/**
* Is this array fully numeric keys?
*/
- if (ctype_digit( implode('', array_keys($data) ) )) {
+ if (ctype_digit(implode('', array_keys($data)))) {
/**
* Create nodes to append to $parentNode based on the $key of this array
* Produces - 0
- 1
diff --git a/src/Symfony/Component/Templating/Loader/FilesystemLoader.php b/src/Symfony/Component/Templating/Loader/FilesystemLoader.php
index 4c5388f68664f..b9538ca4f863e 100644
--- a/src/Symfony/Component/Templating/Loader/FilesystemLoader.php
+++ b/src/Symfony/Component/Templating/Loader/FilesystemLoader.php
@@ -90,8 +90,7 @@ public function load(TemplateReferenceInterface $template)
*/
public function isFresh(TemplateReferenceInterface $template, $time)
{
- if (false === $storage = $this->load($template))
- {
+ if (false === $storage = $this->load($template)) {
return false;
}
diff --git a/src/Symfony/Component/Translation/Loader/CsvFileLoader.php b/src/Symfony/Component/Translation/Loader/CsvFileLoader.php
index efa2e466fabab..2e788b3434bb8 100644
--- a/src/Symfony/Component/Translation/Loader/CsvFileLoader.php
+++ b/src/Symfony/Component/Translation/Loader/CsvFileLoader.php
@@ -31,7 +31,7 @@ public function load($resource, $locale, $domain = 'messages')
throw new \InvalidArgumentException(sprintf('Error opening file "%s".', $resource));
}
- while(($data = fgetcsv($file, 0, ';')) !== false) {
+ while (($data = fgetcsv($file, 0, ';')) !== false) {
if (substr($data[0], 0, 1) === '#') {
continue;
}
diff --git a/src/Symfony/Component/Validator/Constraints/RegexValidator.php b/src/Symfony/Component/Validator/Constraints/RegexValidator.php
index a15b743fef6d3..2063acab546b3 100644
--- a/src/Symfony/Component/Validator/Constraints/RegexValidator.php
+++ b/src/Symfony/Component/Validator/Constraints/RegexValidator.php
@@ -33,8 +33,7 @@ public function isValid($value, Constraint $constraint)
($constraint->match && !preg_match($constraint->pattern, $value))
||
(!$constraint->match && preg_match($constraint->pattern, $value))
- )
- {
+ ) {
$this->setMessage($constraint->message, array('{{ value }}' => $value));
return false;
diff --git a/src/Symfony/Component/Validator/Exception/MappingException.php b/src/Symfony/Component/Validator/Exception/MappingException.php
index eecc456c75428..6ceb9126949eb 100644
--- a/src/Symfony/Component/Validator/Exception/MappingException.php
+++ b/src/Symfony/Component/Validator/Exception/MappingException.php
@@ -11,5 +11,6 @@
namespace Symfony\Component\Validator\Exception;
-class MappingException extends ValidatorException {
-}
\ No newline at end of file
+class MappingException extends ValidatorException
+{
+}
diff --git a/src/Symfony/Component/Validator/Mapping/Loader/FilesLoader.php b/src/Symfony/Component/Validator/Mapping/Loader/FilesLoader.php
index daf30f668ee9c..3f26204b85049 100644
--- a/src/Symfony/Component/Validator/Mapping/Loader/FilesLoader.php
+++ b/src/Symfony/Component/Validator/Mapping/Loader/FilesLoader.php
@@ -43,7 +43,7 @@ public function __construct(array $paths)
protected function getFileLoaders($paths)
{
$loaders = array();
- foreach ($paths as $path) {
+ foreach ($paths as $path) {
$loaders[] = $this->getFileLoaderInstance($path);
}
return $loaders;
pFad - Phonifier reborn
Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.
Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.
Alternative Proxies:
Alternative Proxy
pFad Proxy
pFad v3 Proxy
pFad v4 Proxy