mirror of
https://github.com/Seldaek/monolog.git
synced 2025-10-24 01:56:18 +02:00
Use fully-qualified name for native functions (#1887)
This commit is contained in:
@@ -63,7 +63,7 @@ class SlackHandler extends SocketHandler
|
||||
?float $connectionTimeout = null,
|
||||
?int $chunkSize = null
|
||||
) {
|
||||
if (!extension_loaded('openssl')) {
|
||||
if (!\extension_loaded('openssl')) {
|
||||
throw new MissingExtensionException('The OpenSSL PHP extension is required to use the SlackHandler');
|
||||
}
|
||||
|
||||
@@ -129,7 +129,7 @@ class SlackHandler extends SocketHandler
|
||||
$dataArray = $this->slackRecord->getSlackData($record);
|
||||
$dataArray['token'] = $this->token;
|
||||
|
||||
if (isset($dataArray['attachments']) && is_array($dataArray['attachments']) && \count($dataArray['attachments']) > 0) {
|
||||
if (isset($dataArray['attachments']) && \is_array($dataArray['attachments']) && \count($dataArray['attachments']) > 0) {
|
||||
$dataArray['attachments'] = Utils::jsonEncode($dataArray['attachments']);
|
||||
}
|
||||
|
||||
@@ -144,7 +144,7 @@ class SlackHandler extends SocketHandler
|
||||
$header = "POST /api/chat.postMessage HTTP/1.1\r\n";
|
||||
$header .= "Host: slack.com\r\n";
|
||||
$header .= "Content-Type: application/x-www-form-urlencoded\r\n";
|
||||
$header .= "Content-Length: " . strlen($content) . "\r\n";
|
||||
$header .= "Content-Length: " . \strlen($content) . "\r\n";
|
||||
$header .= "\r\n";
|
||||
|
||||
return $header;
|
||||
@@ -168,7 +168,7 @@ class SlackHandler extends SocketHandler
|
||||
protected function finalizeWrite(): void
|
||||
{
|
||||
$res = $this->getResource();
|
||||
if (is_resource($res)) {
|
||||
if (\is_resource($res)) {
|
||||
@fread($res, 2048);
|
||||
}
|
||||
$this->closeSocket();
|
||||
|
||||
Reference in New Issue
Block a user