Skip to content

Commit 20c6e46

Browse files
author
Andrey Helldar
committed
Renamed method from setSkipEmptyValues to setSkipEmptyAttributes
1 parent c9446f3 commit 20c6e46

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Diff for: src/Facades/Xml.php

+4-4
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ class Xml
1414
/** @var \DOMElement */
1515
protected $root;
1616

17-
protected $skip_empty_values = false;
17+
protected $skip_empty_attributes = false;
1818

1919
public function __construct(string $root = 'root', array $attributes = [], bool $format_output = false)
2020
{
@@ -40,9 +40,9 @@ public static function init(string $root = 'root', array $attributes = [], bool
4040
return new self($root, $attributes, $format_output);
4141
}
4242

43-
public function setSkipEmptyValues(): self
43+
public function setSkipEmptyAttributes(): self
4444
{
45-
$this->skip_empty_values = true;
45+
$this->skip_empty_attributes = true;
4646

4747
return $this;
4848
}
@@ -115,7 +115,7 @@ public function get(): string
115115
private function setAttributes(DOMElement &$element, array $attributes = [])
116116
{
117117
foreach ($attributes as $name => $value) {
118-
if ($this->skip_empty_values && empty($value)) {
118+
if ($this->skip_empty_attributes && empty($value)) {
119119
continue;
120120
}
121121

0 commit comments

Comments
 (0)