🏡 index : ~doyle/koselig.git

author Jordan Doyle <jordan.doyle@outlook.com> 2016-10-03 19:49:36.0 +00:00:00
committer Jordan Doyle <w4@users.noreply.github.com> 2016-10-03 19:50:12.0 +00:00:00
commit
75e010903e07f8c2509db90e061197e57584d272 [patch]
tree
f2612ff0e120ed1226f3d3b8de5296048d308fdd
parent
71bd3e8a833afd912bca1522fa08693887b84aa5
download
75e010903e07f8c2509db90e061197e57584d272.tar.gz

Applied fixes from StyleCI



Diff

 config/posttypes.php                       | 4 ++--
 config/templates.php                       | 3 +--
 config/wordpress.php                       | 2 +-
 src/Models/Meta.php                        | 4 ++--
 src/Models/User.php                        | 2 +-
 src/Models/UserMeta.php                    | 4 ++--
 src/Providers/ConfigServiceProvider.php    | 2 +-
 src/Providers/KoseligServiceProvider.php   | 4 ----
 src/Providers/WordpressServiceProvider.php | 1 -
 src/Routing/ArchiveRoute.php               | 4 ++--
 src/Routing/PageRoute.php                  | 2 +-
 src/Routing/SingularRoute.php              | 2 +-
 src/Routing/TemplateRoute.php              | 2 +-
 src/Support/Action.php                     | 2 +-
 src/Support/Wordpress.php                  | 5 +++--
 15 files changed, 19 insertions(+), 24 deletions(-)

diff --git a/config/posttypes.php b/config/posttypes.php
index fe2b144..4bb949f 100644
--- a/config/posttypes.php
+++ b/config/posttypes.php
@@ -14,6 +14,6 @@ return [
        'supports' => [
            'title',
            'revisions',
        ]
    ]
        ],
    ],
];
diff --git a/config/templates.php b/config/templates.php
index 4b56186..2551fd2 100644
--- a/config/templates.php
+++ b/config/templates.php
@@ -11,7 +11,6 @@ return [
    | application. This should be in slug => friendly name format.
    */

    'home' => 'Homepage'
    'home' => 'Homepage',

];

diff --git a/config/wordpress.php b/config/wordpress.php
index 6d01ff8..d9f41bc 100644
--- a/config/wordpress.php
+++ b/config/wordpress.php
@@ -8,5 +8,5 @@ return [
    'auth_salt' => env('AUTH_SALT'),
    'secure_auth_salt' => env('SECURE_AUTH_SALT'),
    'logged_in_salt' => env('LOGGED_IN_SALT'),
    'nonce_salt' => env('NONCE_SALT')
    'nonce_salt' => env('NONCE_SALT'),
];
diff --git a/src/Models/Meta.php b/src/Models/Meta.php
index 0a6b153..03c6973 100644
--- a/src/Models/Meta.php
+++ b/src/Models/Meta.php
@@ -22,7 +22,7 @@ class Meta extends Model
    public static $cache = [];

    /**
     * Get metadata for a page (or the current page)
     * Get metadata for a page (or the current page).
     *
     * <code>Meta::get('my_meta_key');</code>
     * or
@@ -47,7 +47,7 @@ class Meta extends Model
        if (!isset(self::$cache[$page])) {
            // get all the meta values for a post, it's more than likely we're going to
            // need this again query, so we'll just grab all the results and cache them.
            self::$cache[$page] = Meta::where('post_id', $page)->get();
            self::$cache[$page] = self::where('post_id', $page)->get();
        }

        if ($name === null) {
diff --git a/src/Models/User.php b/src/Models/User.php
index 75e2a03..80a82f5 100644
--- a/src/Models/User.php
+++ b/src/Models/User.php
@@ -21,6 +21,6 @@ class User extends Model
     */
    public function posts()
    {
        return $this->hasMany(User::class, 'post_author');
        return $this->hasMany(self::class, 'post_author');
    }
}
diff --git a/src/Models/UserMeta.php b/src/Models/UserMeta.php
index 7f92cbc..db1c581 100644
--- a/src/Models/UserMeta.php
+++ b/src/Models/UserMeta.php
@@ -22,7 +22,7 @@ class UserMeta extends Model
    public static $cache = [];

    /**
     * Get metadata for a user
     * Get metadata for a user.
     *
     * @param int|string|null $user user to get meta for (or name of the meta item to get
     *                              if you want to get the current user's meta)
@@ -43,7 +43,7 @@ class UserMeta extends Model
        if (!isset(self::$cache[$user])) {
            // get all the meta values for a post, it's more than likely we're going to
            // need this again query, so we'll just grab all the results and cache them.
            self::$cache[$user] = UserMeta::where('user_id', $user)->get();
            self::$cache[$user] = self::where('user_id', $user)->get();
        }

        if ($name === null) {
diff --git a/src/Providers/ConfigServiceProvider.php b/src/Providers/ConfigServiceProvider.php
index 336f587..9cde954 100644
--- a/src/Providers/ConfigServiceProvider.php
+++ b/src/Providers/ConfigServiceProvider.php
@@ -15,7 +15,7 @@ class ConfigServiceProvider extends ServiceProvider
        $this->publishes([
            realpath(__DIR__ . '/../../config/templates.php') => config_path('templates.php'),
            realpath(__DIR__ . '/../../config/wordpress.php') => config_path('wordpress.php'),
            realpath(__DIR__ . '/../../config/posttypes.php') => config_path('posttypes.php')
            realpath(__DIR__ . '/../../config/posttypes.php') => config_path('posttypes.php'),
        ]);
    }
}
diff --git a/src/Providers/KoseligServiceProvider.php b/src/Providers/KoseligServiceProvider.php
index bfa9d30..0380878 100644
--- a/src/Providers/KoseligServiceProvider.php
+++ b/src/Providers/KoseligServiceProvider.php
@@ -1,11 +1,7 @@
<?php
namespace Koselig\Providers;

use Illuminate\Container\Container;
use Illuminate\Routing\Router;
use Illuminate\Support\ServiceProvider;
use Koselig\Support\TemplateRoute;
use Route;

/**
 * Registers all the other service providers used by this package.
diff --git a/src/Providers/WordpressServiceProvider.php b/src/Providers/WordpressServiceProvider.php
index 8a82cc4..93e3c02 100644
--- a/src/Providers/WordpressServiceProvider.php
+++ b/src/Providers/WordpressServiceProvider.php
@@ -1,5 +1,4 @@
<?php

namespace Koselig\Providers;

use Illuminate\Contracts\Routing\UrlGenerator;
diff --git a/src/Routing/ArchiveRoute.php b/src/Routing/ArchiveRoute.php
index f22e41c..49113ed 100644
--- a/src/Routing/ArchiveRoute.php
+++ b/src/Routing/ArchiveRoute.php
@@ -14,7 +14,7 @@ use Koselig\Support\Wordpress;
class ArchiveRoute extends Route
{
    /**
     * Post types for this archive route to hook onto
     * Post types for this archive route to hook onto.
     *
     * @var array
     */
