Skip to content

Commit

Permalink
Merge pull request #5 from chadicus/master
Browse files Browse the repository at this point in the history
Small changes
  • Loading branch information
chadicus committed May 21, 2019
2 parents a1ff806 + 7b3d40f commit 6b15c11
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 4 deletions.
3 changes: 1 addition & 2 deletions README.md
@@ -1,5 +1,4 @@
# linq
Library contains classes that follow the LINQ pattern and enable you to express traversal, filter, and projection operations over data

[![Build Status](https://travis-ci.org/subjective-php/linq.svg?branch=master)](https://travis-ci.org/subjective-php/linq)
[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/subjective-php/linq/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/subjective-php/linq/?branch=master)
Expand All @@ -15,7 +14,7 @@ Library contains classes that follow the LINQ pattern and enable you to express

[![Documentation](https://img.shields.io/badge/reference-phpdoc-blue.svg?style=flat)](http://www.pholiophp.org/subjective-php/linq)

Utilities to assist with [PSR-16 SimpleCache](http://www.php-fig.org/psr/psr-16/) implementations.
Library contains classes that follow the LINQ pattern and enable you to express traversal, filter, and projection operations over data

## Requirements

Expand Down
5 changes: 3 additions & 2 deletions composer.json
Expand Up @@ -9,9 +9,10 @@
"php": "^7.0"
},
"require-dev": {
"ext-json": "*",
"chadicus/coding-standard": "^1.7",
"phpunit/phpunit": "^6.5",
"php-coveralls/php-coveralls": "^2.0"
"php-coveralls/php-coveralls": "^2.0",
"phpunit/phpunit": "^6.5"
},
"autoload": {
"psr-4": {
Expand Down
10 changes: 10 additions & 0 deletions tests/LinqCollectionTest.php
Expand Up @@ -95,6 +95,16 @@ public function firstReturnsDefaultIfEmpty()
$this->assertSame($default, $this->collection->firstOrDefault($callable, $default));
}

/**
* @test
* @covers ::firstOrDefault
*/
public function firstOrDefaultDoesNotRequireParameters()
{
$collection = LinqCollection::from([]);
$this->assertNull($collection->firstOrDefault());
}

/**
* @test
* @covers ::count
Expand Down

0 comments on commit 6b15c11

Please sign in to comment.