Completed
Push — master ( 76469b...99b48b )
by Jan Philip
12:47
created

FMeatClient   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 3

Importance

Changes 0
Metric Value
dl 0
loc 17
c 0
b 0
f 0
wmc 2
lcom 1
cbo 3
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 6 1
A getCurrentWeekForLocation() 0 4 1
1
<?php
2
3
namespace JPBernius\FMeat;
4
5
use JPBernius\FMeat\Configurations\Locations;
6
use JPBernius\FMeat\Entities\Week;
7
use JPBernius\FMeat\Services\NetworkService;
8
use DI\ContainerBuilder;
9
10
class FMeatClient
11
{
12
    /** @var NetworkService */
13
    private $networkService;
14
15
	public function __construct()
16
    {
17
        $container = ContainerBuilder::buildDevContainer();
18
19
        $this->networkService = $container->get(NetworkService::class);
20
    }
21
22
    public function getCurrentWeekForLocation(string $location = Locations::FMI_BISTRO): Week
23
    {
24
        return $this->networkService->getCurrentWeekWithLocation($location);
25
    }
26
}