🏡 index : ~doyle/koselig.git

author Jordan Doyle <w4@users.noreply.github.com> 2016-10-25 10:56:20.0 +00:00:00
committer GitHub <noreply@github.com> 2016-10-25 10:56:20.0 +00:00:00
commit
367e2f755452d28a27a311ca92af122d394acbd0 [patch]
tree
2a7b328fb58cccffb24c4ee14e0a6c95fa1a2951
parent
90b1deec2c9a36e5f5627237398325643acc8642
download
367e2f755452d28a27a311ca92af122d394acbd0.tar.gz

Applied fixes from StyleCI (#9)

[ci skip] [skip ci]

Diff

 src/Models/Post.php | 46 ++++++++++++++++++++++++----------------------
 1 file changed, 24 insertions(+), 22 deletions(-)

diff --git a/src/Models/Post.php b/src/Models/Post.php
index 4c72208..7a2bbf1 100644
--- a/src/Models/Post.php
+++ b/src/Models/Post.php
@@ -44,20 +44,6 @@ class Post extends Model
    }

    /**
     * The "booting" method of the model.
     *
     * @return void
     */
    protected static function boot()
    {
        parent::boot();

        static::addGlobalScope('published', function (Builder $builder) {
            $builder->where('post_status', 'publish');
        });
    }

    /**
     * Get a post by its slug.
     *
     * @param $slug
@@ -213,17 +199,19 @@ class Post extends Model
        })->get();
    }

    /**
     * Retrieves the navigation to next/previous post, when applicable.
     *
     * @see get_the_post_navigation()
     * @param array $args
     * @return string
     */
     /**
      * Retrieves the navigation to next/previous post, when applicable.
      *
      * @see get_the_post_navigation()
      *
      * @param array $args
      *
      * @return string
      */
     public static function navigation($args = [])
     {
         return get_the_post_navigation($args);
    }
     }

    /**
     * Get the permalink for this post.
@@ -318,4 +306,18 @@ class Post extends Model
    {
        return new WP_Post((object) $this->toArray());
    }

    /**
     * The "booting" method of the model.
     *
     * @return void
     */
    protected static function boot()
    {
        parent::boot();

        static::addGlobalScope('published', function (Builder $builder) {
            $builder->where('post_status', 'publish');
        });
    }
}