Skip to content

Commit

Permalink
feat: Fix a future depreciation. (#12)
Browse files Browse the repository at this point in the history
* feat: Fix a future depreciation.

Dynamic properties will be deprecated.
  • Loading branch information
lvsantos1 committed Aug 14, 2022
1 parent fa0c396 commit bc27068
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 5 deletions.
1 change: 1 addition & 0 deletions src/Builtin.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
final class Builtin implements CRCInterface
{
private $hc;
private $algo;

private static $mapping = [
CRC32::IEEE => 'crc32b',
Expand Down
3 changes: 3 additions & 0 deletions src/Google.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@
*/
final class Google implements CRCInterface
{

private $crc;

public static function supports($algo)
{
return $algo === CRC32::CASTAGNOLI;
Expand Down
6 changes: 4 additions & 2 deletions src/PHP.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,15 @@ final class PHP implements CRCInterface
{
use CRCTrait;

private $polynomial;
private $crc;
private $table = [];

public static function supports($algo)
{
return true;
}

private $table = [];

/**
* Creates a new instance for this polynomial.
*
Expand Down
6 changes: 4 additions & 2 deletions src/PHPSlicedBy4.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,15 @@ final class PHPSlicedBy4 implements CRCInterface
{
use CRCTrait;

private $polynomial;
private $crc;
private $table;

public static function supports($algo)
{
return true;
}

private $table;

public function __construct($polynomial)
{
$this->polynomial = $polynomial;
Expand Down
2 changes: 1 addition & 1 deletion src/Table.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

final class Table
{
private static $tables = array();
private static $tables = [];

/**
* Echos the given table. Useful for building a static table to include in source code.
Expand Down

2 comments on commit bc27068

@faytekin
Copy link

@faytekin faytekin commented on bc27068 Dec 28, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bramp Can you create a release for this?

@nozdogan
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bramp Can you create a version for this?

waiting for php 8.2 :)

Please sign in to comment.