blessing-skin-server/app/Events/RenderingHeader.php
Pig Fang 3cf19d8656
Apply fixes from StyleCI (#11)
This pull request applies code style fixes from an analysis carried out by [StyleCI](https://github.styleci.io).

---

For more information, click [here](https://github.styleci.io/analyses/8wKwbZ).
2019-03-02 22:58:37 +08:00

38 lines
708 B
PHP

<?php
namespace App\Events;
class RenderingHeader extends Event
{
public $contents;
/**
* Create a new event instance.
*
* @param array $contents
* @return void
*/
public function __construct(array &$contents)
{
// Pass array by reference
$this->contents = &$contents;
}
/**
* Add content to page footer.
*
* @param string $content
* @return void
*/
public function addContent($content)
{
if ($content) {
if (! is_string($content)) {
throw new \Exception('Can not add non-string content', 1);
}
$this->contents[] = $content;
}
}
}