Skip to content

Commit

Permalink
Merged remote tracking branch 'upstream/master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
akhumphrey committed Jun 30, 2024
2 parents ef6ed6c + 998e779 commit 929b39b
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,5 @@
docker-compose.yml export-ignore
phpstan.neon export-ignore
phpunit.xml export-ignore
test/ export-ignore
tests/ export-ignore
6 changes: 3 additions & 3 deletions lib/config/sfConfigCache.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -157,9 +157,9 @@ public function import($config, $once = true, $optional = false)
/**
* Registers a configuration handler.
*
* @param string $handler The handler to use when parsing a configuration file
* @param class $class A configuration handler class
* @param string $params An array of options for the handler class initialization
* @param string $handler The handler to use when parsing a configuration file
* @param class-string<sfConfigHandler> $class A configuration handler class
* @param string[] $params An array of options for the handler class initialization
*/
public function registerConfigHandler($handler, $class, $params = [])
{
Expand Down
2 changes: 1 addition & 1 deletion lib/helper/TextHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ function simple_format_text($text, $options = [])
{
$css = (isset($options['class'])) ? ' class="'.$options['class'].'"' : '';

$text = preg_replace('/(\r\n|\r)/', "\n", $text); // lets make them newlines crossplatform
$text = preg_replace('/(\r\n|\r)/', "\n", $text); // lets make them newlines crossplatform
$text = preg_replace('/\n{2,}/', "</p><p{$css}>", $text); // turn two and more newlines into paragraph

// turn single newline into <br/>
Expand Down
2 changes: 1 addition & 1 deletion lib/task/sfTask.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -658,7 +658,7 @@ protected function usageCloseToLimit($usage, $warning_when_remaining)

protected function convertIntToUnit($size)
{
$unit = ['b', 'kb', 'mb', 'gb', 'tb', 'pb'];
$unit = ['B', 'KiB', 'MiB', 'GiB', 'TiB', 'PiB'];
$i = floor(log($size, 1024));

return @round($size / pow(1024, $i), 2)." {$unit[$i]}";
Expand Down
3 changes: 1 addition & 2 deletions test/unit/widget/sfWidgetFormInputCheckboxTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

require_once __DIR__.'/../../bootstrap/unit.php';

$t = new lime_test(8);
$t = new lime_test(7);

$w = new sfWidgetFormInputCheckbox();

Expand All @@ -20,7 +20,6 @@
$t->is($w->render('foo', null), '<input type="checkbox" name="foo" id="foo" />', '->render() renders the widget as HTML');
$t->is($w->render('foo', false), '<input type="checkbox" name="foo" id="foo" />', '->render() renders the widget as HTML');
$t->is($w->render('foo', 0, ['value' => '0']), '<input type="checkbox" name="foo" value="0" id="foo" />', '->render() renders the widget as HTML');
$t->is($w->render('foo', '0'), '<input type="checkbox" name="foo" id="foo" />', '->render() renders the widget as HTML');

$w = new sfWidgetFormInputCheckbox([], ['value' => 'bar']);
$t->is($w->render('foo', null), '<input value="bar" type="checkbox" name="foo" id="foo" />', '->render() renders the widget as HTML');
Expand Down

0 comments on commit 929b39b

Please sign in to comment.