Skip to content

Commit 325e9fd

Browse files
committed
Merge remote-tracking branch 'origin/master'
2 parents 7ed5eb5 + afe80ae commit 325e9fd

File tree

3 files changed

+29
-2
lines changed

3 files changed

+29
-2
lines changed

.travis.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
language: php
2+
3+
php:
4+
- 7.0
5+
- 7.1
6+
7+
env:
8+
matrix:
9+
- COMPOSER_FLAGS="--prefer-lowest"
10+
- COMPOSER_FLAGS=""
11+
12+
before_install:
13+
- sudo apt-get update
14+
- travis_retry composer self-update
15+
16+
install:
17+
- travis_retry composer update --prefer-dist --prefer-stable $COMPOSER_FLAGS
18+
19+
script:
20+
- ./vendor/bin/phpunit

README.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# Cache models by tagging
22

3+
[![Latest Version](https://img.shields.io/github/release/anorgan/laravel-cache.svg?style=flat-square)](https://github.com/anorgan/laravel-cache/releases)
4+
[![Quality Score](https://img.shields.io/scrutinizer/g/anorgan/laravel-cache.svg?style=flat-square)](https://scrutinizer-ci.com/g/anorgan/laravel-cache/?branch=master)
5+
[![Build Status](https://img.shields.io/travis/anorgan/laravel-cache.svg?style=flat-square)](https://travis-ci.org/anorgan/laravel-cache)
6+
[![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg?style=flat-square)](https://raw.githubusercontent.com/anorgan/laravel-cache/master/LICENSE)
7+
38
This package aims to help with caching of models by tagging them and invalidating caches on model change.
49

510
## Installation
@@ -59,4 +64,4 @@ Please see [CONTRIBUTING](CONTRIBUTING.md) for details.
5964

6065
## License
6166

62-
The MIT License (MIT). Please see [License File](LICENSE) for more information.
67+
The MIT License (MIT). Please see [License File](LICENSE) for more information.

src/TagFinder.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,9 @@ private function getTagsFromCollection(Collection $collection)
4545
*/
4646
private function getTags(Model $model)
4747
{
48-
$tags[] = $this->createTag($model);
48+
$tags = [
49+
$this->createTag($model),
50+
];
4951

5052
foreach ($model->getRelations() as $relation) {
5153
if ($relation instanceof Collection) {

0 commit comments

Comments
 (0)