Skip to content

Commit 7f28027

Browse files
Tybazementalstring
andauthored
Code simplification
Review comments, simplification sfBrowserBase ternary and remove useless int cast in sfYmlParser Co-authored-by: mentalstring <mentalstring@gmail.com>
1 parent 235d66b commit 7f28027

File tree

6 files changed

+6
-6
lines changed

6 files changed

+6
-6
lines changed

lib/util/sfBrowserBase.class.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -911,7 +911,7 @@ public function doClickElement(DOMElement $item, $arguments = array(), $options
911911
}
912912
else
913913
{
914-
$queryString = (is_array($arguments)) ? http_build_query($arguments, null, '&') : '';
914+
$queryString = is_array($arguments) ? http_build_query($arguments, null, '&') : '';
915915
$sep = false === strpos($url, '?') ? '?' : '&';
916916

917917
return array($url.($queryString ? $sep.$queryString : ''), 'get', array());

lib/util/sfNamespacedParameterHolder.class.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -395,7 +395,7 @@ public function __serialize()
395395
}
396396

397397
/**
398-
* Unserializes a sfParameterHolder instance. for PHP 7.4
398+
* Unserializes a sfParameterHolder instance for PHP 7.4+
399399
*
400400
* @param array $data
401401
*/

lib/util/sfParameterHolder.class.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ public function __serialize()
209209
}
210210

211211
/**
212-
* Unserializes a sfParameterHolder instance. for PHP 7.4
212+
* Unserializes a sfParameterHolder instance for PHP 7.4+
213213
*
214214
* @param array $data
215215
*/

lib/view/sfViewParameterHolder.class.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ public function __serialize()
193193
}
194194

195195
/**
196-
* Unserializes a sfParameterHolder instance. for PHP 7.4
196+
* Unserializes a sfParameterHolder instance for PHP 7.4+
197197
*
198198
* @param array $data
199199
*/

lib/widget/sfWidgetFormDate.class.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ public function render($name, $value = null, $attributes = array(), $errors = ar
7070
}
7171
else
7272
{
73-
$value = (string) $value == (string) (integer) $value ? (integer) $value : strtotime( (string) $value);
73+
$value = (string) $value == (string) (integer) $value ? (integer) $value : strtotime((string) $value);
7474
if (false === $value)
7575
{
7676
$value = $default;

lib/yaml/sfYamlParser.class.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -421,7 +421,7 @@ protected function parseValue($value)
421421
{
422422
$modifiers = isset($matches['modifiers']) ? $matches['modifiers'] : '';
423423

424-
return $this->parseFoldedScalar($matches['separator'], preg_replace('#\d+#', '', $modifiers), (int) abs((int) $modifiers));
424+
return $this->parseFoldedScalar($matches['separator'], preg_replace('#\d+#', '', $modifiers), abs((int) $modifiers));
425425
}
426426
else
427427
{

0 commit comments

Comments
 (0)