@@ -37,7 +37,7 @@ class ArchiveRoute extends Route
    }

    /**
     * Format a nice string for php artisan route:list
     * Format a nice string for php artisan route:list.
     *
     * @return string
     */
diff --git a/src/Routing/PageRoute.php b/src/Routing/PageRoute.php
index a2a7b22..7b97b65 100644
--- a/src/Routing/PageRoute.php
+++ b/src/Routing/PageRoute.php
@@ -14,7 +14,7 @@ use Koselig\Support\Wordpress;
class PageRoute extends Route
{
    /**
     * Format a nice string for php artisan route:list
     * Format a nice string for php artisan route:list.
     *
     * @return string
     */
diff --git a/src/Routing/SingularRoute.php b/src/Routing/SingularRoute.php
index 30185ef..1d0bc55 100644
--- a/src/Routing/SingularRoute.php
+++ b/src/Routing/SingularRoute.php
@@ -37,7 +37,7 @@ class SingularRoute extends Route
    }

    /**
     * Format a nice string for php artisan route:list
     * Format a nice string for php artisan route:list.
     *
     * @return string
     */
diff --git a/src/Routing/TemplateRoute.php b/src/Routing/TemplateRoute.php
index 288b6cf..65d46b2 100644
--- a/src/Routing/TemplateRoute.php
+++ b/src/Routing/TemplateRoute.php
@@ -14,7 +14,7 @@ use Koselig\Support\Wordpress;
class TemplateRoute extends Route
{
    /**
     * Format a nice string for php artisan route:list
     * Format a nice string for php artisan route:list.
     *
     * @return string
     */
diff --git a/src/Support/Action.php b/src/Support/Action.php
index cd188eb..9b66fef 100644
--- a/src/Support/Action.php
+++ b/src/Support/Action.php
@@ -22,7 +22,7 @@ class Action
    }

    /**
     * Run all filters hooked to <pre>$tag</pre> on the given <pre>$value</pre>
     * Run all filters hooked to <pre>$tag</pre> on the given <pre>$value</pre>.
     *
     * @param string $tag tag to run
     * @param mixed $value value to run filters on
diff --git a/src/Support/Wordpress.php b/src/Support/Wordpress.php
index 776b40c..e6a51cd 100644
--- a/src/Support/Wordpress.php
+++ b/src/Support/Wordpress.php
@@ -18,6 +18,7 @@ class Wordpress
    public static function query()
    {
        global $wp_query;

        return $wp_query;
    }

@@ -43,7 +44,7 @@ class Wordpress
    }

    /**
     * Check if the current page is a singular item (eg. a news post)
     * Check if the current page is a singular item (eg. a news post).
     *
     * @param array|string $types
     * @return bool
@@ -54,7 +55,7 @@ class Wordpress
    }

    /**
     * Check if the current page is an archive page
     * Check if the current page is an archive page.
     *
     * @param string|array|null $types check if the archive page is for this type
     * @return bool