| Conditions | 4 |
| Paths | 3 |
| Total Lines | 15 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 8 |
| CRAP Score | 4 |
| Changes | 0 | ||
| 1 | <?php |
||
| 25 | 18 | public function tryStart(Cursor $cursor, MarkdownParserStateInterface $parserState): ?BlockStart |
|
| 26 | { |
||
| 27 | 18 | $originalPosition = $cursor->getPosition(); |
|
| 28 | 18 | $attributes = AttributesHelper::parseAttributes($cursor); |
|
| 29 | |||
| 30 | 18 | if ($attributes === [] && $originalPosition === $cursor->getPosition()) { |
|
| 31 | 9 | return BlockStart::none(); |
|
| 32 | } |
||
| 33 | |||
| 34 | 15 | if ($cursor->getNextNonSpaceCharacter() !== null) { |
|
| 35 | 6 | return BlockStart::none(); |
|
| 36 | } |
||
| 37 | |||
| 38 | 15 | return BlockStart::of(new AttributesBlockContinueParser($attributes, $parserState->getActiveBlockParser()->getBlock()))->at($cursor); |
|
| 39 | } |
||
| 40 | } |
||
| 41 |