From 5949dda59e8cb91235290648ac1aae34f577ff24 Mon Sep 17 00:00:00 2001 From: Jordan Doyle Date: Tue, 11 Oct 2016 23:55:57 +0100 Subject: [PATCH] Merge branch 'master' of https://github.com/koselig/library --- src/Auth/WordpressGuard.php | 1 + src/Hashing/WordpressHasher.php | 3 +-- src/Models/Post.php | 3 ++- src/Routing/Routing.php | 1 - src/Routing/RoutingServiceProvider.php | 1 - 5 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/Auth/WordpressGuard.php b/src/Auth/WordpressGuard.php index b5f66ac..bcfd6d5 100644 --- a/src/Auth/WordpressGuard.php +++ b/src/Auth/WordpressGuard.php @@ -105,6 +105,7 @@ class WordpressGuard implements StatefulGuard { if ($this->validate($credentials)) { $this->setUser($this->lastAttempted); + return true; } diff --git a/src/Hashing/WordpressHasher.php b/src/Hashing/WordpressHasher.php index 250e70d..e38d904 100644 --- a/src/Hashing/WordpressHasher.php +++ b/src/Hashing/WordpressHasher.php @@ -16,9 +16,8 @@ class WordpressHasher implements HasherContract * * @param string $value * @param array $options - * @return string - * * @throws \RuntimeException + * @return string */ public function make($value, array $options = []) { diff --git a/src/Models/Post.php b/src/Models/Post.php index bd610dc..b05f4c2 100644 --- a/src/Models/Post.php +++ b/src/Models/Post.php @@ -58,7 +58,7 @@ class Post extends Model */ public function getMeta($key = null) { - /** + /* * @var Collection */ $meta = $this->meta; @@ -67,6 +67,7 @@ class Post extends Model $meta = $meta->whereIn('meta_key', $key); } elseif (is_string($key)) { $meta = $meta->where('meta_key', $key)->first(); + return $meta ? $meta->meta_value : null; } diff --git a/src/Routing/Routing.php b/src/Routing/Routing.php index 0f39c77..1ff2d70 100644 --- a/src/Routing/Routing.php +++ b/src/Routing/Routing.php @@ -3,7 +3,6 @@ namespace Koselig\Routing; use Illuminate\Container\Container; use Illuminate\Support\Facades\Route; -use Koselig\Routing\Route as KoseligRoute; class Routing { diff --git a/src/Routing/RoutingServiceProvider.php b/src/Routing/RoutingServiceProvider.php index ecb703b..b41d811 100644 --- a/src/Routing/RoutingServiceProvider.php +++ b/src/Routing/RoutingServiceProvider.php @@ -3,7 +3,6 @@ namespace Koselig\Routing; use Illuminate\Routing\Router; use Illuminate\Support\ServiceProvider; -use Koselig\Routing\Routing; /** * Provides routing methods for Wordpress-related routes. -- libgit2 1.7.2