@@ -17,8 +17,7 @@ |
||
| 17 | 17 | * |
| 18 | 18 | * @param string $searchTerm |
| 19 | 19 | */ |
| 20 | - public function __construct(string $searchTerm) |
|
| 21 | - { |
|
| 20 | + public function __construct(string $searchTerm) { |
|
| 22 | 21 | $searchTerm = $this->normalize($searchTerm); |
| 23 | 22 | $this->searchTerm = $searchTerm; |
| 24 | 23 | } |
@@ -23,8 +23,7 @@ |
||
| 23 | 23 | * @param string $endpoint Specific service URL |
| 24 | 24 | * @throws InvalidUrlException |
| 25 | 25 | */ |
| 26 | - public function __construct(string $endpoint) |
|
| 27 | - { |
|
| 26 | + public function __construct(string $endpoint) { |
|
| 28 | 27 | if (!filter_var($endpoint, FILTER_VALIDATE_URL)) { |
| 29 | 28 | throw new InvalidUrlException(); |
| 30 | 29 | } |
@@ -22,8 +22,7 @@ |
||
| 22 | 22 | /** @var GoogleProxy $proxy */ |
| 23 | 23 | protected $proxy; |
| 24 | 24 | |
| 25 | - public function __construct(SearchTermInterface $searchTerm, GoogleProxy $proxy = null) |
|
| 26 | - { |
|
| 25 | + public function __construct(SearchTermInterface $searchTerm, GoogleProxy $proxy = null) { |
|
| 27 | 26 | // You can concatenate &gl=XX replacing XX with your country code (BR = Brazil; US = United States) |
| 28 | 27 | // You should also add the coutry specific part of the google url, (like .br or .es) |
| 29 | 28 | $this->url = "http://www.google.com/search?q=$searchTerm&num=100"; |
@@ -19,8 +19,7 @@ discard block |
||
| 19 | 19 | * |
| 20 | 20 | * @param int|null $capacity If informed, the vector is initialized with this capacity |
| 21 | 21 | */ |
| 22 | - public function __construct(int $capacity = null) |
|
| 23 | - { |
|
| 22 | + public function __construct(int $capacity = null) { |
|
| 24 | 23 | $this->results = new Vector(); |
| 25 | 24 | |
| 26 | 25 | if ($capacity) { |
@@ -33,8 +32,7 @@ discard block |
||
| 33 | 32 | * |
| 34 | 33 | * @param Result $result |
| 35 | 34 | */ |
| 36 | - public function addResult(Result $result) |
|
| 37 | - { |
|
| 35 | + public function addResult(Result $result) { |
|
| 38 | 36 | $this->results->push($result); |
| 39 | 37 | } |
| 40 | 38 | |