| Conditions | 4 | 
| Paths | 3 | 
| Total Lines | 18 | 
| Code Lines | 8 | 
| Lines | 0 | 
| Ratio | 0 % | 
| Tests | 12 | 
| CRAP Score | 4 | 
| Changes | 0 | ||
| 1 | <?php  | 
            ||
| 23 | 13 | public function run($ad_code)  | 
            |
| 24 | 	{ | 
            ||
| 25 | 13 | 		if (preg_match_all('/<script(.*)src(.*)>/U', $ad_code, $matches)) | 
            |
| 26 | 13 | 		{ | 
            |
| 27 | 8 | foreach ($matches[1] as $match)  | 
            |
| 28 | 			{ | 
            ||
| 29 | 8 | 				if (!preg_match('/ async/', $match)) | 
            |
| 30 | 8 | 				{ | 
            |
| 31 | return array(  | 
            ||
| 32 | 5 | 'severity' => 'notice',  | 
            |
| 33 | 5 | 'message' => 'SCRIPT_WITHOUT_ASYNC',  | 
            |
| 34 | 5 | );  | 
            |
| 35 | }  | 
            ||
| 36 | 4 | }  | 
            |
| 37 | 3 | }  | 
            |
| 38 | |||
| 39 | 8 | return false;  | 
            |
| 40 | }  | 
            ||
| 41 | }  | 
            ||
| 42 |