From 0cd5c56965abd30232399a69d0dc499b3789c42b Mon Sep 17 00:00:00 2001 From: Jordan Doyle Date: Sat, 14 Apr 2018 15:29:14 +0100 Subject: [PATCH] Apply fixes from StyleCI (#21) [ci skip] [skip ci] --- 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 +++ b/src/Providers/WordpressServiceProvider.php @@ -139,7 +139,8 @@ class WordpressServiceProvider extends ServiceProvider * `__`. 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 +++ b/src/Proxy/WordpressDatabase.php @@ -72,12 +72,15 @@ class WordpressDatabase extends wpdb * 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 +++ b/src/Support/RecursiveMenuIterator.php @@ -33,7 +33,7 @@ class RecursiveMenuIterator implements RecursiveIterator // 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; -- libgit2 1.7.2