Conditions | 3 |
Paths | 3 |
Total Lines | 23 |
Code Lines | 12 |
Lines | 0 |
Ratio | 0 % |
Changes | 2 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
14 | public static function GameBox($htmlcontent) |
||
|
|||
15 | { |
||
16 | //Match for :123: |
||
17 | preg_match_all('/\:([0-9]+)\:/', $htmlcontent, $match); |
||
18 | |||
19 | foreach ($match[1] as $item) { |
||
20 | $game = Game::whereId($item)->first(); |
||
21 | |||
22 | $html = view('_partials.inline_gamebox', [ |
||
23 | 'game' => $game, |
||
24 | ]); |
||
25 | |||
26 | if ($game) { |
||
27 | $htmlcontent = str_replace(':'.$item.':', $html, $htmlcontent); |
||
28 | } |
||
29 | } |
||
30 | |||
31 | $htmlcontent = self::TextColor($htmlcontent); |
||
32 | $htmlcontent = self::StrikeText($htmlcontent); |
||
33 | $htmlcontent = self::BlockQuote($htmlcontent); |
||
34 | |||
35 | return $htmlcontent; |
||
36 | } |
||
37 | |||
58 |
Our type inference engine in quite powerful, but sometimes the code does not provide enough clues to go by. In these cases we request you to add a
@return
annotation as described here.