Completed
Pull Request — 8.x-3.x (#481)
by Sebastian
08:49 queued 04:11
created

SubRequestResponse::getResult()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 0
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace Drupal\graphql\GraphQL\Buffers;
4
5
use Symfony\Component\HttpFoundation\Response;
6
7
class SubRequestResponse extends Response {
8
9
  /**
10
   * The request result.
11
   *
12
   * @var mixed
13
   */
14
  protected $result;
15
16
  /**
17
   * SubrequestResponse constructor.
18
   *
19
   * @param mixed $result
20
   *   The request result.
21
   * @param int $status
22
   *   The response status code.
23
   * @param array $headers
24
   *   An array of response headers.
25
   */
26
  public function __construct(array $result, $status = 200, array $headers = []) {
27
    parent::__construct('', $status, $headers);
28
    $this->result = $result;
29
  }
30
31
  /**
32
   * Gets the request result.
33
   *
34
   * @return mixed
35
   *   The request result.
36
   */
37
  public function getResult() {
38
    return $this->result;
39
  }
40
41
}