AbstractCall   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 3
c 1
b 0
f 0
dl 0
loc 25
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A __call() 0 3 1
1
<?php
2
3
/**
4
 * AbstractCall.php
5
 *
6
 * Base class for js calls and selectors.
7
 *
8
 * @package jaxon-core
9
 * @author Thierry Feuzeu <[email protected]>
10
 * @copyright 2024 Thierry Feuzeu <[email protected]>
11
 * @license https://opensource.org/licenses/BSD-3-Clause BSD 3-Clause License
12
 * @link https://github.com/jaxon-php/jaxon-core
13
 */
14
15
namespace Jaxon\Script;
16
17
use Jaxon\Plugin\Response\Dialog\DialogCommand;
18
19
abstract class AbstractCall
20
{
21
    /**
22
     * @var DialogCommand
23
     */
24
    protected $xDialog;
25
26
    /**
27
     * Create a js expression
28
     *
29
     * @return JsExpr
30
     */
31
    abstract protected function _expr(): JsExpr;
32
33
    /**
34
     * Add a call to a js function on the current object
35
     *
36
     * @param string  $sMethod
37
     * @param array  $aArguments
38
     *
39
     * @return JsExpr
40
     */
41
    public function __call(string $sMethod, array $aArguments): JsExpr
42
    {
43
        return $this->_expr()->__call($sMethod, $aArguments);
44
    }
45
}
46