NullStorageAdapter::getAchievementsForUser()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 1
1
<?php
2
/**
3
 * The NullStorageAdapter doesn't actually store any achievements.
4
 * It just receives them and send them into the void.
5
 *
6
 * @category  AxalianAchievements\StorageAdapter
7
 * @package   AxalianAchievements\StorageAdapter
8
 * @author    Michel Maas <[email protected]>
9
 */
10
11
namespace AxalianAchievements\StorageAdapter;
12
13
use AxalianAchievements\Entity\Achievement;
14
use AxalianAchievements\User\UserInterface;
15
16
class NullStorageAdapter implements StorageAdapterInterface
17
{
18
19
    /**
20
     * {@inheritDoc}
21
     */
22
    public function getAchievementsForUser(UserInterface $user)
23
    {
24
        return array();
25
    }
26
27
    /**
28
     * {@inheritDoc}
29
     */
30
    public function awardAchievementToUser(Achievement $achievement, UserInterface $user)
31
    {
32
        return true;
33
    }
34
35
    /**
36
     * {@inheritDoc}
37
     */
38
    public function removeAchievementFromUser(Achievement $achievement, UserInterface $user)
39
    {
40
        return true;
41
    }
42
}
43