Skip to content

Commit

Permalink
refactor: remove unnecessary check
Browse files Browse the repository at this point in the history
  • Loading branch information
kenjis committed Oct 30, 2023
1 parent c949b02 commit 7ba4906
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 11 deletions.
4 changes: 0 additions & 4 deletions system/Honeypot/Honeypot.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,6 @@ public function __construct(HoneypotConfig $config)
{
$this->config = $config;

if (! $this->config->hidden) {
throw HoneypotException::forNoHiddenValue();
}

if (empty($this->config->container) || strpos($this->config->container, '{template}') === false) {
$this->config->container = '<div style="display:none">{template}</div>';
}
Expand Down
7 changes: 0 additions & 7 deletions tests/system/Honeypot/HoneypotTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -133,13 +133,6 @@ public function testHasContent(): void
$this->assertTrue($this->honeypot->hasContent($this->request));
}

public function testConfigHidden(): void
{
$this->config->hidden = '';
$this->expectException(HoneypotException::class);
$this->honeypot = new Honeypot($this->config);
}

public function testConfigTemplate(): void
{
$this->config->template = '';
Expand Down

0 comments on commit 7ba4906

Please sign in to comment.