CafeGateway   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 4
Bugs 4 Features 0
Metric Value
wmc 2
c 4
b 4
f 0
lcom 0
cbo 2
dl 0
loc 13
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A placeOrder() 0 5 1
A receiveDelivery() 0 4 1
1
<?php
2
3
use PEIP\Gateway\SimpleMessagingGateway;
4
5
class CafeGateway extends SimpleMessagingGateway
6
{
7
    public function placeOrder(Order $order)
8
    {
9
        echo "\nCafe: place order #".$order->getOrderNumber();
10
        $this->send($order);
11
    }
12
13
    public function receiveDelivery()
14
    {
15
        return $this->receive();
16
    }
17
}
18