Skip to content

Commit

Permalink
Refactor BHDConverter constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
AxiosLeo committed Apr 2, 2024
1 parent a8c874b commit cd576f0
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions src/BHDConverter.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,17 @@

class BHDConverter
{
private $dict;
private $patch;
private $dict = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'; // len:62
private $patch = '0';

public function __construct(
$dict = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ', // len:62
$patch = '0',
) {
$this->dict = $dict;
$this->patch = $patch;
public function __construct($dict = null, $patch = null)
{
if ($dict) {
$this->dict = $dict;
}
if ($patch) {
$this->patch = $patch;
}
}

/**
Expand Down

0 comments on commit cd576f0

Please sign in to comment.