for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace CViniciusSDias\GoogleCrawler;
use CViniciusSDias\GoogleCrawler\Exception\InvalidUrlException;
/**
* Class that represents a Google Result
*
* @package CViniciussDias\GoogleCrawler
* @author Vinicius Dias
*/
class Result
{
/** @var string $title */
private $title;
/** @var string $url */
private $url;
/** @var string $description */
private $description;
* @return string
public function getTitle(): string
return $this->title;
}
* @param string $title
* @return Result
public function setTitle(string $title): Result
$this->title = $title;
return $this;
public function getUrl(): string
return $this->url;
* @param string $url
* @throws InvalidUrlException
public function setUrl(string $url): Result
if (!filter_var($url, FILTER_VALIDATE_URL)) {
throw new InvalidUrlException();
$this->url = $url;
public function getDescription(): ?string
return $this->description;
* @param string $description
public function setDescription(string $description): Result
$this->description = $description;