MediaAssetsFinder   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 2
Bugs 0 Features 0
Metric Value
wmc 1
c 2
b 0
f 0
lcom 0
cbo 0
dl 0
loc 14
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A assetsFilter() 0 6 1
1
<?php
2
3
namespace AssetsFinder\src\Services;
4
5
class MediaAssetsFinder {
6
7
    /**
8
     * @param string $content
9
     * 
10
     * @return string
11
     */
12
    public static function assetsFilter($content, $ext) {                
13
        $Pattern = '/((https?:\/\/)?(\w+?\.)+?(\w+?\/)+\w+?.('.$ext.'))/im';
14
        preg_match_all($Pattern, $content, $Matches);
15
        
16
        return $Matches[0];
17
    }
18
}
19