Completed
Pull Request — master (#339)
by Luc
04:36
created

LocalityAddressFormatter::format()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 6
rs 9.4285
cc 1
eloc 4
nc 1
nop 1
1
<?php
2
3
namespace CultuurNet\UDB3\Address;
4
5
class LocalityAddressFormatter implements AddressFormatterInterface
6
{
7
    /**
8
     * @inheritdoc
9
     */
10
    public function format(Address $address)
11
    {
12
        return $address->getPostalCode() . ' ' .
13
            $address->getLocality() . ', ' .
14
            $address->getCountry()->getCode();
15
    }
16
}
17