Completed
Push — master ( a1a386...b15fa9 )
by arto
04:17
created

LoggingDispatcher::dispatch()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 6
rs 9.4286
cc 1
eloc 3
nc 1
nop 2
1
<?php
2
/**
3
 * @author stev leibelt <[email protected]>
4
 * @since 2015-12-21
5
 */
6
7
namespace Net\Bazzline\Component\Curl\Dispatcher;
8
9
use Net\Bazzline\Component\Curl\Response\Response;
10
11
class LoggingDispatcher extends Dispatcher
12
{
13
    /**
14
     * @param string $url
15
     * @param array $options
16
     * @return Response
17
     */
18
    public function dispatch($url, array $options = array())
19
    {
20
        $this->log($url, $options);
21
22
        return parent::dispatch($url, $options);
23
    }
24
25
    /**
26
     * @param $url
27
     * @param array $options
28
     */
29
    protected function log($url, array $options)
30
    {
31
        echo 'url: ' . $url . PHP_EOL;
32
        echo 'options: ' . PHP_EOL;
33
        echo var_export($options, true) . PHP_EOL;
34
    }
35
}
36