Skip to content

Commit

Permalink
[BUGFIX] Tune GranuarityInterface
Browse files Browse the repository at this point in the history
GranuarityInterface is the main interface of
granularities. It should extend both \ArrayAccess
and \Countable directly and shouln't define
ArrayAccess methods like offsetExists() again.

This kinda fixes cogpowered#2
even though the PHP 5.3 problem is not an issue here anymore.
  • Loading branch information
lolli42 committed Oct 21, 2021
1 parent b40acc8 commit 1a46da7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/cogpowered/FineDiff/Granularity/Granularity.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
/**
* Granularities should extend this class.
*/
abstract class Granularity implements GranularityInterface, \ArrayAccess, \Countable
abstract class Granularity implements GranularityInterface
{
/**
* @var array Extending granularities should override this.
Expand Down
7 changes: 1 addition & 6 deletions src/cogpowered/FineDiff/Granularity/GranularityInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,8 @@

namespace cogpowered\FineDiff\Granularity;

interface GranularityInterface
interface GranularityInterface extends \ArrayAccess, \Countable
{
public function offsetExists($offset);
public function offsetGet($offset);
public function offsetSet($offset, $value);
public function offsetUnset($offset);

/**
* Get the delimiters that make up the granularity.
*
Expand Down

0 comments on commit 1a46da7

Please sign in to comment.