Completed
Push — master ( ffe848...b5c10d )
by Jonathan
03:56
created

AnnotatedDefinitionProposal   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 0
dl 0
loc 14
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A generateSnippet() 0 12 1
1
<?php
2
/**
3
 * @file
4
 * Override the output of proposed methods to match Drupal coding standards.
5
 */
6
7
namespace Drupal\DrupalExtension\Definition\Proposal;
8
9
use Behat\Behat\Definition\Proposal\AnnotatedDefinitionProposal as BaseAnnotatedDefinitionProposal;
10
11
class AnnotatedDefinitionProposal extends BaseAnnotatedDefinitionProposal {
12
  protected function generateSnippet($regex, $methodName, array $args) {
13
    return sprintf(<<<PHP
14
  /**
15
   * @%s /^%s$/
16
   */
17
  public function %s(%s) {
18
    throw new PendingException();
19
  }
20
PHP
21
      , '%s', $regex, $methodName, implode(', ', $args)
22
    );
23
  }
24
}
25