Conditions | 3 |
Paths | 3 |
Total Lines | 16 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Tests | 7 |
CRAP Score | 3.0175 |
Changes | 0 |
1 | <?php |
||
34 | 2 | public function generateCompareUrl($sourceUrlFrom, Version $versionFrom, $sourceUrlTo, Version $versionTo) |
|
35 | { |
||
36 | 2 | if (preg_match('#plugins.svn.wordpress.org/(.*)/#', $sourceUrlTo, $matches)) { |
|
37 | 2 | $plugin = $matches[1]; |
|
38 | |||
39 | 2 | return sprintf('https://wordpress.org/plugins/%s/changelog/', $plugin); |
|
40 | } |
||
41 | |||
42 | 2 | if (preg_match('#themes.svn.wordpress.org/(.*)/#', $sourceUrlTo, $matches)) { |
|
43 | 2 | $theme = $matches[1]; |
|
44 | |||
45 | 2 | return sprintf('https://themes.trac.wordpress.org/log/%s/', $theme); |
|
46 | } |
||
47 | |||
48 | return false; |
||
49 | } |
||
50 | |||
59 |