GuzzleFactoryHelper   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 9
Duplicated Lines 0 %

Importance

Changes 3
Bugs 0 Features 0
Metric Value
eloc 4
c 3
b 0
f 0
dl 0
loc 9
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A createResolvedPromise() 0 7 1
1
<?php
2
3
declare(strict_types=1);
4
5
/*
6
 * This file is part of forecast.it.fill project.
7
 * (c) Patrick Jaja <[email protected]>
8
 * This source file is subject to the MIT license that is bundled
9
 * with this source code in the file LICENSE.
10
 */
11
12
namespace ForecastAutomationTests\GuzzleClient\Shared;
13
14
use GuzzleHttp\Promise\Promise;
15
use GuzzleHttp\Promise\PromiseInterface;
16
use PHPUnit\Framework\TestCase;
17
18
/**
19
 * @internal
20
 * @coversNothing
21
 */
22
class GuzzleFactoryHelper extends TestCase
23
{
24
    public function createResolvedPromise($data): PromiseInterface
25
    {
26
        $resolvedPromise = new Promise(function () use (&$resolvedPromise, $data) {
27
            $resolvedPromise->resolve($data);
28
        });
29
30
        return $resolvedPromise;
31
    }
32
}
33