RawDrupalContext   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 34
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

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

3 Methods

Rating   Name   Duplication   Size   Complexity  
A setContainer() 0 3 1
A getContainer() 0 3 1
A getCore() 0 3 1
1
<?php
2
3
namespace NuvoleWeb\Drupal\DrupalExtension\Context;
4
5
use Behat\Behat\Context\SnippetAcceptingContext;
6
use Drupal\DrupalExtension\Context\RawDrupalContext as OriginalRawDrupalContext;
7
use Symfony\Component\DependencyInjection\ContainerBuilder;
8
9
/**
10
 * Class RawDrupalContext.
11
 *
12
 * @package NuvoleWeb\Drupal\DrupalExtension\Context
13
 */
14
class RawDrupalContext extends OriginalRawDrupalContext implements ServiceContainerAwareInterface, SnippetAcceptingContext {
0 ignored issues
show
Deprecated Code introduced by
The interface Behat\Behat\Context\SnippetAcceptingContext has been deprecated with message: will be removed in 4.0. Use --snippets-for CLI option instead

This class, trait or interface has been deprecated. The supplier of the file has supplied an explanatory message.

The explanatory message should give you some clue as to whether and when the type will be removed from the class and what other constant to use instead.

Loading history...
15
16
  /**
17
   * Service container instance.
18
   *
19
   * @var ContainerBuilder
20
   */
21
  private $container;
22
23
  /**
24
   * {@inheritdoc}
25
   */
26
  public function setContainer(ContainerBuilder $container) {
27
    $this->container = $container;
28
  }
29
30
  /**
31
   * {@inheritdoc}
32
   */
33
  public function getContainer() {
34
    return $this->container;
35
  }
36
37
  /**
38
   * Get current Drupal core.
39
   *
40
   * @return \NuvoleWeb\Drupal\Driver\Cores\CoreInterface|\Drupal\Driver\Cores\CoreInterface
41
   *    Drupal core object instance.
42
   */
43
  public function getCore() {
44
    return $this->getDriver()->getCore();
45
  }
46
47
}
48