Completed
Push — master ( 9672ef...b72795 )
by Ivannis Suárez
02:30
created

DoneResolver   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 2
Bugs 0 Features 1
Metric Value
wmc 2
c 2
b 0
f 1
lcom 0
cbo 1
dl 0
loc 23
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 7 1
A onInnerFailure() 0 4 1
1
<?php
2
3
/*
4
 * This file is part of the Cubiche package.
5
 *
6
 * Copyright (c) Cubiche
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace Cubiche\Core\Async\Promise;
13
14
/**
15
 * Done Resolver class.
16
 *
17
 * @author Karel Osorio Ramírez <[email protected]>
18
 */
19
class DoneResolver extends ObservableResolver
20
{
21
    /**
22
     * @param callable $onFulfilled
23
     * @param callable $onRejected
24
     * @param callable $onNotify
25
     */
26
    public function __construct(
27
        callable $onFulfilled = null,
28
        callable $onRejected = null,
29
        callable $onNotify = null
30
    ) {
31
        parent::__construct($onFulfilled, $onRejected, $onNotify);
32
    }
33
34
    /**
35
     * {@inheritdoc}
36
     */
37
    protected function onInnerFailure(\Exception $reason)
38
    {
39
        throw $reason;
40
    }
41
}
42