Conditions | 7 |
Paths | 7 |
Total Lines | 25 |
Code Lines | 17 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
32 | function smartpartner_seo_genUrl($op, $id, $title = '') |
||
33 | { |
||
34 | if (defined('SEO_ENABLED')) { |
||
35 | if (SEO_ENABLED === 'rewrite') { |
||
36 | // generate SEO url using htaccess |
||
37 | return XOOPS_URL . "/smartpartner.${op}.${id}/" . smartpartner_seo_title($title); |
||
38 | } elseif (SEO_ENABLED === 'path-info') { |
||
39 | // generate SEO url using path-info |
||
40 | return XOOPS_URL . "/modules/smartpartner/seo.php/${op}.${id}/" . smartpartner_seo_title($title); |
||
41 | } else { |
||
42 | die('Unknown SEO method.'); |
||
43 | } |
||
44 | } else { |
||
45 | // generate classic url |
||
46 | switch ($op) { |
||
47 | case 'category': |
||
48 | return XOOPS_URL . "/modules/smartpartner/index.php?view_category_id=${id}"; |
||
49 | case 'item': |
||
50 | case 'print': |
||
51 | return XOOPS_URL . "/modules/smartpartner/${op}.php?itemid=${id}"; |
||
52 | default: |
||
53 | die('Unknown SEO operation.'); |
||
54 | } |
||
55 | } |
||
56 | } |
||
57 |
This check compares the return type specified in the
@return
annotation of a function or method doc comment with the types returned by the function and raises an issue if they mismatch.