Scrutinizer GitHub App not installed

We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.

Install GitHub App

Completed
Pull Request — master (#73)
by Jérémiah
05:22
created

ReactPromiseAdapter   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 2
dl 0
loc 22
ccs 0
cts 11
cp 0
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A wait() 0 12 2
1
<?php
2
3
/*
4
 * This file is part of the OverblogGraphQLBundle package.
5
 *
6
 * (c) Overblog <http://github.com/overblog/>
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 Overblog\GraphQLBundle\Executor\Promise\Adapter;
13
14
use GraphQL\Executor\ExecutionResult;
15
use GraphQL\Executor\Promise\Adapter\ReactPromiseAdapter as BaseReactPromiseAdapter;
16
use GraphQL\Executor\Promise\Promise;
17
use Overblog\GraphQLBundle\Executor\Promise\PromiseAdapterInterface;
18
19
class ReactPromiseAdapter extends BaseReactPromiseAdapter implements PromiseAdapterInterface
20
{
21
    /**
22
     * Synchronously wait when promise completes.
23
     *
24
     * @param Promise $promise
25
     *
26
     * @return ExecutionResult
27
     */
28
    public function wait(Promise $promise)
29
    {
30
        if (!static::isThenable($promise)) {
31
            return;
32
        }
33
        $resolvedValue = null;
34
        $promise->then(function ($values) use (&$resolvedValue) {
35
            $resolvedValue = $values;
36
        });
37
38
        return $resolvedValue;
39
    }
40
}
41