Completed
Push — master ( 9d457f...574e8f )
by Jesse
02:48
created

BlindObserver   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 2
dl 0
loc 15
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A hydrating() 0 2 1
A add() 0 3 1
1
<?php
2
3
declare(strict_types = 1);
4
5
namespace Stratadox\Hydrator;
6
7
/**
8
 * Null object for *not* observing the hydration process.
9
 *
10
 * @package Stratadox\Hydrate
11
 * @author Stratadox
12
 */
13
final class BlindObserver implements ObservesHydration
14
{
15
    /**
16
     * Creates a new blind observer.
17
     *
18
     * @return self
19
     */
20
    public static function add() : self
21
    {
22
        return new self;
23
    }
24
25
    /** @inheritdoc */
26
    public function hydrating($theInstance) : void
27
    {
28
        // No operation.
29
    }
30
}
31