Skip to content
This repository was archived by the owner on Jan 29, 2020. It is now read-only.

Commit 943d843

Browse files
committed
Wrap long conditionals onto multiple lines
1 parent 7e42a90 commit 943d843

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/HalResource.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,9 @@ public function __construct(array $data = [], array $links = [], array $embedded
6161
$context = __CLASS__;
6262
array_walk($data, function ($value, $name) use ($context) {
6363
$this->validateElementName($name, $context);
64-
if (! empty($value) && ($value instanceof self || $this->isResourceCollection($value, $name, $context))) {
64+
if (! empty($value)
65+
&& ($value instanceof self || $this->isResourceCollection($value, $name, $context))
66+
) {
6567
$this->embedded[$name] = $value;
6668
return;
6769
}
@@ -148,7 +150,9 @@ public function withElement(string $name, $value) : HalResource
148150
{
149151
$this->validateElementName($name, __METHOD__);
150152

151-
if (! empty($value) && ($value instanceof self || $this->isResourceCollection($value, $name, __METHOD__))) {
153+
if (! empty($value)
154+
&& ($value instanceof self || $this->isResourceCollection($value, $name, __METHOD__))
155+
) {
152156
return $this->embed($name, $value);
153157
}
154158

0 commit comments

Comments
 (0)