File: function.tpl

package info (click to toggle)
php-mock 2.6.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 340 kB
  • sloc: php: 1,740; makefile: 18; xml: 17; sh: 7
file content (17 lines) | stat: -rw-r--r-- 377 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
namespace {namespace};

use phpmock\generator\MockFunctionGenerator;

function {name}({signatureParameters})
{
    $arguments = [{bodyParameters}];

    $variadics = \array_slice(\func_get_args(), \count($arguments));
    $arguments = \array_merge($arguments, $variadics);

    return MockFunctionGenerator::call(
        '{name}',
        '{fqfn}',
        $arguments
    );
}