| Conditions | 4 |
| Paths | 4 |
| Total Lines | 17 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 8 |
| CRAP Score | 4.0218 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 24 | 1542 | public function tryStart(Cursor $cursor, MarkdownParserStateInterface $parserState): ?BlockStart |
|
| 25 | { |
||
| 26 | 1542 | if (! $cursor->isIndented()) { |
|
| 27 | 1356 | return BlockStart::none(); |
|
| 28 | } |
||
| 29 | |||
| 30 | 195 | if ($parserState->getActiveBlockParser()->getBlock() instanceof Paragraph) { |
|
| 31 | 39 | return BlockStart::none(); |
|
| 32 | } |
||
| 33 | |||
| 34 | 156 | if ($cursor->isBlank()) { |
|
| 35 | return BlockStart::none(); |
||
| 36 | } |
||
| 37 | |||
| 38 | 156 | $cursor->advanceBy(Cursor::INDENT_LEVEL, true); |
|
| 39 | |||
| 40 | 156 | return BlockStart::of(new IndentedCodeParser())->at($cursor); |
|
| 41 | } |
||
| 43 |