X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs-website;a=blobdiff_plain;f=vendor%2Fbehat%2Fbehat%2Fsrc%2FBehat%2FBehat%2FContext%2FSnippet%2FGenerator%2FAggregateContextIdentifier.php;fp=vendor%2Fbehat%2Fbehat%2Fsrc%2FBehat%2FBehat%2FContext%2FSnippet%2FGenerator%2FAggregateContextIdentifier.php;h=0000000000000000000000000000000000000000;hp=632d93775fd4e1ab83f488e0581921cd3a2c2550;hb=af6d1fb995500ae68849458ee10d66abbdcfb252;hpb=680c79a86e3ed402f263faeac92e89fb6d9edcc0 diff --git a/vendor/behat/behat/src/Behat/Behat/Context/Snippet/Generator/AggregateContextIdentifier.php b/vendor/behat/behat/src/Behat/Behat/Context/Snippet/Generator/AggregateContextIdentifier.php deleted file mode 100644 index 632d93775..000000000 --- a/vendor/behat/behat/src/Behat/Behat/Context/Snippet/Generator/AggregateContextIdentifier.php +++ /dev/null @@ -1,56 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Behat\Behat\Context\Snippet\Generator; - -use Behat\Behat\Context\Environment\ContextEnvironment; - -/** - * Uses multiple child identifiers - the first one that returns non-null result would - * be the winner. - * - * This behaviour was introduced in 3.x to support the BC for interface-focused - * context identifier, while providing better user experience (no need to explicitly - * call `--snippets-for` on `--append-snippets` when contexts do not implement any - * snippet accepting interfaces). - */ -final class AggregateContextIdentifier implements TargetContextIdentifier -{ - /** - * @var TargetContextIdentifier[] - */ - private $identifiers; - - /** - * Initialises identifier. - * - * @param TargetContextIdentifier[] $identifiers - */ - public function __construct(array $identifiers) - { - $this->identifiers = $identifiers; - } - - /** - * {@inheritdoc} - */ - public function guessTargetContextClass(ContextEnvironment $environment) - { - foreach ($this->identifiers as $identifier) { - $contextClass = $identifier->guessTargetContextClass($environment); - - if (null !== $contextClass) { - return $contextClass; - } - } - - return null; - } -}