1
0
mirror of https://github.com/Seldaek/monolog.git synced 2025-08-08 14:16:42 +02:00

CS fixes, refs #623

This commit is contained in:
Jordi Boggiano
2015-08-09 17:52:11 +01:00
parent 0fef7571db
commit cd3f9f1e50

View File

@@ -20,8 +20,8 @@ use Monolog\Logger;
*/
class IFTTTHandler extends AbstractProcessingHandler
{
protected $_eventName;
protected $_secretKey;
private $eventName;
private $secretKey;
/**
* @param string $eventName The name of the IFTTT Maker event that should be triggered
@@ -31,8 +31,8 @@ class IFTTTHandler extends AbstractProcessingHandler
*/
public function __construct($eventName, $secretKey, $level = Logger::ERROR, $bubble = true)
{
$this->_eventName = $eventName;
$this->_secretKey = $secretKey;
$this->eventName = $eventName;
$this->secretKey = $secretKey;
parent::__construct($level, $bubble);
}
@@ -50,10 +50,9 @@ class IFTTTHandler extends AbstractProcessingHandler
$postString = json_encode($postData);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://maker.ifttt.com/trigger/" . $this->_eventName . "/with/key/" . $this->_secretKey);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_URL, "https://maker.ifttt.com/trigger/" . $this->eventName . "/with/key/" . $this->secretKey);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $postString);
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
"Content-Type: application/json"