Security update for permissions_by_term
[yaffs-website] / vendor / behat / behat / src / Behat / Behat / Context / Snippet / Generator / FixedPatternIdentifier.php
1 <?php
2
3 /*
4  * This file is part of the Behat.
5  * (c) Konstantin Kudryashov <ever.zet@gmail.com>
6  *
7  * For the full copyright and license information, please view the LICENSE
8  * file that was distributed with this source code.
9  */
10
11 namespace Behat\Behat\Context\Snippet\Generator;
12
13 use Behat\Behat\Context\Context;
14
15 /**
16  * Identifier that always returns same pattern type.
17  *
18  * @author Konstantin Kudryashov <ever.zet@gmail.com>
19  */
20 final class FixedPatternIdentifier implements PatternIdentifier
21 {
22     /**
23      * @var string
24      */
25     private $patternType;
26
27     /**
28      * Initialises identifier.
29      *
30      * @param string $patternType
31      */
32     public function __construct($patternType)
33     {
34         $this->patternType = $patternType;
35     }
36
37     /**
38      * {@inheritdoc}
39      */
40     public function guessPatternType($contextClass)
41     {
42         return $this->patternType;
43     }
44 }