Completed
Push — 8.x-3.x ( 62b354...cffcac )
by Sebastian
06:04 queued 03:12
created

DenyQuery::check()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 2
eloc 3
nc 2
nop 1
dl 0
loc 5
rs 9.4285
c 0
b 0
f 0
1
<?php
2
3
namespace Drupal\graphql\Cache\RequestPolicy;
4
5
use Drupal\Core\PageCache\RequestPolicyInterface;
6
use Symfony\Component\HttpFoundation\Request;
7
8
class DenyQuery implements RequestPolicyInterface {
9
10
  /**
11
   * {@inheritdoc}
12
   */
13
  public function check(Request $request) {
14
    if ($request->attributes->has('_graphql')) {
15
      return static::DENY;
16
    }
17
  }
18
19
}
20