Skip to content

Commit 1a46da7

Browse files
committed
[BUGFIX] Tune GranuarityInterface
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.
1 parent b40acc8 commit 1a46da7

2 files changed

Lines changed: 2 additions & 7 deletions

File tree

src/cogpowered/FineDiff/Granularity/Granularity.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
/**
2222
* Granularities should extend this class.
2323
*/
24-
abstract class Granularity implements GranularityInterface, \ArrayAccess, \Countable
24+
abstract class Granularity implements GranularityInterface
2525
{
2626
/**
2727
* @var array Extending granularities should override this.

src/cogpowered/FineDiff/Granularity/GranularityInterface.php

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,8 @@
1818

1919
namespace cogpowered\FineDiff\Granularity;
2020

21-
interface GranularityInterface
21+
interface GranularityInterface extends \ArrayAccess, \Countable
2222
{
23-
public function offsetExists($offset);
24-
public function offsetGet($offset);
25-
public function offsetSet($offset, $value);
26-
public function offsetUnset($offset);
27-
2823
/**
2924
* Get the delimiters that make up the granularity.
3025
*

0 commit comments

Comments
 (0)