Passed
Push — wip-public-release ( a47743...14cdbd )
by Bogdan
02:52
created

RuntimeMethod   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 3
lcom 0
cbo 0
dl 0
loc 27
ccs 0
cts 8
cp 0
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A getReference() 0 4 1
A getObject() 0 4 1
1
<?php declare(strict_types=1);
2
3
/*
4
 * This file is part of the pinepain/js-sandbox PHP library.
5
 *
6
 * Copyright (c) 2016-2017 Bogdan Padalko <[email protected]>
7
 *
8
 * Licensed under the MIT license: http://opensource.org/licenses/MIT
9
 *
10
 * For the full copyright and license information, please view the
11
 * LICENSE file that was distributed with this source or visit
12
 * http://opensource.org/licenses/MIT
13
 */
14
15
16
namespace Pinepain\JsSandbox\Wrappers\Runtime;
17
18
19
use Ref\WeakReference;
20
use V8\ObjectValue;
21
22
23
class RuntimeMethod
24
{
25
    private $reference;
26
    private $object;
27
28
    public function __construct(WeakReference $reference, ObjectValue $object)
29
    {
30
        $this->reference = $reference;
31
        $this->object    = $object;
32
    }
33
34
    /**
35
     * @return WeakReference
36
     */
37
    public function getReference(): WeakReference
38
    {
39
        return $this->reference;
40
    }
41
42
    /**
43
     * @return ObjectValue
44
     */
45
    public function getObject(): ObjectValue
46
    {
47
        return $this->object;
48
    }
49
}
50