mirror of
https://github.com/Seldaek/monolog.git
synced 2025-08-08 06:06:40 +02:00
CS fixes, refs #623
This commit is contained in:
@@ -20,8 +20,8 @@ use Monolog\Logger;
|
|||||||
*/
|
*/
|
||||||
class IFTTTHandler extends AbstractProcessingHandler
|
class IFTTTHandler extends AbstractProcessingHandler
|
||||||
{
|
{
|
||||||
protected $_eventName;
|
private $eventName;
|
||||||
protected $_secretKey;
|
private $secretKey;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param string $eventName The name of the IFTTT Maker event that should be triggered
|
* @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)
|
public function __construct($eventName, $secretKey, $level = Logger::ERROR, $bubble = true)
|
||||||
{
|
{
|
||||||
$this->_eventName = $eventName;
|
$this->eventName = $eventName;
|
||||||
$this->_secretKey = $secretKey;
|
$this->secretKey = $secretKey;
|
||||||
|
|
||||||
parent::__construct($level, $bubble);
|
parent::__construct($level, $bubble);
|
||||||
}
|
}
|
||||||
@@ -50,10 +50,9 @@ class IFTTTHandler extends AbstractProcessingHandler
|
|||||||
$postString = json_encode($postData);
|
$postString = json_encode($postData);
|
||||||
|
|
||||||
$ch = curl_init();
|
$ch = curl_init();
|
||||||
|
curl_setopt($ch, CURLOPT_URL, "https://maker.ifttt.com/trigger/" . $this->eventName . "/with/key/" . $this->secretKey);
|
||||||
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_POST, 1);
|
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
||||||
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
|
|
||||||
curl_setopt($ch, CURLOPT_POSTFIELDS, $postString);
|
curl_setopt($ch, CURLOPT_POSTFIELDS, $postString);
|
||||||
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
|
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
|
||||||
"Content-Type: application/json"
|
"Content-Type: application/json"
|
||||||
|
Reference in New Issue
Block a user