UnderstandAsyncHandler   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
c 1
b 0
f 0
lcom 1
cbo 1
dl 0
loc 27
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A send() 0 17 1
1
<?php namespace UnderstandMonolog\Handler;
2
3
class UnderstandAsyncHandler extends UnderstandBaseHandler
4
{
5
6
    /**
7
     * Send data to storage
8
     *
9
     * @param string $requestData
10
     * @return void
11
     */
12
    protected function send($requestData)
13
    {
14
        $parts = [
15
            'curl',
16
            '-X POST',
17
            '--cacert',
18
            $this->sslBundlePath,
19
            '-d',
20
            escapeshellarg($requestData),
21
            $this->getEndpoint(),
22
            '> /dev/null 2>&1 &'
23
        ];
24
25
        $cmd = implode(' ', $parts);
26
27
        exec($cmd);
28
    }
29
}