Skip to content

Commit 942c8ab

Browse files
committed
Fix if coding style
1 parent 29563b9 commit 942c8ab

File tree

6 files changed

+17
-7
lines changed

6 files changed

+17
-7
lines changed

lib/cache/sfFileCache.class.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -256,9 +256,13 @@ protected function read($path, $type = self::READ_DATA)
256256
fseek($fp, 0, SEEK_END);
257257
$length = ftell($fp) - 24;
258258
fseek($fp, 24);
259-
if($length > 0) {
259+
260+
if ($length > 0)
261+
{
260262
$data[self::READ_DATA] = @fread($fp, $length);
261-
} else {
263+
}
264+
else
265+
{
262266
$data[self::READ_DATA] = '';
263267
}
264268
}

lib/escaper/sfOutputEscaperObjectDecorator.class.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,8 @@ public function __isset($key)
119119
public function count()
120120
{
121121
// See https://github.com/symfony/polyfill/commit/d330c0094a47d8edceeea1ed553d6e08215a9fc2
122-
if(is_array($this->value) || $this->value instanceof Countable || $this->value instanceof ResourceBundle || $this->value instanceof SimpleXmlElement) {
122+
if (is_array($this->value) || $this->value instanceof Countable || $this->value instanceof ResourceBundle || $this->value instanceof SimpleXmlElement)
123+
{
123124
return count($this->value);
124125
}
125126
return 1;

lib/exception/sfException.class.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -367,9 +367,11 @@ static protected function formatArrayAsHtml($values)
367367
static protected function fileExcerpt($file, $line)
368368
{
369369
// $file can be null for RuntimeException
370-
if($file === null) {
370+
if ($file === null)
371+
{
371372
return '';
372373
}
374+
373375
if (is_readable($file))
374376
{
375377
$content = preg_split('#<br />#', preg_replace('/^<code>(.*)<\/code>$/s', '$1', highlight_file($file, true)));

lib/test/sfTesterResponse.class.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,8 @@ public function initialize()
4949
}
5050
else
5151
{
52-
if($this->response->getContent()) {
52+
if ($this->response->getContent())
53+
{
5354
@$this->dom->loadHTML($this->response->getContent());
5455
}
5556
}

lib/util/sfBrowserBase.class.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -363,7 +363,8 @@ public function call($uri, $method = 'get', $parameters = array(), $changeStack
363363
}
364364
else
365365
{
366-
if($response->getContent()) {
366+
if ($response->getContent())
367+
{
367368
@$this->dom->loadHTML($response->getContent());
368369
}
369370
}

lib/vendor/lime/lime.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1103,7 +1103,8 @@ function lime_shutdown()
11031103

11041104
$this->output->comment(sprintf(' at %s line %s', $this->get_relative_file($testsuite['tests'][$testcase]['file']).$this->extension, $testsuite['tests'][$testcase]['line']));
11051105
$this->output->info(' '.$testsuite['tests'][$testcase]['message']);
1106-
if(isset($testsuite['tests'][$testcase]['error'])) {
1106+
if (isset($testsuite['tests'][$testcase]['error']))
1107+
{
11071108
$this->output->echoln($testsuite['tests'][$testcase]['error'], null, false);
11081109
}
11091110
}

0 commit comments

Comments
 (0)