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

DenyQuery   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
dl 0
loc 12
rs 10
c 0
b 0
f 0
wmc 2
lcom 0
cbo 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A check() 0 5 2
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