Skip to content
This repository has been archived by the owner on Feb 5, 2019. It is now read-only.

Commit

Permalink
v1.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Joan Fabrégat committed Sep 24, 2018
1 parent cdfb120 commit 14e065f
Show file tree
Hide file tree
Showing 5 changed files with 119 additions and 23 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "codeinc/collection-interface",
"version": "1.0.0",
"version": "1.1.0",
"description": "A simple PHP interface for iterable collections",
"homepage": "https://github.com/CodeIncHQ/CollectionInterface",
"type": "library",
Expand Down
33 changes: 33 additions & 0 deletions src/AggregatedCollectionInterface.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<?php
//
// +---------------------------------------------------------------------+
// | CODE INC. SOURCE CODE |
// +---------------------------------------------------------------------+
// | Copyright (c) 2018 - Code Inc. SAS - All Rights Reserved. |
// | Visit https://www.codeinc.fr for more information about licensing. |
// +---------------------------------------------------------------------+
// | NOTICE: All information contained herein is, and remains the |
// | property of Code Inc. SAS. The intellectual and technical concepts |
// | contained herein are proprietary to Code Inc. SAS are protected by |
// | trade secret or copyright law. Dissemination of this information or |
// | reproduction of this material is strictly forbidden unless prior |
// | written permission is obtained from Code Inc. SAS. |
// +---------------------------------------------------------------------+
//
// Author: Joan Fabrégat <[email protected]>
// Date: 24/09/2018
// Project: CollectionInterface
//
declare(strict_types=1);
namespace CodeInc\CollectionInterface;

/**
* Interface AggregatedCollectionInterface
*
* @package CodeInc\CollectionInterface
* @author Joan Fabrégat <[email protected]>
*/
interface AggregatedCollectionInterface extends CollectionInterface, \IteratorAggregate
{

}
23 changes: 1 addition & 22 deletions src/CollectionInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,29 +26,8 @@
*
* @package CodeInc\CollectionInterface
* @author Joan Fabrégat <[email protected]>
* @version 1.0
*/
interface CollectionInterface extends \Iterator, \Countable
interface CollectionInterface extends \Traversable
{
/**
* @inheritdoc
*/
public function rewind():void;

/**
* @inheritdoc
*/
public function next():void;

/**
* @inheritdoc
* @return bool
*/
public function valid():bool;

/**
* @inheritdoc
* @return int
*/
public function count():int;
}
37 changes: 37 additions & 0 deletions src/CountableCollectionInterface.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<?php
//
// +---------------------------------------------------------------------+
// | CODE INC. SOURCE CODE |
// +---------------------------------------------------------------------+
// | Copyright (c) 2018 - Code Inc. SAS - All Rights Reserved. |
// | Visit https://www.codeinc.fr for more information about licensing. |
// +---------------------------------------------------------------------+
// | NOTICE: All information contained herein is, and remains the |
// | property of Code Inc. SAS. The intellectual and technical concepts |
// | contained herein are proprietary to Code Inc. SAS are protected by |
// | trade secret or copyright law. Dissemination of this information or |
// | reproduction of this material is strictly forbidden unless prior |
// | written permission is obtained from Code Inc. SAS. |
// +---------------------------------------------------------------------+
//
// Author: Joan Fabrégat <[email protected]>
// Date: 24/09/2018
// Project: CollectionInterface
//
declare(strict_types=1);
namespace CodeInc\CollectionInterface;

/**
* Interface CountableCollectionInterface
*
* @package CodeInc\CollectionInterface
* @author Joan Fabrégat <[email protected]>
*/
interface CountableCollectionInterface extends CollectionInterface, \Countable
{
/**
* @inheritdoc
* @return int
*/
public function count():int;
}
47 changes: 47 additions & 0 deletions src/IteratorCollectionInterface.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
<?php
//
// +---------------------------------------------------------------------+
// | CODE INC. SOURCE CODE |
// +---------------------------------------------------------------------+
// | Copyright (c) 2018 - Code Inc. SAS - All Rights Reserved. |
// | Visit https://www.codeinc.fr for more information about licensing. |
// +---------------------------------------------------------------------+
// | NOTICE: All information contained herein is, and remains the |
// | property of Code Inc. SAS. The intellectual and technical concepts |
// | contained herein are proprietary to Code Inc. SAS are protected by |
// | trade secret or copyright law. Dissemination of this information or |
// | reproduction of this material is strictly forbidden unless prior |
// | written permission is obtained from Code Inc. SAS. |
// +---------------------------------------------------------------------+
//
// Author: Joan Fabrégat <[email protected]>
// Date: 24/09/2018
// Project: CollectionInterface
//
declare(strict_types=1);
namespace CodeInc\CollectionInterface;

/**
* Interface IteratorCollectionInterface
*
* @package CodeInc\CollectionInterface
* @author Joan Fabrégat <[email protected]>
*/
interface IteratorCollectionInterface extends CollectionInterface, \Iterator
{
/**
* @inheritdoc
*/
public function rewind():void;

/**
* @inheritdoc
*/
public function next():void;

/**
* @inheritdoc
* @return bool
*/
public function valid():bool;
}

0 comments on commit 14e065f

Please sign in to comment.