Completed
Pull Request — 3.x (#276)
by Maksim
04:26
created

AmqpConnectionFactoryStub   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 0
dl 0
loc 18
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A createContext() 0 4 1
1
<?php
2
namespace Sonata\NotificationBundle\Tests\Mocks;
3
4
use Interop\Amqp\AmqpConnectionFactory;
5
use Interop\Queue\PsrContext;
6
7
class AmqpConnectionFactoryStub implements AmqpConnectionFactory
8
{
9
    public static $config;
10
    public static $context;
11
12
    public function __construct($config)
13
    {
14
        static::$config = $config;
15
    }
16
17
    /**
18
     * @return PsrContext
19
     */
20
    public function createContext()
21
    {
22
        return static::$context;
23
    }
24
}
25