DelimiterProcessorCollectionInterface
last analyzed

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
dl 0
loc 27
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
add() 0 1 ?
getDelimiterProcessor() 0 1 ?
getDelimiterCharacters() 0 1 ?
1
<?php
2
3
/*
4
 * This file is part of the league/commonmark package.
5
 *
6
 * (c) Colin O'Dell <[email protected]>
7
 *
8
 * Original code based on the CommonMark JS reference parser (https://bitly.com/commonmark-js)
9
 *  - (c) John MacFarlane
10
 *
11
 * Additional emphasis processing code based on commonmark-java (https://github.com/atlassian/commonmark-java)
12
 *  - (c) Atlassian Pty Ltd
13
 *
14
 * For the full copyright and license information, please view the LICENSE
15
 * file that was distributed with this source code.
16
 */
17
18
namespace League\CommonMark\Delimiter\Processor;
19
20
interface DelimiterProcessorCollectionInterface
21
{
22
    /**
23
     * Add the given delim processor to the collection
24
     *
25
     * @param DelimiterProcessorInterface $processor The delim processor to add
26
     *
27
     * @throws \InvalidArgumentException Exception will be thrown if attempting to add multiple processors for the same character
28
     */
29
    public function add(DelimiterProcessorInterface $processor);
30
31
    /**
32
     * Returns the delim processor which handles the given character if one exists
33
     *
34
     * @param string $char
35
     *
36
     * @return DelimiterProcessorInterface|null
37
     */
38
    public function getDelimiterProcessor(string $char): ?DelimiterProcessorInterface;
39
40
    /**
41
     * Returns an array of delimiter characters who have associated processors
42
     *
43
     * @return string[]
44
     */
45
    public function getDelimiterCharacters(): array;
46
}
47