🏡 index : ~doyle/koselig.git

author Jordan Doyle <jordan@doyle.wf> 2018-04-14 15:29:14.0 +01:00:00
committer GitHub <noreply@github.com> 2018-04-14 15:29:14.0 +01:00:00
commit
0cd5c56965abd30232399a69d0dc499b3789c42b [patch]
tree
3d1934a59622dfd7f34a9ae1dd58d7fbcc1cfba2
parent
32bd5c67a3052fc924d3e020c9541a30204d65fa
download
0cd5c56965abd30232399a69d0dc499b3789c42b.tar.gz

Apply fixes from StyleCI (#21)

[ci skip] [skip ci]

Diff

 src/Providers/WordpressServiceProvider.php | 3 ++-
 src/Proxy/WordpressDatabase.php            | 5 +++++
 src/Support/RecursiveMenuIterator.php      | 2 +-
 3 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/src/Providers/WordpressServiceProvider.php b/src/Providers/WordpressServiceProvider.php
index 73f292e..cb52df3 100644
--- a/src/Providers/WordpressServiceProvider.php
+++ a/src/Providers/WordpressServiceProvider.php
@@ -139,7 +139,8 @@
     * `__`. As Laravel's `__` is quite a bit more useful than
     * Wordpress'.
     */
    protected function patchWordpressL10n() {
    protected function patchWordpressL10n()
    {
        Cache::rememberForever('patch_wp_l10n', function () {
            $path = ABSPATH . 'wp-includes' . DIRECTORY_SEPARATOR . 'l10n.php';

diff --git a/src/Proxy/WordpressDatabase.php b/src/Proxy/WordpressDatabase.php
index a008bdc..fad47db 100644
--- a/src/Proxy/WordpressDatabase.php
+++ a/src/Proxy/WordpressDatabase.php
@@ -72,12 +72,15 @@
     * Determine if a database supports a particular feature.
     *
     * @see wpdb::has_cap()
     *
     * @param string $capability The feature to check for. Accepts 'collation',
     *                           'group_concat', 'subqueries', 'set_charset',
     *                           'utf8mb4', or 'utf8mb4_520'.
     *
     * @return int|false Whether the database feature is supported, false otherwise.
     */
    public function has_cap($capability) {
    public function has_cap($capability)
    {
        $capability = strtolower($capability);

        switch ($capability) {
diff --git a/src/Support/RecursiveMenuIterator.php b/src/Support/RecursiveMenuIterator.php
index 2f79c63..d825328 100644
--- a/src/Support/RecursiveMenuIterator.php
+++ a/src/Support/RecursiveMenuIterator.php
@@ -33,7 +33,7 @@

            // only have nodes without a parent at the top level of the tree
            $this->items = collect($itemsArray)->filter(function ($item) {
                return $item->menu_item_parent == 0;
                return $item->menu_item_parent === 0;
            })->reverse()->values();
        } else {
            $this->items = $menu;