Skip to content

Commit a8c08e1

Browse files
committed
nitpicks
1 parent 9a9305e commit a8c08e1

File tree

3 files changed

+10
-4
lines changed

3 files changed

+10
-4
lines changed

CHANGELOG.md

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

3-
All Notable changes to `laravel-tags` will be documented in this file
3+
All notable changes to `laravel-tags` will be documented in this file
4+
5+
## 1.4.0 - 2017-05-25
6+
7+
- add `syncWithType`
48

59
## 1.3.5 - 2017-02-13
610

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,11 +74,11 @@ Spatie is a webdesign agency based in Antwerp, Belgium. You'll find an overview
7474

7575
## Postcardware
7676

77-
You're free to use this package (it's [MIT-licensed](LICENSE.md)), but if it makes it to your production environment you are required to send us a postcard from your hometown, mentioning which of our package(s) you are using.
77+
You're free to use this package (it's [MIT-licensed](LICENSE.md)), but if it makes it to your production environment we highly appreciate you sending us a postcard from your hometown, mentioning which of our package(s) you are using.
7878

7979
Our address is: Spatie, Samberstraat 69D, 2060 Antwerp, Belgium.
8080

81-
The best postcards will get published on the open source page on our website.
81+
All postcards are published [on our website](https://spatie.be/en/opensource/postcards).
8282

8383
## Requirements
8484

src/HasTags.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
use Illuminate\Database\Eloquent\Builder;
77
use Illuminate\Database\Eloquent\Collection;
88
use Illuminate\Database\Eloquent\Relations\MorphToMany;
9+
use InvalidArgumentException;
910

1011
trait HasTags
1112
{
@@ -181,7 +182,7 @@ protected static function convertToTags($values, $type = null, $locale = null)
181182
return collect($values)->map(function ($value) use ($type, $locale) {
182183
if ($value instanceof Tag) {
183184
if (isset($type) && $value->type != $type) {
184-
throw new \InvalidArgumentException("Type was set to {$type} but tag is of type {$value->type}");
185+
throw new InvalidArgumentException("Type was set to {$type} but tag is of type {$value->type}");
185186
}
186187

187188
return $value;
@@ -195,6 +196,7 @@ protected static function convertToTags($values, $type = null, $locale = null)
195196

196197
/**
197198
* Use in place of eloquent's sync() method so that the tag type may be optionally specified.
199+
*
198200
* @param $ids
199201
* @param string|null $type
200202
* @param bool $detaching

0 commit comments

Comments
 (0)