Skip to content

Commit

Permalink
formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
taylorotwell committed Mar 8, 2024
1 parent d229f1d commit e40d4fe
Showing 1 changed file with 9 additions and 11 deletions.
20 changes: 9 additions & 11 deletions src/Illuminate/Log/Context/Repository.php
Original file line number Diff line number Diff line change
Expand Up @@ -147,11 +147,10 @@ public function onlyHidden($keys)
*/
public function add($key, $value = null)
{
$values = is_array($key) ? $key : [$key => $value];

foreach ($values as $key => $value) {
$this->data[$key] = $value;
}
$this->data = array_merge(
$this->data,
is_array($key) ? $key : [$key => $value]
);

return $this;
}
Expand All @@ -165,11 +164,10 @@ public function add($key, $value = null)
*/
public function addHidden($key, $value = null)
{
$values = is_array($key) ? $key : [$key => $value];

foreach ($values as $key => $value) {
$this->hidden[$key] = $value;
}
$this->hidden = array_merge(
$this->hidden,
is_array($key) ? $key : [$key => $value]
);

return $this;
}
Expand Down Expand Up @@ -352,7 +350,7 @@ public function handleUnserializeExceptionsUsing($callback)
}

/**
* Flush all state.
* Flush all context data.
*
* @return $this
*/
Expand Down

0 comments on commit e40d4fe

Please sign in to comment.