From 7cb874d73fc9057e7ec5710d955722e3ebc5d39d Mon Sep 17 00:00:00 2001 From: Alan Scott Date: Fri, 23 Oct 2015 09:28:05 +0100 Subject: [PATCH] Remove unecessary calls to func_get_args --- src/Taggable.php | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/src/Taggable.php b/src/Taggable.php index c054c9a..f1d9b3e 100644 --- a/src/Taggable.php +++ b/src/Taggable.php @@ -62,11 +62,6 @@ public function getTagsAttribute() */ public function tag($tagNames) { - if(!is_array($tagNames)) { - $tagNames = func_get_args(); - array_shift($tagNames); - } - $tagNames = static::$taggingUtility->makeTagArray($tagNames); foreach($tagNames as $tagName) { @@ -131,11 +126,6 @@ public function untag($tagNames=null) */ public function retag($tagNames) { - if(!is_array($tagNames)) { - $tagNames = func_get_args(); - array_shift($tagNames); - } - $tagNames = static::$taggingUtility->makeTagArray($tagNames); $currentTagNames = $this->tagNames(); @@ -157,11 +147,6 @@ public function retag($tagNames) */ public function scopeWithAllTags($query, $tagNames) { - if(!is_array($tagNames)) { - $tagNames = func_get_args(); - array_shift($tagNames); - } - $tagNames = static::$taggingUtility->makeTagArray($tagNames); $normalizer = config('tagging.normalizer'); @@ -186,11 +171,6 @@ public function scopeWithAllTags($query, $tagNames) */ public function scopeWithAnyTag($query, $tagNames) { - if(!is_array($tagNames)) { - $tagNames = func_get_args(); - array_shift($tagNames); - } - $tagNames = static::$taggingUtility->makeTagArray($tagNames); $normalizer = config('tagging.normalizer');