| Conditions | 3 |
| Paths | 4 |
| Total Lines | 17 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 12 |
| Changes | 0 | ||
| 1 | <?php |
||
| 31 | public function blockFencedCodeComplete ($block) |
||
| 32 | { |
||
| 33 | // The class has a `language-` prefix, remove this to get the language |
||
| 34 | if (isset($block['element']['text']['attributes'])) |
||
| 35 | { |
||
| 36 | $language = substr($block['element']['text']['attributes']['class'], 9); |
||
| 37 | |||
| 38 | try |
||
| 39 | { |
||
| 40 | $highlighted = $this->highlighter->highlight($language, $block['element']['text']['text']); |
||
| 41 | $block['element']['text']['text'] = $highlighted->value; |
||
| 42 | } |
||
| 43 | catch (\DomainException $exception) {} |
||
| 44 | } |
||
| 45 | |||
| 46 | return $block; |
||
| 47 | } |
||
| 48 | } |
This check marks parameter names that have not been written in camelCase.
In camelCase names are written without any punctuation, the start of each new word being marked by a capital letter. Thus the name database connection string becomes
databaseConnectionString.