Completed
Push — master ( 494091...32c874 )
by David
27s
created

lib/Dwoo/Adapters/Agavi/dwoo_plugins/url.php (1 issue)

Severity

Upgrade to new PHP Analysis Engine

These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more

1
<?php
2
3
/**
4
 * Copyright (c) 2013-2016
5
 *
6
 * @category  Library
7
 * @package   Dwoo\Adapters\Agavi\dwoo_plugins
8
 * @author    Jordi Boggiano <[email protected]>
9
 * @author    David Sanchez <[email protected]>
10
 * @copyright 2008-2013 Jordi Boggiano
11
 * @copyright 2013-2016 David Sanchez
12
 * @license   http://dwoo.org/LICENSE Modified BSD License
13
 * @version   1.3.0
14
 * @date      2016-09-19
15
 * @link      http://dwoo.org/
16
 */
17
function Dwoo_Plugin_url_compile(Dwoo_Compiler $compiler, $route = null, $params = null, $options = null, array $rest = array())
0 ignored issues
show
The parameter $compiler is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
18
{
19
    if ($params == 'null') {
20
        if (count($rest)) {
21
            $params = array();
22
            foreach ($rest as $k => $v) {
23
                if (is_numeric($k)) {
24
                    $params[] = $k.'=>'.$v;
25
                } else {
26
                    $params[] = '"'.$k.'"=>'.$v;
27
                }
28
            }
29
            $params = 'array('.implode(', ', $params).')';
30
        } else {
31
            $params = 'array()';
32
        }
33
    }
34
    if ($options == 'null') {
35
        $options = 'array()';
36
    }
37
38
    return '$this->data[\'ro\']->gen('.$route.', '.$params.', '.$options.')';
39
}
40