Skip to content

Commit

Permalink
Optimized namespace usage
Browse files Browse the repository at this point in the history
  • Loading branch information
mystralkk committed Aug 17, 2019
1 parent f06a6d5 commit 625c626
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions system/classes/Akismet.php
Expand Up @@ -2,6 +2,8 @@

namespace Geeklog;

use InvalidArgumentException;

class Akismet
{
// Akismet class version
Expand Down Expand Up @@ -59,19 +61,19 @@ class Akismet
*
* @param string $APIKey
* @param string $siteURL
* @throws \InvalidArgumentException
* @throws InvalidArgumentException
*/
public function __construct($APIKey, $siteURL)
{
$APIKey = trim($APIKey);
$siteURL = trim($siteURL);

if (empty($APIKey)) {
throw new \InvalidArgumentException('You have to set a valid API key for Akismet.');
throw new InvalidArgumentException('You have to set a valid API key for Akismet.');
}

if (empty($siteURL)) {
throw new \InvalidArgumentException('You have to set your site URL.');
throw new InvalidArgumentException('You have to set your site URL.');
}

$this->APIKey = $APIKey;
Expand Down

0 comments on commit 625c626

Please sign in to comment.