Skip to content

Commit

Permalink
Upgrade node
Browse files Browse the repository at this point in the history
  • Loading branch information
denisyukphp committed Nov 9, 2021
1 parent e7a2cc5 commit 9b27e9e
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/Collection/Node.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,16 @@ final class Node implements NodeInterface
* @var int
*/
private $weight;
/**
* @var array
*/
private $info;

public function __construct(string $name, int $weight = 0)
public function __construct(string $name, int $weight = 0, array $info = [])
{
$this->name = $name;
$this->weight = $weight;
$this->info = $info;
}

public function getName(): string
Expand All @@ -28,4 +33,9 @@ public function getWeight(): int
{
return $this->weight;
}

public function getInfo(): array
{
return $this->info;
}
}
2 changes: 2 additions & 0 deletions src/Collection/NodeInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,6 @@ interface NodeInterface
public function getName(): string;

public function getWeight(): int;

public function getInfo(): array;
}

0 comments on commit 9b27e9e

Please sign in to comment.