From 4841b94e2e82ec21e7c38dd249f2710c33e51188 Mon Sep 17 00:00:00 2001 From: Ramya krishna Date: Tue, 22 Oct 2024 18:24:39 +0530 Subject: [PATCH 1/3] added linting fixes --- composer.lock | 235 +++++++++++++---------------------------- includes/Solutions.php | 12 +-- 2 files changed, 78 insertions(+), 169 deletions(-) diff --git a/composer.lock b/composer.lock index 169ba59..a3bd3b0 100644 --- a/composer.lock +++ b/composer.lock @@ -140,22 +140,77 @@ }, "time": "2022-08-26T17:23:54+00:00" }, + { + "name": "newfold-labs/wp-module-context", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/newfold-labs/wp-module-context.git", + "reference": "fb57e927df45ef33573fe7f429ef1e088b0a6df0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/newfold-labs/wp-module-context/zipball/fb57e927df45ef33573fe7f429ef1e088b0a6df0", + "reference": "fb57e927df45ef33573fe7f429ef1e088b0a6df0", + "shasum": "" + }, + "require": { + "wp-forge/helpers": "^2.0" + }, + "require-dev": { + "newfold-labs/wp-php-standards": "^1.2" + }, + "type": "library", + "autoload": { + "psr-4": { + "NewfoldLabs\\WP\\Context\\": "includes" + }, + "files": [ + "includes/functions.php", + "bootstrap.php" + ] + }, + "scripts": { + "fix": [ + "vendor/bin/phpcbf . --standard=phpcs.xml" + ], + "lint": [ + "vendor/bin/phpcs . --standard=phpcs.xml -s" + ] + }, + "license": [ + "GPL-2.0-or-later" + ], + "authors": [ + { + "name": "Evan Mullins", + "homepage": "https://evanmullins.com" + } + ], + "description": "Newfold module to determine context for various brands and platforms.", + "support": { + "source": "https://github.com/newfold-labs/wp-module-context/tree/1.0.1", + "issues": "https://github.com/newfold-labs/wp-module-context/issues" + }, + "time": "2024-05-23T20:34:28+00:00" + }, { "name": "newfold-labs/wp-module-data", - "version": "2.6.3", + "version": "2.6.5", "source": { "type": "git", "url": "https://github.com/newfold-labs/wp-module-data.git", - "reference": "f98dfabe6a4cb10aec6dcd6e81fc7d269238e9a4" + "reference": "002cc3da70565af1708408f7d7604396d2af55e3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/newfold-labs/wp-module-data/zipball/f98dfabe6a4cb10aec6dcd6e81fc7d269238e9a4", - "reference": "f98dfabe6a4cb10aec6dcd6e81fc7d269238e9a4", + "url": "https://api.github.com/repos/newfold-labs/wp-module-data/zipball/002cc3da70565af1708408f7d7604396d2af55e3", + "reference": "002cc3da70565af1708408f7d7604396d2af55e3", "shasum": "" }, "require": { "ext-json": "*", + "newfold-labs/wp-module-context": "^1.0", "newfold-labs/wp-module-loader": "^1.0.10", "wp-forge/helpers": "^2.0", "wp-forge/wp-query-builder": "^1.0.4", @@ -233,10 +288,10 @@ ], "description": "Newfold Data Module", "support": { - "source": "https://github.com/newfold-labs/wp-module-data/tree/2.6.3", + "source": "https://github.com/newfold-labs/wp-module-data/tree/2.6.5", "issues": "https://github.com/newfold-labs/wp-module-data/issues" }, - "time": "2024-08-30T19:51:58+00:00" + "time": "2024-10-18T19:30:28+00:00" }, { "name": "newfold-labs/wp-module-loader", @@ -1438,91 +1493,25 @@ ], "time": "2024-09-18T10:38:58+00:00" }, - { - "name": "symfony/deprecation-contracts", - "version": "v2.5.3", - "source": { - "type": "git", - "url": "https://github.com/symfony/deprecation-contracts.git", - "reference": "80d075412b557d41002320b96a096ca65aa2c98d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/80d075412b557d41002320b96a096ca65aa2c98d", - "reference": "80d075412b557d41002320b96a096ca65aa2c98d", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "2.5-dev" - }, - "thanks": { - "name": "symfony/contracts", - "url": "https://github.com/symfony/contracts" - } - }, - "autoload": { - "files": [ - "function.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "A generic function and convention to trigger deprecation notices", - "homepage": "https://symfony.com", - "support": { - "source": "https://github.com/symfony/deprecation-contracts/tree/v2.5.3" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2023-01-24T14:02:46+00:00" - }, { "name": "symfony/finder", - "version": "v5.4.43", + "version": "v7.1.4", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", - "reference": "ae25a9145a900764158d439653d5630191155ca0" + "reference": "d95bbf319f7d052082fb7af147e0f835a695e823" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/ae25a9145a900764158d439653d5630191155ca0", - "reference": "ae25a9145a900764158d439653d5630191155ca0", + "url": "https://api.github.com/repos/symfony/finder/zipball/d95bbf319f7d052082fb7af147e0f835a695e823", + "reference": "d95bbf319f7d052082fb7af147e0f835a695e823", "shasum": "" }, "require": { - "php": ">=7.2.5", - "symfony/deprecation-contracts": "^2.1|^3", - "symfony/polyfill-php80": "^1.16" + "php": ">=8.2" + }, + "require-dev": { + "symfony/filesystem": "^6.4|^7.0" }, "type": "library", "autoload": { @@ -1550,87 +1539,7 @@ "description": "Finds files and directories via an intuitive fluent interface", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/finder/tree/v5.4.43" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2024-08-13T14:03:51+00:00" - }, - { - "name": "symfony/polyfill-php80", - "version": "v1.31.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-php80.git", - "reference": "60328e362d4c2c802a54fcbf04f9d3fb892b4cf8" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/60328e362d4c2c802a54fcbf04f9d3fb892b4cf8", - "reference": "60328e362d4c2c802a54fcbf04f9d3fb892b4cf8", - "shasum": "" - }, - "require": { - "php": ">=7.2" - }, - "type": "library", - "extra": { - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, - "autoload": { - "files": [ - "bootstrap.php" - ], - "psr-4": { - "Symfony\\Polyfill\\Php80\\": "" - }, - "classmap": [ - "Resources/stubs" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Ion Bazan", - "email": "ion.bazan@gmail.com" - }, - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "polyfill", - "portable", - "shim" - ], - "support": { - "source": "https://github.com/symfony/polyfill-php80/tree/v1.31.0" + "source": "https://github.com/symfony/finder/tree/v7.1.4" }, "funding": [ { @@ -1646,7 +1555,7 @@ "type": "tidelift" } ], - "time": "2024-09-09T11:45:10+00:00" + "time": "2024-08-13T14:28:19+00:00" }, { "name": "wp-cli/i18n-command", @@ -1975,5 +1884,5 @@ "prefer-lowest": false, "platform": [], "platform-dev": [], - "plugin-api-version": "2.6.0" + "plugin-api-version": "2.3.0" } diff --git a/includes/Solutions.php b/includes/Solutions.php index 9689af2..b64585c 100644 --- a/includes/Solutions.php +++ b/includes/Solutions.php @@ -97,10 +97,10 @@ public function init_entitilements_apis(): void { */ public static function add_my_plugins_and_tools_tab( array $tabs ) { $capability = new SiteCapabilities(); - - $hasSolutions = $capability->get( 'hasSolution' ); - if( !$hasSolutions){ + $hasSolutions = $capability->get( 'hasSolution' ); + + if ( ! $hasSolutions ) { return $tabs; } $hiive = new HiiveConnection(); @@ -117,14 +117,14 @@ public static function add_my_plugins_and_tools_tab( array $tabs ) { */ public static function add_plugins_and_tools_menu_link() { $capability = new SiteCapabilities(); - - $hasSolutions = $capability->get( 'hasSolution' ); + + $hasSolutions = $capability->get( 'hasSolution' ); if ( $hasSolutions ) { $hiive = new HiiveConnection(); $api = new EntitlementsApi( $hiive ); $entitlements = $api->get_items(); - if( is_array( $entitlements->data ) ? $entitlements->data['entitlements'] : $entitlements->data->entitlements ){ + if ( is_array( $entitlements->data ) ? $entitlements->data['entitlements'] : $entitlements->data->entitlements ) { add_submenu_page( 'plugins.php', 'nfd_my_plugins_and_tools', From ab7fd4c652d67ec3202668f69b9a1a0b0edc7aa8 Mon Sep 17 00:00:00 2001 From: Ramya krishna Date: Tue, 22 Oct 2024 18:32:40 +0530 Subject: [PATCH 2/3] pls-provide replaced with plugin-provider --- includes/js/myPluginsTools.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/includes/js/myPluginsTools.js b/includes/js/myPluginsTools.js index 0b3ffcb..2d4e096 100644 --- a/includes/js/myPluginsTools.js +++ b/includes/js/myPluginsTools.js @@ -72,8 +72,8 @@ class MyPluginTools { return ``; @@ -95,7 +95,7 @@ class MyPluginTools { return `