This commit is contained in:
Fabien Potencier 2012-05-21 22:27:15 +02:00
parent a3c74d3321
commit 335d4eab86
14 changed files with 19 additions and 19 deletions

View File

@ -53,12 +53,12 @@ class EntityChoiceListTest extends DoctrineOrmTestCase
try {
$schemaTool->dropSchema($classes);
} catch(\Exception $e) {
} catch (\Exception $e) {
}
try {
$schemaTool->createSchema($classes);
} catch(\Exception $e) {
} catch (\Exception $e) {
}
}

View File

@ -67,12 +67,12 @@ class EntityTypeTest extends TypeTestCase
try {
$schemaTool->dropSchema($classes);
} catch(\Exception $e) {
} catch (\Exception $e) {
}
try {
$schemaTool->createSchema($classes);
} catch(\Exception $e) {
} catch (\Exception $e) {
}
}

View File

@ -1,3 +1,3 @@
<?php if ($required) { $label_attr['class'] = trim((isset($label_attr['class']) ? $label_attr['class'] : '').' required'); } ?>
<?php if ($single_control) { $label_attr['for'] = $id; } ?>
<label <?php foreach($label_attr as $k => $v) { printf('%s="%s" ', $view->escape($k), $view->escape($v)); } ?>><?php echo $view->escape($view['translator']->trans($label, array(), $translation_domain)) ?></label>
<label <?php foreach ($label_attr as $k => $v) { printf('%s="%s" ', $view->escape($k), $view->escape($v)); } ?>><?php echo $view->escape($view['translator']->trans($label, array(), $translation_domain)) ?></label>

View File

@ -5,5 +5,5 @@ name="<?php echo $view->escape($full_name) ?>"
<?php if ($required): ?>required="required" <?php endif ?>
<?php if ($max_length): ?>maxlength="<?php echo $view->escape($max_length) ?>" <?php endif ?>
<?php if ($pattern): ?>pattern="<?php echo $view->escape($pattern) ?>" <?php endif ?>
<?php foreach($attr as $k => $v) { printf('%s="%s" ', $view->escape($k), $view->escape($v)); } ?>
<?php foreach ($attr as $k => $v) { printf('%s="%s" ', $view->escape($k), $view->escape($v)); } ?>

View File

@ -1,2 +1,2 @@
<?php if (!empty($id)): ?>id="<?php echo $view->escape($id) ?>" <?php endif; ?>
<?php foreach($attr as $k => $v) { printf('%s="%s" ', $view->escape($k), $view->escape($v)); } ?>
<?php foreach ($attr as $k => $v) { printf('%s="%s" ', $view->escape($k), $view->escape($v)); } ?>

View File

@ -278,7 +278,7 @@ class FormHelper extends Helper
return trim($html);
}
} while (--$typeIndex >= 0);
} while (--$typeIndex >= 0);
throw new FormException(sprintf(
'Unable to render the form as none of the following blocks exist: "%s".',

View File

@ -339,7 +339,7 @@ class Form extends Link implements \ArrayAccess
throw new \LogicException('The selected node does not have a form ancestor.');
}
} while ('form' != $node->nodeName);
} elseif('form' != $node->nodeName) {
} elseif ('form' != $node->nodeName) {
throw new \LogicException(sprintf('Unable to submit on a "%s" tag.', $node->nodeName));
}

View File

@ -276,7 +276,7 @@ class FinderTest extends Iterator\RealIteratorTestCase
$paths = array();
foreach($finder as $file) {
foreach ($finder as $file) {
$paths[] = $file->getRelativePath();
}
@ -296,7 +296,7 @@ class FinderTest extends Iterator\RealIteratorTestCase
$paths = array();
foreach($finder as $file) {
foreach ($finder as $file) {
$paths[] = $file->getRelativePathname();
}

View File

@ -352,14 +352,14 @@ class ResponseTest extends \PHPUnit_Framework_TestCase
try {
$response->setStatusCode(99);
$this->fail();
} catch(\InvalidArgumentException $e) {
} catch (\InvalidArgumentException $e) {
$this->assertTrue($response->isInvalid());
}
try {
$response->setStatusCode(650);
$this->fail();
} catch(\InvalidArgumentException $e) {
} catch (\InvalidArgumentException $e) {
$this->assertTrue($response->isInvalid());
}

View File

@ -66,7 +66,7 @@ class ExceptionListenerTest extends \PHPUnit_Framework_TestCase
try {
$l->onKernelException($event2);
} catch(\Exception $e) {
} catch (\Exception $e) {
$this->assertSame('foo', $e->getMessage());
}
@ -88,7 +88,7 @@ class ExceptionListenerTest extends \PHPUnit_Framework_TestCase
try {
$l->onKernelException($event2);
} catch(\Exception $e) {
} catch (\Exception $e) {
$this->assertSame('foo', $e->getMessage());
}

View File

@ -339,7 +339,7 @@ class Process
foreach ($fh as $type => $fileHandle) {
fseek($fileHandle, $this->readBytes[$type]);
$data = fread($fileHandle, 8192);
if(isset($this->readBytes)) {
if (isset($this->readBytes)) {
$this->readBytes[$type] += strlen($data);
} else {
$this->readBytes[$type] = strlen($data);

View File

@ -144,7 +144,7 @@ class ApacheMatcherDumper extends MatcherDumper
{
$escaped = false;
$output = '';
foreach(str_split($string) as $symbol) {
foreach (str_split($string) as $symbol) {
if ($escaped) {
$output .= $symbol;
$escaped = false;

View File

@ -109,7 +109,7 @@ class RouteCompiler implements RouteCompilerInterface
private function computeRegexp(array $tokens, $index, $firstOptional)
{
$token = $tokens[$index];
if('text' === $token[0]) {
if ('text' === $token[0]) {
// Text tokens
return preg_quote($token[1], self::REGEX_DELIMITER);
} else {

View File

@ -147,7 +147,7 @@ class MoFileLoader extends ArrayLoader implements LoaderInterface
}
$messages[$item['ids']['plural']] = stripcslashes(implode('|', $plurals));
}
} elseif(!empty($item['ids']['singular'])) {
} elseif (!empty($item['ids']['singular'])) {
$messages[$item['ids']['singular']] = stripcslashes($item['translated']);
}
}