| Total Complexity | 15 |
| Total Lines | 43 |
| Duplicated Lines | 0 % |
| Changes | 2 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 5 | trait JScriptTrait |
||
| 6 | { |
||
| 7 | |||
| 8 | protected function checkInScript(bool $inScript, string $value): bool |
||
| 17 | } |
||
| 18 | |||
| 19 | protected function checkCommentInScript(bool $inComment, string $value): bool |
||
| 20 | { |
||
| 21 | if(strpos($value,'/*') && !strpos($value,'*/')){ |
||
| 22 | return true; |
||
| 23 | } |
||
| 24 | |||
| 25 | return (strpos($value,'*/')) ? false : $inComment; |
||
| 26 | } |
||
| 27 | |||
| 28 | protected function checkScriptNeed(bool $inComment, string $value): bool |
||
| 29 | { |
||
| 30 | if(($inComment || strpos($value,'//'))){ |
||
| 31 | return false; |
||
| 32 | } |
||
| 33 | return true; |
||
| 34 | } |
||
| 35 | |||
| 36 | protected function treatScript(string $value): string |
||
| 48 | } |
||
| 49 | |||
| 50 | } |
||
| 51 |