Compare commits

..

No commits in common. "b638d684a2180acfff91372f6987971db34bac8e" and "73b5113f2ffff47f27c174a12685094291045fbe" have entirely different histories.

7 changed files with 3 additions and 39 deletions

4
.gitattributes vendored
View file

@ -1,5 +1,3 @@
phpunit.xml export-ignore
tests/ export-ignore
CHANGELOG.md export-ignore
package.json export-ignore
.gitignore export-ignore
CHANGELOG.md export-ignore

3
.gitignore vendored
View file

@ -1,7 +1,4 @@
/.idea
/vendor
/node_modules
/coverage
composer.lock
package-lock.json
.phpunit.result.cache

View file

@ -5,10 +5,6 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [1.0.2] - 2025-04-10
### Changed
- Increased unit test coverage to 100%
## [1.0.1] - 2025-04-10
### Added
- Added description to `composer.json` to provide a description on Packagist.

View file

@ -1,14 +1,5 @@
# Loom Utilities | Collection
<div>
<!-- Version Badge -->
<img src="https://img.shields.io/badge/Version-1.0.2-blue" alt="Version 1.0.2">
<!-- PHP Coverage Badge -->
<img src="https://img.shields.io/badge/PHP%20Coverage-100.00%25-green" alt="PHP Coverage 100.00%">
<!-- License Badge -->
<img src="https://img.shields.io/badge/License-MIT-34ad9b" alt="License MIT">
</div>
A Collection library for an object-oriented way to work with arrays.
## Installation

View file

@ -1,6 +1,6 @@
{
"name": "loomlabs/utility.collection",
"description": "An object-oriented way to work with arrays.",
"description": "An object-oriented way to work with arrays",
"autoload": {
"psr-4": {
"Loom\\Utility\\Collection\\": "src/"
@ -11,10 +11,7 @@
"Loom\\Utility\\Collection\\Tests\\": "tests/"
}
},
"scripts": {
"test": "php -d xdebug.mode=coverage ./vendor/bin/phpunit --testdox --colors=always --coverage-html coverage --coverage-clover coverage/coverage.xml --testdox-html coverage/testdox.html && npx badger --phpunit ./coverage/coverage.xml && npx badger --version ./composer.json && npx badger --license ./composer.json"
},
"version": "1.0.2",
"version": "1.0.1",
"license": "MIT",
"require-dev": {
"phpunit/phpunit": "^12.1"

View file

@ -1,5 +0,0 @@
{
"devDependencies": {
"@dannyxcii/badger": "^0.5.0"
}
}

View file

@ -35,16 +35,6 @@ class CollectionTest extends TestCase
$this->assertEquals($expectedResult, $collection->count());
}
public function testIteration(): void
{
$array = ['A', 'B', 'C'];
$collection = new Collection($array);
foreach ($collection as $key => $value) {
$this->assertEquals($array[$key], $value);
}
}
public static function addDataProvider(): array
{
return [