forked from pug-php/js-phpize
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDyiade.php
More file actions
46 lines (40 loc) · 1004 Bytes
/
Dyiade.php
File metadata and controls
46 lines (40 loc) · 1004 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
<?php
namespace JsPhpize\Nodes;
/**
* Class Dyiade.
*
* @property-read Value $leftHand left hand dyiade value
* @property-read Value $rightHand right hand dyiade value
* @property-read string $operator dyiade operator
*/
class Dyiade extends Value
{
/**
* @var Value
*/
protected $leftHand;
/**
* @var Value
*/
protected $rightHand;
/**
* @var string
*/
protected $operator;
public function __construct($operator, Value $leftHand, Value $rightHand, ?array $before = null, ?array $after = null)
{
$this->operator = $operator;
$this->leftHand = $leftHand;
$this->rightHand = $rightHand;
if ($before !== null) {
$this->before = $before;
}
if ($after !== null) {
$this->after = $after;
}
}
public function getReadVariables()
{
return array_merge($this->leftHand->getReadVariables(), $this->rightHand->getReadVariables());
}
}