Skip to content

Commit 75fe29f

Browse files
committed
added insertParenthesis boolean to relevant constructors
1 parent 271b66b commit 75fe29f

20 files changed

+38
-39
lines changed

src/Addition.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,9 @@ class Addition extends BinaryOperator implements NumeralType
3636
/**
3737
* @inheritDoc
3838
*/
39-
public function __construct(NumeralType $left, NumeralType $right)
39+
public function __construct(NumeralType $left, NumeralType $right, bool $insertParentheses = true)
4040
{
41-
parent::__construct($left, $right);
41+
parent::__construct($left, $right, $insertParentheses);
4242
}
4343

4444
/**

src/AndOperator.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,9 @@ class AndOperator extends BinaryOperator implements BooleanType
3636
/**
3737
* @inheritDoc
3838
*/
39-
public function __construct(BooleanType $left, BooleanType $right)
39+
public function __construct(BooleanType $left, BooleanType $right, bool $insertParentheses = true)
4040
{
41-
parent::__construct($left, $right);
41+
parent::__construct($left, $right, $insertParentheses);
4242
}
4343

4444
/**

src/Contains.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,9 @@ class Contains extends BinaryOperator implements BooleanType
3737
/**
3838
* @inheritDoc
3939
*/
40-
public function __construct(StringType $left, StringType $right)
40+
public function __construct(StringType $left, StringType $right, bool $insertParentheses = true)
4141
{
42-
parent::__construct($left, $right);
42+
parent::__construct($left, $right, $insertParentheses);
4343
}
4444

4545
/**

src/Division.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,9 @@ class Division extends BinaryOperator implements NumeralType
3636
/**
3737
* @inheritDoc
3838
*/
39-
public function __construct(NumeralType $left, NumeralType $right)
39+
public function __construct(NumeralType $left, NumeralType $right, bool $insertParentheses = true)
4040
{
41-
parent::__construct($left, $right);
41+
parent::__construct($left, $right, $insertParentheses);
4242
}
4343

4444
/**

src/EndsWith.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,9 @@ class EndsWith extends BinaryOperator implements BooleanType
3737
/**
3838
* @inheritDoc
3939
*/
40-
public function __construct(StringType $left, StringType $right)
40+
public function __construct(StringType $left, StringType $right, bool $insertParentheses = true)
4141
{
42-
parent::__construct($left, $right);
42+
parent::__construct($left, $right, $insertParentheses);
4343
}
4444

4545
/**

src/Equality.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,9 @@ class Equality extends BinaryOperator implements BooleanType
3838
/**
3939
* @inheritDoc
4040
*/
41-
public function __construct(PropertyType $left, PropertyType $right)
41+
public function __construct(PropertyType $left, PropertyType $right, bool $insertParentheses = true)
4242
{
43-
parent::__construct($left, $right);
43+
parent::__construct($left, $right, $insertParentheses);
4444
}
4545

4646
/**

src/Exponentiation.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,9 @@ class Exponentiation extends BinaryOperator implements NumeralType
3636
/**
3737
* @inheritDoc
3838
*/
39-
public function __construct(NumeralType $left, NumeralType $right)
39+
public function __construct(NumeralType $left, NumeralType $right, bool $insertParentheses = true)
4040
{
41-
parent::__construct($left, $right);
41+
parent::__construct($left, $right, $insertParentheses);
4242
}
4343

4444
/**

src/GreaterThan.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,9 @@ class GreaterThan extends BinaryOperator implements BooleanType
3737
/**
3838
* @inheritDoc
3939
*/
40-
public function __construct(NumeralType $left, NumeralType $right)
40+
public function __construct(NumeralType $left, NumeralType $right, bool $insertParentheses = true)
4141
{
42-
parent::__construct($left, $right);
42+
parent::__construct($left, $right, $insertParentheses);
4343
}
4444

4545
/**

src/GreaterThanOrEqual.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,9 @@ class GreaterThanOrEqual extends BinaryOperator implements BooleanType
3737
/**
3838
* @inheritDoc
3939
*/
40-
public function __construct(NumeralType $left, NumeralType $right)
40+
public function __construct(NumeralType $left, NumeralType $right, bool $insertParentheses = true)
4141
{
42-
parent::__construct($left, $right);
42+
parent::__construct($left, $right, $insertParentheses);
4343
}
4444

4545
/**

src/In.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,9 @@ class In extends BinaryOperator implements BooleanType
3838
/**
3939
* @inheritDoc
4040
*/
41-
public function __construct(PropertyType $left, ListType $right)
41+
public function __construct(PropertyType $left, ListType $right, bool $insertParentheses = true)
4242
{
43-
parent::__construct($left, $right);
43+
parent::__construct($left, $right, $insertParentheses);
4444
}
4545

4646
/**

0 commit comments

Comments
 (0)