AMQPSocketConnection   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Importance

Changes 2
Bugs 0 Features 1
Metric Value
eloc 6
c 2
b 0
f 1
dl 0
loc 18
rs 10
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A create_connection() 0 6 1
1
<?php
2
3
namespace OldSound\RabbitMqBundle\Tests\RabbitMq\Fixtures;
4
5
use PhpAmqpLib\Connection\AMQPSocketConnection as BaseAMQPSocketConnection;
6
7
class AMQPSocketConnection extends BaseAMQPSocketConnection
8
{
9
    public $constructParams;
10
11
    public static $createConnectionParams;
12
13
    public function __construct()
14
    {
15
        // save params for direct access in tests
16
        $this->constructParams = func_get_args();
17
    }
18
19
    public static function create_connection($hosts, $options = [])
20
    {
21
        // save params for direct access in tests
22
        self::$createConnectionParams = func_get_args();
23
24
        return parent::create_connection($hosts, $options);
0 ignored issues
show
Deprecated Code introduced by
The function PhpAmqpLib\Connection\Ab...on::create_connection() has been deprecated: Use AMQPConnectionFactory. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-deprecated  annotation

24
        return /** @scrutinizer ignore-deprecated */ parent::create_connection($hosts, $options);

This function has been deprecated. The supplier of the function has supplied an explanatory message.

The explanatory message should give you some clue as to whether and when the function will be removed and what other function to use instead.

Loading history...
25
    }
26
}
27