| Conditions | 6 | 
| Paths | 7 | 
| Total Lines | 26 | 
| Lines | 0 | 
| Ratio | 0 % | 
| Tests | 15 | 
| CRAP Score | 6 | 
| Changes | 0 | ||
| 1 | <?php | ||
| 27 | public function parse(InlineParserContext $inlineContext): bool | ||
| 28 | 4 |     { | |
| 29 | 4 | $cursor = $inlineContext->getCursor(); | |
| 30 | 3 |         if ('{' !== $cursor->getNextNonSpaceCharacter()) { | |
| 31 | return false; | ||
| 32 | } | ||
| 33 | 4 | ||
| 34 | 4 | $char = $cursor->getCharacter(); | |
| 35 | 4 |         if ('{' === $char) { | |
| 36 | $char = (string) $cursor->getCharacter($cursor->getPosition() - 1); | ||
| 37 | } | ||
| 38 | 4 | ||
| 39 | 4 | $attributes = AttributesUtils::parse($cursor); | |
| 40 | 1 |         if (empty($attributes)) { | |
| 41 | return false; | ||
| 42 | } | ||
| 43 | 4 | ||
| 44 | 3 |         if ('' === $char) { | |
| 45 | $cursor->advanceToNextNonSpaceOrNewline(); | ||
| 46 | } | ||
| 47 | 4 | ||
| 48 | 4 | $node = new AttributesInline($attributes, ' ' === $char || '' === $char); | |
| 49 | 4 | $inlineContext->getContainer()->appendChild($node); | |
| 50 | |||
| 51 | 4 | return true; | |
| 52 | } | ||
| 53 | } | ||
| 54 |