Skip to content

Commit 4ff823a

Browse files
committed
renamed a and b to left and right
1 parent ccf7deb commit 4ff823a

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

src/Patterns/Path.php

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,12 @@ class Path implements PathType
5151
/**
5252
* @var StructuralType The pattern left of the relationship
5353
*/
54-
private StructuralType $a;
54+
private StructuralType $left;
5555

5656
/**
5757
* @var StructuralType The pattern right of the relationship
5858
*/
59-
private StructuralType $b;
59+
private StructuralType $right;
6060

6161
/**
6262
* @var string[] The direction of the relationship
@@ -96,18 +96,18 @@ class Path implements PathType
9696
/**
9797
* Path constructor.
9898
*
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
101101
* @param array $direction The direction of the relationship, should be either:
102102
* - Path::DIR_RIGHT (for a relation of
103103
* (a)-->(b)) - Path::DIR_LEFT (for a relation
104104
* of (a)<--(b)) - Path::DIR_UNI (for a
105105
* relation of (a)--(b))
106106
*/
107-
public function __construct(StructuralType $a, StructuralType $b, array $direction)
107+
public function __construct(StructuralType $left, StructuralType $right, array $direction)
108108
{
109-
$this->a = $a;
110-
$this->b = $b;
109+
$this->left = $left;
110+
$this->right = $right;
111111

112112
if ($direction !== self::DIR_RIGHT && $direction !== self::DIR_LEFT && $direction !== self::DIR_UNI) {
113113
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
268268
*/
269269
public function toQuery(): string
270270
{
271-
$a = $this->a->toQuery();
272-
$b = $this->b->toQuery();
271+
$a = $this->left->toQuery();
272+
$b = $this->right->toQuery();
273273

274274
return $a . $this->direction[0] . $this->conditionToString() . $this->direction[1] . $b;
275275
}
@@ -346,19 +346,19 @@ public function getVariable(): ?Variable
346346
*
347347
* @return StructuralType
348348
*/
349-
public function getA(): StructuralType
349+
public function getLeft(): StructuralType
350350
{
351-
return $this->a;
351+
return $this->left;
352352
}
353353

354354
/**
355355
* Returns the right structure of the relationship.
356356
*
357357
* @return StructuralType
358358
*/
359-
public function getB(): StructuralType
359+
public function getRight(): StructuralType
360360
{
361-
return $this->b;
361+
return $this->right;
362362
}
363363

364364
/**

0 commit comments

Comments
 (0)