@@ -51,12 +51,12 @@ class Path implements PathType
51
51
/**
52
52
* @var StructuralType The pattern left of the relationship
53
53
*/
54
- private StructuralType $ a ;
54
+ private StructuralType $ left ;
55
55
56
56
/**
57
57
* @var StructuralType The pattern right of the relationship
58
58
*/
59
- private StructuralType $ b ;
59
+ private StructuralType $ right ;
60
60
61
61
/**
62
62
* @var string[] The direction of the relationship
@@ -96,18 +96,18 @@ class Path implements PathType
96
96
/**
97
97
* Path constructor.
98
98
*
99
- * @param StructuralType $a The node left of the relationship
100
- * @param StructuralType $b The node right of the relationship
99
+ * @param StructuralType $left The node left of the relationship
100
+ * @param StructuralType $right The node right of the relationship
101
101
* @param array $direction The direction of the relationship, should be either:
102
102
* - Path::DIR_RIGHT (for a relation of
103
103
* (a)-->(b)) - Path::DIR_LEFT (for a relation
104
104
* of (a)<--(b)) - Path::DIR_UNI (for a
105
105
* relation of (a)--(b))
106
106
*/
107
- public function __construct (StructuralType $ a , StructuralType $ b , array $ direction )
107
+ public function __construct (StructuralType $ left , StructuralType $ right , array $ direction )
108
108
{
109
- $ this ->a = $ a ;
110
- $ this ->b = $ b ;
109
+ $ this ->left = $ left ;
110
+ $ this ->right = $ right ;
111
111
112
112
if ($ direction !== self ::DIR_RIGHT && $ direction !== self ::DIR_LEFT && $ direction !== self ::DIR_UNI ) {
113
113
throw new InvalidArgumentException ("The direction must be either 'DIR_LEFT', 'DIR_RIGHT' or 'RELATED_TO' " );
@@ -268,8 +268,8 @@ public function withType(string $type): self
268
268
*/
269
269
public function toQuery (): string
270
270
{
271
- $ a = $ this ->a ->toQuery ();
272
- $ b = $ this ->b ->toQuery ();
271
+ $ a = $ this ->left ->toQuery ();
272
+ $ b = $ this ->right ->toQuery ();
273
273
274
274
return $ a . $ this ->direction [0 ] . $ this ->conditionToString () . $ this ->direction [1 ] . $ b ;
275
275
}
@@ -346,19 +346,19 @@ public function getVariable(): ?Variable
346
346
*
347
347
* @return StructuralType
348
348
*/
349
- public function getA (): StructuralType
349
+ public function getLeft (): StructuralType
350
350
{
351
- return $ this ->a ;
351
+ return $ this ->left ;
352
352
}
353
353
354
354
/**
355
355
* Returns the right structure of the relationship.
356
356
*
357
357
* @return StructuralType
358
358
*/
359
- public function getB (): StructuralType
359
+ public function getRight (): StructuralType
360
360
{
361
- return $ this ->b ;
361
+ return $ this ->right ;
362
362
}
363
363
364
364
/**
0 commit comments