Skip to content
This repository was archived by the owner on May 18, 2020. It is now read-only.

Commit 90898dd

Browse files
committed
leverage Symfony configuration
1 parent 461a08e commit 90898dd

File tree

2 files changed

+1
-4
lines changed

2 files changed

+1
-4
lines changed

DependencyInjection/Configuration.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ public function getConfigTreeBuilder()
1717

1818
$rootNode->children()
1919
->scalarNode('api_key')->isRequired()->cannotBeEmpty()->end()
20-
->scalarNode('timeout')->defaultValue(30000)->end() //default timeout: 30 secs
20+
->integerNode('timeout')->min(0)->max(60000)->defaultValue(30000)->end() //default timeout: 30 secs
2121
->end();
2222

2323
return $treeBuilder;

Wrapper/Mailin.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,6 @@ private function do_request($resource, $method, $input)
3535
$ch = curl_init($called_url);
3636
$auth_header = 'api-key:'.$this->api_key;
3737
$content_header = 'Content-Type:application/json';
38-
if (isset($this->timeout) && ($this->timeout <= 0 || $this->timeout > 60000)) {
39-
throw new \Exception('value not allowed for timeout');
40-
}
4138
if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') {
4239
// Windows only over-ride
4340
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);

0 commit comments

Comments
 (0)