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(-)
@@ -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';
@@ -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) {
@@ -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;