Skip to content

Commit 925eb95

Browse files
Reformat code
1 parent d506e1d commit 925eb95

File tree

138 files changed

+6009
-6013
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

138 files changed

+6009
-6013
lines changed

src/Addition.php

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -31,21 +31,21 @@
3131
*/
3232
class Addition extends BinaryOperator implements NumeralType
3333
{
34-
use NumeralTypeTrait;
34+
use NumeralTypeTrait;
3535

36-
/**
37-
* @inheritDoc
38-
*/
39-
public function __construct(NumeralType $left, NumeralType $right)
40-
{
41-
parent::__construct($left, $right);
42-
}
36+
/**
37+
* @inheritDoc
38+
*/
39+
public function __construct(NumeralType $left, NumeralType $right)
40+
{
41+
parent::__construct($left, $right);
42+
}
4343

44-
/**
45-
* @inheritDoc
46-
*/
47-
protected function getOperator(): string
48-
{
49-
return "+";
50-
}
44+
/**
45+
* @inheritDoc
46+
*/
47+
protected function getOperator(): string
48+
{
49+
return "+";
50+
}
5151
}

src/AndOperator.php

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -31,21 +31,21 @@
3131
*/
3232
class AndOperator extends BinaryOperator implements BooleanType
3333
{
34-
use BooleanTypeTrait;
34+
use BooleanTypeTrait;
3535

36-
/**
37-
* @inheritDoc
38-
*/
39-
public function __construct(BooleanType $left, BooleanType $right)
40-
{
41-
parent::__construct($left, $right);
42-
}
36+
/**
37+
* @inheritDoc
38+
*/
39+
public function __construct(BooleanType $left, BooleanType $right)
40+
{
41+
parent::__construct($left, $right);
42+
}
4343

44-
/**
45-
* @inheritDoc
46-
*/
47-
protected function getOperator(): string
48-
{
49-
return "AND";
50-
}
44+
/**
45+
* @inheritDoc
46+
*/
47+
protected function getOperator(): string
48+
{
49+
return "AND";
50+
}
5151
}

src/Assignment.php

Lines changed: 35 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -32,44 +32,44 @@
3232
*/
3333
class Assignment extends BinaryOperator
3434
{
35-
/**
36-
* @var bool Whether to use the property mutation instead of the property replacement
37-
* operator.
38-
*/
39-
private bool $mutate = false;
35+
/**
36+
* @var bool Whether to use the property mutation instead of the property replacement
37+
* operator.
38+
*/
39+
private bool $mutate = false;
4040

41-
/**
42-
* @param Property|Variable $left
43-
* @inheritDoc
44-
*/
45-
public function __construct(AnyType $left, AnyType $right)
46-
{
47-
if (!($left instanceof Property) && !($left instanceof Variable)) {
48-
throw new TypeError("\$left must be either a Property or a Variable");
49-
}
41+
/**
42+
* @param Property|Variable $left
43+
* @inheritDoc
44+
*/
45+
public function __construct(AnyType $left, AnyType $right)
46+
{
47+
if (!($left instanceof Property) && !($left instanceof Variable)) {
48+
throw new TypeError("\$left must be either a Property or a Variable");
49+
}
5050

51-
parent::__construct($left, $right, false);
52-
}
51+
parent::__construct($left, $right, false);
52+
}
5353

54-
/**
55-
* Whether to use the property mutation instead of the property replacement
56-
* operator.
57-
*
58-
* @param bool $mutate
59-
* @return $this
60-
*/
61-
public function setMutate(bool $mutate = true): self
62-
{
63-
$this->mutate = $mutate;
54+
/**
55+
* Whether to use the property mutation instead of the property replacement
56+
* operator.
57+
*
58+
* @param bool $mutate
59+
* @return $this
60+
*/
61+
public function setMutate(bool $mutate = true): self
62+
{
63+
$this->mutate = $mutate;
6464

65-
return $this;
66-
}
65+
return $this;
66+
}
6767

68-
/**
69-
* @inheritDoc
70-
*/
71-
protected function getOperator(): string
72-
{
73-
return $this->mutate ? "+=" : "=";
74-
}
68+
/**
69+
* @inheritDoc
70+
*/
71+
protected function getOperator(): string
72+
{
73+
return $this->mutate ? "+=" : "=";
74+
}
7575
}

src/BinaryOperator.php

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -33,15 +33,15 @@ abstract class BinaryOperator implements QueryConvertable
3333
*/
3434
private bool $insertParentheses = true;
3535

36-
/**
37-
* @var AnyType The left-hand of the expression
38-
*/
39-
private AnyType $left;
36+
/**
37+
* @var AnyType The left-hand of the expression
38+
*/
39+
private AnyType $left;
4040

41-
/**
42-
* @var AnyType The right-hand of the expression
43-
*/
44-
private AnyType $right;
41+
/**
42+
* @var AnyType The right-hand of the expression
43+
*/
44+
private AnyType $right;
4545

4646
/**
4747
* BinaryOperator constructor.
@@ -50,30 +50,30 @@ abstract class BinaryOperator implements QueryConvertable
5050
* @param AnyType $right The right-hand of the expression
5151
* @param bool $insertParentheses Whether to insert parentheses around the expression
5252
*/
53-
public function __construct(AnyType $left, AnyType $right, bool $insertParentheses = true)
54-
{
55-
$this->left = $left;
56-
$this->right = $right;
57-
$this->insertParentheses = $insertParentheses;
58-
}
53+
public function __construct(AnyType $left, AnyType $right, bool $insertParentheses = true)
54+
{
55+
$this->left = $left;
56+
$this->right = $right;
57+
$this->insertParentheses = $insertParentheses;
58+
}
5959

60-
/**
61-
* @inheritDoc
62-
*/
63-
public function toQuery(): string
64-
{
65-
return sprintf(
66-
$this->insertParentheses ? "(%s %s %s)" : "%s %s %s",
60+
/**
61+
* @inheritDoc
62+
*/
63+
public function toQuery(): string
64+
{
65+
return sprintf(
66+
$this->insertParentheses ? "(%s %s %s)" : "%s %s %s",
6767
$this->left->toQuery(),
6868
$this->getOperator(),
6969
$this->right->toQuery()
7070
);
71-
}
71+
}
7272

73-
/**
74-
* Returns the operator. For instance, this function would return "+" for the addition operator.
75-
*
76-
* @return string
77-
*/
78-
abstract protected function getOperator(): string;
73+
/**
74+
* Returns the operator. For instance, this function would return "+" for the addition operator.
75+
*
76+
* @return string
77+
*/
78+
abstract protected function getOperator(): string;
7979
}

0 commit comments

Comments
 (0)