Skip to content

Conversation

@mcg-web
Copy link
Contributor

@mcg-web mcg-web commented Feb 21, 2017

defaultValue should be set only if value different than null

$lastLine = "'" . array_pop($lines);
$lines = array_map(function($s) { return "'" . $s . "'" . ' . "\n"'; }, $lines);
$lines = array_map(function ($s) {
return "'" . $s . "'" . ' . "\n"';

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sprintf would be more readable

return '';
}

return "\n".'<spaces>\'defaultValue\' => '.$defaultValue.',';

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use sprintf here

{
return $this->varExportFromArrayValue($value, 'defaultValue');
$defaultValue = $this->varExportFromArrayValue($value, 'defaultValue');
if ('null' === $defaultValue) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be null

`defaultValue` should be set only if value different than null
@mcg-web mcg-web requested a review from ooflorent February 22, 2017 09:17
@mcg-web mcg-web merged commit ae6e84e into overblog:master Feb 22, 2017
@mcg-web mcg-web deleted the fix-default-value branch February 22, 2017 11:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants