Skip to content

Commit 635b509

Browse files
committed
Yeah, proposition/variable operand types are kind of weird.
1 parent 87abf67 commit 635b509

File tree

3 files changed

+11
-2
lines changed

3 files changed

+11
-2
lines changed

src/Operator.php

+5-2
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ abstract class Operator
2323
protected $operands = [];
2424

2525
/**
26-
* @param array $operands
26+
* @param Proposition|VariableOperand ...$operands
2727
*/
2828
public function __construct(...$operands)
2929
{
@@ -55,7 +55,10 @@ public function getOperands(): array
5555
return $this->operands;
5656
}
5757

58-
abstract public function addOperand($operand);
58+
/**
59+
* @param Proposition|VariableOperand $operand
60+
*/
61+
abstract public function addOperand($operand): void;
5962

6063
abstract protected function getOperandCardinality();
6164
}

src/Operator/PropositionOperator.php

+3
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@
1919
*/
2020
abstract class PropositionOperator extends BaseOperator
2121
{
22+
/**
23+
* @param Proposition $operand
24+
*/
2225
public function addOperand($operand): void
2326
{
2427
$this->addProposition($operand);

src/Operator/VariableOperator.php

+3
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@
1919
*/
2020
abstract class VariableOperator extends BaseOperator
2121
{
22+
/**
23+
* @param VariableOperand $operand
24+
*/
2225
public function addOperand($operand): void
2326
{
2427
$this->addVariable($operand);

0 commit comments

Comments
 (0)