| Conditions | 1 |
| Paths | 1 |
| Total Lines | 14 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 8 |
| CRAP Score | 1 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 16 | 1 | protected function blockHeader($Line) |
|
|
|
|||
| 17 | { |
||
| 18 | 1 | $Block = parent::blockHeader($Line); |
|
| 19 | |||
| 20 | // Create our unique ids by sanitizing the header content |
||
| 21 | 1 | $id = strtolower($Block['element']['text']); |
|
| 22 | 1 | $id = str_replace(' ', '-', $id); |
|
| 23 | 1 | $id = preg_replace('/[^0-9a-zA-Z-_]/', '', $id); |
|
| 24 | 1 | $id = preg_replace('/-+/', '-', $id); |
|
| 25 | |||
| 26 | 1 | $Block['element']['attributes']['id'] = $id; |
|
| 27 | |||
| 28 | 1 | return $Block; |
|
| 29 | } |
||
| 30 | |||
| 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.