GalleryService::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 11
Code Lines 9

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
dl 0
loc 11
rs 9.4285
c 1
b 0
f 0
cc 1
eloc 9
nc 1
nop 4
1
<?php
2
3
namespace JeroenG\LaravelPhotoGallery\Services;
4
5
use JeroenG\LaravelPhotoGallery\Contracts as Contracts;
6
7
class GalleryService
8
{
9
    private $adapters;
10
11
    public function __construct(
12
        Contracts\AlbumAdapter $albumAdapter,
13
        Contracts\PhotoAdapter $photoAdapter,
14
        Contracts\UserAdapter $userAdapter,
15
        Contracts\TagAdapter $tagAdapter
16
    ) {
17
        $this->adapters['album'] = $albumAdapter;
18
        $this->adapters['photo'] = $photoAdapter;
19
        $this->adapters['user'] = $userAdapter;
20
        $this->adapters['tag'] = $tagAdapter;
21
    }
22
23
    public function sayHello()
24
    {
25
        return 'hi';
26
    }
27
28
    public function album()
29
    {
30
        return $this->adapters['album'];
31
    }
32
33
     public function photo()
34
    {
35
        return $this->adapters['photo'];
36
    }
37
38
     public function user()
39
    {
40
        return $this->adapters['user'];
41
    }
42
43
     public function tag()
44
    {
45
        return $this->adapters['tag'];
46
    }
47
}