-
Notifications
You must be signed in to change notification settings - Fork 74
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
🔩 chore: Mozart integration #153
base: develop
Are you sure you want to change the base?
🔩 chore: Mozart integration #153
Conversation
WalkthroughThe recent updates primarily focus on increasing the minimum PHP version requirement from 7.2 to 7.4 across various files, including Changes
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 5
Outside diff range and nitpick comments (1)
dependencies/Appsero/License.php (1)
634-656
: Ensure proper error handling inactive_client_license
.The method
active_client_license
handles errors but does not log them. Consider adding error logging for better traceability and debugging.Tools
PHPStan
653-653: Function update_option not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files ignored due to path filters (1)
composer.lock
is excluded by!**/*.lock
Files selected for processing (8)
- README.md (1 hunks)
- composer.json (2 hunks)
- dependencies/Appsero/Client.php (1 hunks)
- dependencies/Appsero/Insights.php (1 hunks)
- dependencies/Appsero/License.php (1 hunks)
- dependencies/Appsero/Updater.php (1 hunks)
- readme.txt (1 hunks)
- wepos.php (1 hunks)
Files not summarized due to errors (1)
- dependencies/Appsero/Insights.php: Error: Message exceeds token limit
Additional context used
PHPStan
dependencies/Appsero/Client.php
137-137: Function wp_doing_ajax not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
142-142: Function _deprecated_function not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
146-146: Call to static method init() on an unknown class WeDevs\WePOS\Dependencies\Appsero\Updater. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
176-176: Function apply_filters not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
178-178: Function trailingslashit not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
187-187: Constant WP_CONTENT_DIR not found. (constant.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
188-188: Function plugin_basename not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
192-192: Constant ABSPATH not found. (constant.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
194-194: Function get_plugin_data not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
199-199: Constant WP_CONTENT_DIR not found. (constant.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
203-203: Function wp_get_theme not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
224-224: Function esc_url not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
224-224: Function home_url not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
228-228: Function wp_remote_post not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
253-253: Function apply_filters not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbolsdependencies/Appsero/Updater.php
67-67: Function add_filter not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
68-68: Function add_filter not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
77-77: Function add_filter not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
90-90: Function is_multisite not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
131-131: Function get_transient not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
162-162: Constant HOUR_IN_SECONDS not found. (constant.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
162-162: Function set_transient not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
183-183: Function is_wp_error not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
187-187: Function wp_remote_retrieve_body not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
239-239: Function is_multisite not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbolswepos.php
81-81: Function register_activation_hook not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
82-82: Function register_deactivation_hook not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
84-84: Function add_action not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
85-85: Function add_filter not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
87-87: Function add_action not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
90-90: Function add_action not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
92-92: Function add_action not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
93-93: Function add_action not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
118-118: Function current_user_can not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
119-119: Constant WEPOS_PATH not found. (constant.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
131-131: Function did_action not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
131-131: Function is_admin not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
155-155: Function get_plugins not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
166-166: Function apply_filters not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
175-175: Function add_rewrite_rule not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
177-177: Function get_transient not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
178-178: Function flush_rewrite_rules not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
179-179: Function delete_transient not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
250-250: Function plugins_url not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
262-262: Function do_action not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
273-273: Instantiated class WeDevs\WePOS\Installer not found. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
286-286: Instantiated class WP_User_Query not found. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
305-305: Constant WEPOS_INCLUDES not found. (constant.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
314-314: Function add_action not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
315-315: Function add_action not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
324-324: Function is_admin not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
325-325: Instantiated class WeDevs\WePOS\Admin\Admin not found. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
326-326: Instantiated class WeDevs\WePOS\Admin\Settings not found. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
328-328: Instantiated class WeDevs\WePOS\Admin\Products not found. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
329-329: Instantiated class WeDevs\WePOS\Admin\Updates not found. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
330-330: Instantiated class WeDevs\WePOS\Admin\LimitedTimePromotion not found. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
331-331: Instantiated class WeDevs\WePOS\Admin\Discounts not found. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
333-333: Instantiated class WeDevs\WePOS\Frontend not found. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
337-337: Instantiated class WeDevs\WePOS\Dokan not found. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
340-340: Instantiated class WeDevs\WePOS\Common not found. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
341-341: Instantiated class WeDevs\WePOS\REST\Manager not found. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
342-342: Instantiated class WeDevs\WePOS\Assets not found. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
345-345: Instantiated class WeDevs\WePOS\Gateways\Manager not found. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
354-354: Function load_plugin_textdomain not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
354-354: Function plugin_basename not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
365-365: Function wc not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
398-398: Function wc_get_products not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
399-399: Function wc_get_orders not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
417-417: Function wc not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
418-418: Constant WC_ABSPATH not found. (constant.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
419-419: Constant WC_ABSPATH not found. (constant.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
420-420: Constant WC_ABSPATH not found. (constant.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
421-421: Constant WC_ABSPATH not found. (constant.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
422-422: Constant WC_ABSPATH not found. (constant.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
423-423: Constant WC_ABSPATH not found. (constant.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
424-424: Constant WC_ABSPATH not found. (constant.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
427-427: Function apply_filters not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
428-428: Function wc not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
429-429: Function wc not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
431-431: Function get_current_user_id not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
431-431: Function wc not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
431-431: Instantiated class WC_Customer not found. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
433-433: Function wc not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
433-433: Instantiated class WC_Cart not found. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
436-436: Function add_action not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
436-436: Function wc not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbolsdependencies/Appsero/License.php
66-66: Parameter $client of method WeDevs\WePOS\Dependencies\Appsero\License::__construct() has invalid type WeDevs\WePOS\Dependencies\Appsero\Client. (class.notFound)
74-74: Function add_action not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
77-77: Function add_action not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
108-108: Function get_option not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
152-152: Function esc_url not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
152-152: Function home_url not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
158-158: Function is_wp_error not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
165-165: Function wp_remote_retrieve_body not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
190-190: Function wp_send_json_success not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
217-217: Function wp_parse_args not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
219-219: Function add_action not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
248-248: Function sanitize_key not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
248-248: Function wp_unslash not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
248-248: Function wp_verify_nonce not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
250-250: Function sanitize_key not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
250-250: Function wp_unslash not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
251-251: Function sanitize_text_field not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
251-251: Function wp_unslash not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
252-252: Function sanitize_text_field not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
252-252: Function wp_unslash not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
267-267: Function do_action not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
279-279: Function wp_create_nonce not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
286-286: Function esc_attr not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
304-304: Function do_action not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
317-317: Function sanitize_key not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
317-317: Function wp_unslash not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
317-317: Function wp_verify_nonce not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
323-323: Function current_user_can not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
329-329: Function sanitize_text_field not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
329-329: Function wp_unslash not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
330-330: Function sanitize_text_field not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
330-330: Function wp_unslash not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
369-369: Function update_option not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
612-612: Function wp_create_nonce not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
653-653: Function update_option not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
756-756: Function wp_next_scheduled not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
757-757: Function wp_schedule_event not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
759-759: Function wp_schedule_single_event not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
767-767: Function wp_clear_scheduled_hook not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
776-776: Function register_activation_hook not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
777-777: Function register_deactivation_hook not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
781-781: Function add_action not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
782-782: Function add_action not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbolsdependencies/Appsero/Insights.php
56-56: Variable $file in empty() always exists and is always falsy. (empty.variable)
56-56: Variable $name in empty() always exists and is always falsy. (empty.variable)
57-57: Instantiated class WeDevs\WePOS\Dependencies\Appsero\Client not found. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
140-140: Function add_action not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
141-141: Function add_action not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
157-157: Function add_filter not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
158-158: Function add_action not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
162-162: Function register_activation_hook not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
163-163: Function register_deactivation_hook not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
175-175: Function add_action not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
178-178: Function add_action not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
181-181: Function add_action not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
184-184: Function add_filter not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
185-185: Function add_action not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
213-213: Function update_option not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
225-225: Function get_users not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
245-245: Function esc_url not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
245-245: Function home_url not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
247-247: Function get_option not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
294-294: Function get_option not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
297-297: Function delete_option not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
302-302: Function apply_filters not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
353-353: Function get_option not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
365-365: Function get_option not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
375-375: Function get_option not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
391-391: Function sanitize_text_field not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
391-391: Function wp_unslash not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
392-392: Function sanitize_text_field not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
392-392: Function wp_unslash not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
403-403: Function apply_filters not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
413-413: Function wp_unslash not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
415-415: Function wp_next_scheduled not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
416-416: Function wp_schedule_event not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
427-427: Function wp_clear_scheduled_hook not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
445-445: Function current_user_can not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
454-454: Function add_query_arg not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
454-454: Function wp_nonce_url not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
455-455: Function add_query_arg not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
455-455: Function wp_nonce_url not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
472-472: Function esc_url not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
473-473: Function esc_url not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
495-495: Function sanitize_key not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
495-495: Function wp_verify_nonce not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
499-499: Function current_user_can not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
506-506: Function remove_query_arg not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
506-506: Function wp_safe_redirect not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
513-513: Function remove_query_arg not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
513-513: Function wp_safe_redirect not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
525-525: Function update_option not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
526-526: Function update_option not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
535-535: Function do_action not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
545-545: Function update_option not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
546-546: Function update_option not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
555-555: Function do_action not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
599-599: Function size_format not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
599-599: Function wp_max_upload_size not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
617-617: Constant WP_MEMORY_LIMIT not found. (constant.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
619-619: Function get_locale not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
620-620: Function get_bloginfo not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
621-621: Function is_multisite not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
622-622: Function get_stylesheet not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
624-624: Function wp_get_theme not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
643-643: Constant ABSPATH not found. (constant.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
646-646: Function get_plugins not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
647-647: Function get_option not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
653-653: Function wp_strip_all_tags not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
656-656: Function wp_strip_all_tags not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
660-660: Function wp_strip_all_tags not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
664-664: Function wp_strip_all_tags not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
668-668: Function wp_strip_all_tags not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
694-694: Function count_users not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
719-719: Constant DAY_IN_SECONDS not found. (constant.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
733-733: Function get_option not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
743-743: Function wp_next_scheduled not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
744-744: Function wp_schedule_event not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
747-747: Function delete_option not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
762-762: Function delete_option not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
763-763: Function delete_option not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
766-766: Function delete_option not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
852-852: Function wp_send_json_error not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
855-855: Function sanitize_key not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
855-855: Function wp_unslash not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
855-855: Function wp_verify_nonce not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
856-856: Function wp_send_json_error not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
859-859: Function current_user_can not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
860-860: Function wp_send_json_error not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
864-864: Function sanitize_text_field not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
864-864: Function wp_unslash not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
865-865: Function sanitize_text_field not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
865-865: Function wp_unslash not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
872-872: Function do_action not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
874-874: Function wp_send_json_success not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
892-892: Function apply_filters not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
904-904: Function esc_attr not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
916-916: Function esc_attr not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
931-931: Function esc_url not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
932-932: Function esc_url not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
1011-1011: Function wp_create_nonce not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
1054-1054: Function wp_remote_get not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
1056-1056: Function is_wp_error not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
1060-1060: Function wp_remote_retrieve_body not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
1074-1074: Function get_bloginfo not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
1077-1077: Function get_bloginfo not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
1078-1078: Function wp_trim_words not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
1082-1082: Function esc_url not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
1082-1082: Function home_url not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
1093-1093: Function get_option not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
1103-1103: Function update_option not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
LanguageTool
README.md
[uncategorized] ~19-~19: You might be missing the article “the” here. (AI_EN_LECTOR_MISSING_DETERMINER_THE)
Context: ...ning Bar codes and add them directly to customer’s cart for processing the order. ### B...
[uncategorized] ~21-~21: The preposition “on” seems more likely in this position. (AI_EN_LECTOR_REPLACEMENT_PREPOSITION)
Context: ...rt for processing the order. ### Based of REST API ### wePOS is a single page app...
[uncategorized] ~21-~21: You might be missing the article “the” here. (AI_EN_LECTOR_MISSING_DETERMINER_THE)
Context: ...for processing the order. ### Based of REST API ### wePOS is a single page applicat...
[misspelling] ~22-~22: This word is normally spelled as one. (EN_COMPOUNDS_SUPER_FAST)
Context: ...is a single page application that works super fast. We have used WooCommerce REST API and ...
[uncategorized] ~22-~22: You might be missing the article “the” here. (AI_EN_LECTOR_MISSING_DETERMINER_THE)
Context: ...ion that works super fast. We have used WooCommerce REST API and some custom API to develop...
[style] ~22-~22: The phrase ‘a lot of’ might be wordy and overused. Consider using an alternative. (A_LOT_OF)
Context: ...e in time. In a physical store, you get a lot of customers who wait to checkout their pr...
[grammar] ~22-~22: The word “checkout” is a noun. The verb is spelled with a white space. (NOUN_VERB_CONFUSION)
Context: ... you get a lot of customers who wait to checkout their products. So, a fast system like ...
[uncategorized] ~25-~25: This verb does not appear to agree with the subject. Consider using a different form. (AI_EN_LECTOR_REPLACEMENT_VERB_AGREEMENT)
Context: ...r Interface ### A good UI can sometimes makes a system even more attractive. wePOS ha...
[style] ~28-~28: As an alternative to the over-used intensifier ‘very’, consider replacing this phrase. (EN_WEAK_ADJECTIVE)
Context: ...ts you use its features faster. This is very important for any physical store so that the sale...
[uncategorized] ~33-~33: You might be missing the article “a” here. (AI_EN_LECTOR_MISSING_DETERMINER_A)
Context: ...notice**. We collect the data to ensure great user experience for all our users. Int...
[uncategorized] ~38-~38: The preposition “to” seems more likely in this position. (AI_EN_LECTOR_REPLACEMENT_PREPOSITION)
Context: ...any features. If you want to contribute on this project, you are more than welcome...
[uncategorized] ~45-~45: You might be missing the article “the” here. (AI_EN_LECTOR_MISSING_DETERMINER_THE)
Context: ...ation and then activate the Plugin from Plugins page. ## Frequently Asked Questions ##...
[uncategorized] ~63-~63: When specifying a month and year, the comma is unnecessary. (COMMA_AFTER_A_MONTH)
Context: ...ings ## Changelog ## ### v1.2.7 -> 27 December, 2023 ### - Enhancement: Tax calculation ...
[uncategorized] ~66-~66: When specifying a month and year, the comma is unnecessary. (COMMA_AFTER_A_MONTH)
Context: ...ase price of products ### v1.2.6 -> 30 December, 2022 ### - New: Integrated Vue date rang...
[uncategorized] ~72-~72: When specifying a month and year, the comma is unnecessary. (COMMA_AFTER_A_MONTH)
Context: ...ated via wePOS setter ### v1.2.5 -> 02 November, 2022 ### - Feature: "View POS" menu on "...
[uncategorized] ~74-~74: This verb may not be in the correct form. Consider using a different form for this context. (AI_EN_LECTOR_REPLACEMENT_VERB_FORM)
Context: ...oCommerce settings to put a discount or adding a fee from POS frontend - **Enhancement...
[uncategorized] ~80-~80: When specifying a month and year, the comma is unnecessary. (COMMA_AFTER_A_MONTH)
Context: ...le replace automation ### v1.2.4 -> 28 June, 2022 ### - Fix: Localization issue on ch...
[uncategorized] ~83-~83: When specifying a month and year, the comma is unnecessary. (COMMA_AFTER_A_MONTH)
Context: ...hanging site language ### v1.2.3 -> 03 June, 2022 ### - Compatibility: Compatibility ...
[uncategorized] ~86-~86: When specifying a month and year, the comma is unnecessary. (COMMA_AFTER_A_MONTH)
Context: ...ity for WordPress 6.0 ### v1.2.2 -> 19 May, 2022 ### - Enhancement: Added keyboard a...
[uncategorized] ~92-~92: When specifying a month and year, the comma is unnecessary. (COMMA_AFTER_A_MONTH)
Context: ...wn closed on frontend ### v1.2.1 -> 15 March, 2022 ### - Feature: Remote promotion not...
[uncategorized] ~95-~95: When specifying a month and year, the comma is unnecessary. (COMMA_AFTER_A_MONTH)
Context: ...mote promotion notice ### v1.2.0 -> 27 January, 2022 ### - Compatibility: Compatibility ...
[uncategorized] ~97-~97: This verb may not be in the correct tense. Consider changing the tense to fit the context better. (AI_EN_LECTOR_REPLACEMENT_VERB_TENSE)
Context: ...:** Fixed an issue where wePOS frontend is not loading ### v1.1.12 -> 31 December...
[uncategorized] ~99-~99: When specifying a month and year, the comma is unnecessary. (COMMA_AFTER_A_MONTH)
Context: ...ntend is not loading ### v1.1.12 -> 31 December, 2021 ### - Feature: Stock support for th...
[style] ~100-~100: Unless you want to emphasize “not”, use “cannot” which is more common. (CAN_NOT_PREMIUM)
Context: ...out-of-stock products will be shown but can not be added into the cart - **Enhancement:...
[style] ~103-~103: Unless you want to emphasize “not”, use “cannot” which is more common. (CAN_NOT_PREMIUM)
Context: ...x:** Variation product's all variations can not be seen - Fix: Variation products a...
[uncategorized] ~109-~109: When specifying a month and year, the comma is unnecessary. (COMMA_AFTER_A_MONTH)
Context: ...ges not shown on POS ### v1.1.11 -> 19 November, 2021 ### - Enhancement: PSR-4 class auto...
[uncategorized] ~112-~112: When specifying a month and year, the comma is unnecessary. (COMMA_AFTER_A_MONTH)
Context: ... for Admin namespace ### v1.1.10 -> 19 November, 2021 ### - Feature: Admin dependency not...
[uncategorized] ~125-~125: When specifying a month and year, the comma is unnecessary. (COMMA_AFTER_A_MONTH)
Context: ...* NPM vulnerabilities ### v1.1.8 -> 19 October, 2021 ### - Enhancement: Added halloween ...
[uncategorized] ~128-~128: When specifying a month and year, the comma is unnecessary. (COMMA_AFTER_A_MONTH)
Context: ...ited promotion banner ### v1.1.7 -> 13 July, 2021 ### - Enhancement: Added summer sal...
[uncategorized] ~131-~131: When specifying a month and year, the comma is unnecessary. (COMMA_AFTER_A_MONTH)
Context: ...ited promotion banner ### v1.1.6 -> 08 May, 2021 ### - Enhancement: Added limited pr...
[uncategorized] ~134-~134: When specifying a month and year, the comma is unnecessary. (COMMA_AFTER_A_MONTH)
Context: ...ited promotion banner ### v1.1.5 -> 15 March, 2021 ### - Enhancement: Added limited pr...
[uncategorized] ~137-~137: When specifying a month and year, the comma is unnecessary. (COMMA_AFTER_A_MONTH)
Context: ...ited promotion banner ### v1.1.4 -> 21 December, 2020 ### - Enhancement: Added limited pr...
[uncategorized] ~140-~140: When specifying a month and year, the comma is unnecessary. (COMMA_AFTER_A_MONTH)
Context: ...ited promotion banner ### v1.1.3 -> 23 November, 2020 ### - Enhancement: Added limited pr...
[uncategorized] ~143-~143: When specifying a month and year, the comma is unnecessary. (COMMA_AFTER_A_MONTH)
Context: ...ited promotion banner ### v1.1.2 -> 28 October, 2020 ### - Fix: Permission callback warn...
[uncategorized] ~145-~145: You might be missing the article “the” here. (AI_EN_LECTOR_MISSING_DETERMINER_THE)
Context: ...Fix:** Duplicate order get generated if pay now button pressed twice while doing pa...
[grammar] ~145-~145: The correct verb here is “make”. (DO_MAKE)
Context: ...d if pay now button pressed twice while doing payment. - Fix: While Dokan install...
[uncategorized] ~146-~146: You might be missing the article “the” here. (AI_EN_LECTOR_MISSING_DETERMINER_THE)
Context: ...nstalled, login was redirecting back to account page. - Feature: Cash input checkin...
[uncategorized] ~151-~151: When specifying a month and year, the comma is unnecessary. (COMMA_AFTER_A_MONTH)
Context: ...d on current cart tab ### v1.1.1 -> 23 December, 2019 ### - Tweak Appser client updated ...
[uncategorized] ~154-~154: When specifying a month and year, the comma is unnecessary. (COMMA_AFTER_A_MONTH)
Context: ...Appser client updated ### v1.1.0 -> 09 December, 2019 ### - Fix Undefined customer_id ...
[uncategorized] ~159-~159: When specifying a month and year, the comma is unnecessary. (COMMA_AFTER_A_MONTH)
Context: ... Added appsero client ### v1.0.9 -> 25 September, 2019 ### - Fix Tax calculation issue i...
[uncategorized] ~163-~163: When specifying a month and year, the comma is unnecessary. (COMMA_AFTER_A_MONTH)
Context: ...lly added in pos cart ### v1.0.8 -> 22 August, 2019 ### - Fix Variation REST api rend...
[uncategorized] ~167-~167: When specifying a month and year, the comma is unnecessary. (COMMA_AFTER_A_MONTH)
Context: ...ooCommerce deactivate ### v1.0.7 -> 26 July, 2019 ### - Fix Category rendering issu...
[uncategorized] ~172-~172: When specifying a month and year, the comma is unnecessary. (COMMA_AFTER_A_MONTH)
Context: ...or better performance ### v1.0.6 -> 17 June, 2019 ### - Fix Remove deleted product ...
[uncategorized] ~176-~176: The grammatical number of this noun doesn’t look right. Consider replacing it. (AI_EN_LECTOR_REPLACEMENT_NOUN_NUMBER)
Context: ...tion issue fixed - Tweak Added some filter and hooks for extends future functional...
[uncategorized] ~178-~178: When specifying a month and year, the comma is unnecessary. (COMMA_AFTER_A_MONTH)
Context: ...future functionalites ### v1.0.5 -> 17 May, 2019 ### - Fix Customer not created if...
[uncategorized] ~186-~186: When specifying a month and year, the comma is unnecessary. (COMMA_AFTER_A_MONTH)
Context: ...ove some unwanted code ### v1.0.4 -> 3 May, 2019 ### - New Added extra column in o...
[uncategorized] ~194-~194: When specifying a month and year, the comma is unnecessary. (COMMA_AFTER_A_MONTH)
Context: ...r extending components ### v1.0.3 -> 8 April, 2019 ### - Fix Undefined issue in admi...readme.txt
[misspelling] ~22-~22: This word is normally spelled as one. (EN_COMPOUNDS_SUPER_FAST)
Context: ...is a single page application that works super fast. We have used WooCommerce REST API and ...
[style] ~22-~22: The phrase ‘a lot of’ might be wordy and overused. Consider using an alternative. (A_LOT_OF)
Context: ...e in time. In a physical store, you get a lot of customers who wait to checkout their pr...
[grammar] ~22-~22: The word “checkout” is a noun. The verb is spelled with a white space. (NOUN_VERB_CONFUSION)
Context: ... you get a lot of customers who wait to checkout their products. So, a fast system like ...
[grammar] ~25-~25: The modal verb ‘can’ requires the verb’s base form. (MD_BASEFORM)
Context: ...ser Interface = A good UI can sometimes makes a system even more attractive. wePOS ha...
[style] ~28-~28: As an alternative to the over-used intensifier ‘very’, consider replacing this phrase. (EN_WEAK_ADJECTIVE)
Context: ...ts you use its features faster. This is very important for any physical store so that the sale...
[uncategorized] ~63-~63: When specifying a month and year, the comma is unnecessary. (COMMA_AFTER_A_MONTH)
Context: ...ings == Changelog == = v1.2.7 -> 27th December, 2023 = - Enhancement: Tax calculation im...
[uncategorized] ~66-~66: When specifying a month and year, the comma is unnecessary. (COMMA_AFTER_A_MONTH)
Context: ...ase price of products = v1.2.6 -> 30th December, 2022 = - New: Integrated Vue date range ...
[uncategorized] ~72-~72: When specifying a month and year, the comma is unnecessary. (COMMA_AFTER_A_MONTH)
Context: ...eated via wePOS setter = v1.2.5 -> 1st November, 2022 = - Feature: "View POS" menu on "My...
[uncategorized] ~80-~80: When specifying a month and year, the comma is unnecessary. (COMMA_AFTER_A_MONTH)
Context: ...le replace automation = v1.2.4 -> 28th June, 2022 = - Fix: Localization issue on chan...
[uncategorized] ~83-~83: When specifying a month and year, the comma is unnecessary. (COMMA_AFTER_A_MONTH)
Context: ...changing site language = v1.2.3 -> 3rd June, 2022 = - Compatibility: Compatibility fo...
[uncategorized] ~86-~86: When specifying a month and year, the comma is unnecessary. (COMMA_AFTER_A_MONTH)
Context: ...ity for WordPress 6.0 = v1.2.2 -> 19th May, 2022 = - Enhancement: Added keyboard acc...
[uncategorized] ~92-~92: When specifying a month and year, the comma is unnecessary. (COMMA_AFTER_A_MONTH)
Context: ...wn closed on frontend = v1.2.1 -> 15th March, 2022 = - Feat: Remote promotion notice ...
[uncategorized] ~95-~95: When specifying a month and year, the comma is unnecessary. (COMMA_AFTER_A_MONTH)
Context: ...mote promotion notice = v1.2.0 -> 27th January, 2022 = - Compatibility: Compatibility fo...
[uncategorized] ~99-~99: When specifying a month and year, the comma is unnecessary. (COMMA_AFTER_A_MONTH)
Context: ...ntend is not loading = v1.1.12 -> 31st December, 2021 = - Feature: Stock support for the ...
[style] ~100-~100: Unless you want to emphasize “not”, use “cannot” which is more common. (CAN_NOT_PREMIUM)
Context: ...out-of-stock products will be shown but can not be added into the cart - **Enhancement...
[style] ~105-~105: Unless you want to emphasize “not”, use “cannot” which is more common. (CAN_NOT_PREMIUM)
Context: ...x:** Variation product's all variations can not be seen - Fix: Variation products a...
[uncategorized] ~111-~111: When specifying a month and year, the comma is unnecessary. (COMMA_AFTER_A_MONTH)
Context: ...mages not shown on POS = v1.1.11 -> 19 November, 2021 = - Fix: PSR-4 class autoloading f...
[uncategorized] ~115-~115: When specifying a month and year, the comma is unnecessary. (COMMA_AFTER_A_MONTH)
Context: ...ng for Admin namespace = v1.1.10 -> 19 November, 2021 = - Feature: Admin dependency noti...
[uncategorized] ~131-~131: When specifying a month and year, the comma is unnecessary. (COMMA_AFTER_A_MONTH)
Context: ...:** NPM vulnerabilities = v1.1.8 -> 19 October, 2021 = - Enhancement: Added halloween s...
[uncategorized] ~135-~135: When specifying a month and year, the comma is unnecessary. (COMMA_AFTER_A_MONTH)
Context: ...imited promotion banner = v1.1.7 -> 13 July, 2021 = - Enhancement: Added summer sale...
[uncategorized] ~139-~139: When specifying a month and year, the comma is unnecessary. (COMMA_AFTER_A_MONTH)
Context: ...imited promotion banner = v1.1.6 -> 08 May, 2021 = - Enhancement: Added limited pro...
[uncategorized] ~143-~143: When specifying a month and year, the comma is unnecessary. (COMMA_AFTER_A_MONTH)
Context: ...imited promotion banner = v1.1.5 -> 15 March, 2021 = - Enhancement: Added limited pro...
[uncategorized] ~147-~147: When specifying a month and year, the comma is unnecessary. (COMMA_AFTER_A_MONTH)
Context: ...imited promotion banner = v1.1.4 -> 21 December, 2020 = - Enhancement: Added limited pro...
[uncategorized] ~151-~151: When specifying a month and year, the comma is unnecessary. (COMMA_AFTER_A_MONTH)
Context: ...imited promotion banner = v1.1.3 -> 23 November, 2020 = - Enhancement: Added limited pro...
[uncategorized] ~155-~155: When specifying a month and year, the comma is unnecessary. (COMMA_AFTER_A_MONTH)
Context: ...imited promotion banner = v1.1.2 -> 28 October, 2020 = ---------------------------- - **Fix:...
[grammar] ~158-~158: The correct verb here is “make”. (DO_MAKE)
Context: ...d if pay now button pressed twice while doing payment. - Fix: While Dokan install...
[uncategorized] ~164-~164: When specifying a month and year, the comma is unnecessary. (COMMA_AFTER_A_MONTH)
Context: ...sed on current cart tab = v1.1.1 -> 23 December, 2019 = ---------------------------- - **Twea...
[uncategorized] ~168-~168: When specifying a month and year, the comma is unnecessary. (COMMA_AFTER_A_MONTH)
Context: ... Appser client updated = v1.1.0 -> 09 December, 2019 = ---------------------------- - **Twea...
[uncategorized] ~174-~174: When specifying a month and year, the comma is unnecessary. (COMMA_AFTER_A_MONTH)
Context: ...customer_id error fixed = v1.0.9 -> 25 September, 2019 = ---------------------------- - *Fix...
[uncategorized] ~179-~179: When specifying a month and year, the comma is unnecessary. (COMMA_AFTER_A_MONTH)
Context: ...ually added in pos cart = v1.0.8 -> 22 August, 2019 = ---------------------------- - *Fix...
[uncategorized] ~184-~184: When specifying a month and year, the comma is unnecessary. (COMMA_AFTER_A_MONTH)
Context: ... WooCommerce deactivate = v1.0.7 -> 26 July, 2019 = ---------------------------- - *Fix...
[uncategorized] ~190-~190: When specifying a month and year, the comma is unnecessary. (COMMA_AFTER_A_MONTH)
Context: ... for better performance = v1.0.6 -> 17 June, 2019 = ---------------------------- - *Fix...
[uncategorized] ~197-~197: When specifying a month and year, the comma is unnecessary. (COMMA_AFTER_A_MONTH)
Context: ...s future functionalites = v1.0.5 -> 17 May, 2019 = ---------------------------- - *Fix...
[uncategorized] ~206-~206: When specifying a month and year, the comma is unnecessary. (COMMA_AFTER_A_MONTH)
Context: ...emove some unwanted code = v1.0.4 -> 3 May, 2019 = ---------------------------- - *New...
[uncategorized] ~215-~215: When specifying a month and year, the comma is unnecessary. (COMMA_AFTER_A_MONTH)
Context: ...for extending components = v1.0.3 -> 8 April, 2019 = ---------------------------- - *Fix...
Markdownlint
README.md
1-1: Expected: 1; Actual: 0; Below (MD022, blanks-around-headings)
Headings should be surrounded by blank lines
18-18: Expected: 1; Actual: 0; Below (MD022, blanks-around-headings)
Headings should be surrounded by blank lines
21-21: Expected: 1; Actual: 0; Below (MD022, blanks-around-headings)
Headings should be surrounded by blank lines
24-24: Expected: 1; Actual: 0; Below (MD022, blanks-around-headings)
Headings should be surrounded by blank lines
27-27: Expected: 1; Actual: 0; Below (MD022, blanks-around-headings)
Headings should be surrounded by blank lines
30-30: Expected: 1; Actual: 0; Below (MD022, blanks-around-headings)
Headings should be surrounded by blank lines
37-37: Expected: 1; Actual: 0; Below (MD022, blanks-around-headings)
Headings should be surrounded by blank lines
40-40: Expected: 1; Actual: 0; Below (MD022, blanks-around-headings)
Headings should be surrounded by blank lines
47-47: Expected: 1; Actual: 0; Below (MD022, blanks-around-headings)
Headings should be surrounded by blank lines
50-50: Expected: 1; Actual: 0; Below (MD022, blanks-around-headings)
Headings should be surrounded by blank lines
63-63: Expected: 1; Actual: 0; Below (MD022, blanks-around-headings)
Headings should be surrounded by blank lines
66-66: Expected: 1; Actual: 0; Below (MD022, blanks-around-headings)
Headings should be surrounded by blank lines
72-72: Expected: 1; Actual: 0; Below (MD022, blanks-around-headings)
Headings should be surrounded by blank lines
80-80: Expected: 1; Actual: 0; Below (MD022, blanks-around-headings)
Headings should be surrounded by blank lines
83-83: Expected: 1; Actual: 0; Below (MD022, blanks-around-headings)
Headings should be surrounded by blank lines
86-86: Expected: 1; Actual: 0; Below (MD022, blanks-around-headings)
Headings should be surrounded by blank lines
92-92: Expected: 1; Actual: 0; Below (MD022, blanks-around-headings)
Headings should be surrounded by blank lines
95-95: Expected: 1; Actual: 0; Below (MD022, blanks-around-headings)
Headings should be surrounded by blank lines
99-99: Expected: 1; Actual: 0; Below (MD022, blanks-around-headings)
Headings should be surrounded by blank lines
109-109: Expected: 1; Actual: 0; Below (MD022, blanks-around-headings)
Headings should be surrounded by blank lines
112-112: Expected: 1; Actual: 0; Below (MD022, blanks-around-headings)
Headings should be surrounded by blank lines
125-125: Expected: 1; Actual: 0; Below (MD022, blanks-around-headings)
Headings should be surrounded by blank lines
128-128: Expected: 1; Actual: 0; Below (MD022, blanks-around-headings)
Headings should be surrounded by blank lines
131-131: Expected: 1; Actual: 0; Below (MD022, blanks-around-headings)
Headings should be surrounded by blank lines
134-134: Expected: 1; Actual: 0; Below (MD022, blanks-around-headings)
Headings should be surrounded by blank lines
137-137: Expected: 1; Actual: 0; Below (MD022, blanks-around-headings)
Headings should be surrounded by blank lines
140-140: Expected: 1; Actual: 0; Below (MD022, blanks-around-headings)
Headings should be surrounded by blank lines
143-143: Expected: 1; Actual: 0; Below (MD022, blanks-around-headings)
Headings should be surrounded by blank lines
151-151: Expected: 1; Actual: 0; Below (MD022, blanks-around-headings)
Headings should be surrounded by blank lines
154-154: Expected: 1; Actual: 0; Below (MD022, blanks-around-headings)
Headings should be surrounded by blank lines
159-159: Expected: 1; Actual: 0; Below (MD022, blanks-around-headings)
Headings should be surrounded by blank lines
163-163: Expected: 1; Actual: 0; Below (MD022, blanks-around-headings)
Headings should be surrounded by blank lines
167-167: Expected: 1; Actual: 0; Below (MD022, blanks-around-headings)
Headings should be surrounded by blank lines
172-172: Expected: 1; Actual: 0; Below (MD022, blanks-around-headings)
Headings should be surrounded by blank lines
178-178: Expected: 1; Actual: 0; Below (MD022, blanks-around-headings)
Headings should be surrounded by blank lines
186-186: Expected: 1; Actual: 0; Below (MD022, blanks-around-headings)
Headings should be surrounded by blank lines
194-194: Expected: 1; Actual: 0; Below (MD022, blanks-around-headings)
Headings should be surrounded by blank lines
200-200: Expected: 1; Actual: 0; Below (MD022, blanks-around-headings)
Headings should be surrounded by blank lines
215-215: Expected: 1; Actual: 0; Below (MD022, blanks-around-headings)
Headings should be surrounded by blank lines
222-222: Expected: 1; Actual: 0; Below (MD022, blanks-around-headings)
Headings should be surrounded by blank lines
225-225: Expected: 1; Actual: 0; Below (MD022, blanks-around-headings)
Headings should be surrounded by blank lines
51-51: null (MD032, blanks-around-lists)
Lists should be surrounded by blank lines
64-64: null (MD032, blanks-around-lists)
Lists should be surrounded by blank lines
67-67: null (MD032, blanks-around-lists)
Lists should be surrounded by blank lines
73-73: null (MD032, blanks-around-lists)
Lists should be surrounded by blank lines
81-81: null (MD032, blanks-around-lists)
Lists should be surrounded by blank lines
84-84: null (MD032, blanks-around-lists)
Lists should be surrounded by blank lines
87-87: null (MD032, blanks-around-lists)
Lists should be surrounded by blank lines
93-93: null (MD032, blanks-around-lists)
Lists should be surrounded by blank lines
96-96: null (MD032, blanks-around-lists)
Lists should be surrounded by blank lines
100-100: null (MD032, blanks-around-lists)
Lists should be surrounded by blank lines
110-110: null (MD032, blanks-around-lists)
Lists should be surrounded by blank lines
113-113: null (MD032, blanks-around-lists)
Lists should be surrounded by blank lines
126-126: null (MD032, blanks-around-lists)
Lists should be surrounded by blank lines
129-129: null (MD032, blanks-around-lists)
Lists should be surrounded by blank lines
132-132: null (MD032, blanks-around-lists)
Lists should be surrounded by blank lines
135-135: null (MD032, blanks-around-lists)
Lists should be surrounded by blank lines
138-138: null (MD032, blanks-around-lists)
Lists should be surrounded by blank lines
141-141: null (MD032, blanks-around-lists)
Lists should be surrounded by blank lines
144-144: null (MD032, blanks-around-lists)
Lists should be surrounded by blank lines
152-152: null (MD032, blanks-around-lists)
Lists should be surrounded by blank lines
155-155: null (MD032, blanks-around-lists)
Lists should be surrounded by blank lines
160-160: null (MD032, blanks-around-lists)
Lists should be surrounded by blank lines
164-164: null (MD032, blanks-around-lists)
Lists should be surrounded by blank lines
168-168: null (MD032, blanks-around-lists)
Lists should be surrounded by blank lines
173-173: null (MD032, blanks-around-lists)
Lists should be surrounded by blank lines
179-179: null (MD032, blanks-around-lists)
Lists should be surrounded by blank lines
187-187: null (MD032, blanks-around-lists)
Lists should be surrounded by blank lines
195-195: null (MD032, blanks-around-lists)
Lists should be surrounded by blank lines
201-201: null (MD032, blanks-around-lists)
Lists should be surrounded by blank lines
216-216: null (MD032, blanks-around-lists)
Lists should be surrounded by blank lines
3-3: null (MD034, no-bare-urls)
Bare URL used
12-12: null (MD034, no-bare-urls)
Bare URL used
Additional comments not posted (33)
composer.json (7)
14-14
: Update PHP version requirement to 7.4.
15-16
: Added new dependencies forappsero/updater
and updatedappsero/client
.
20-22
: Updated development dependencies and added Mozart.
26-28
: Extended autoload configuration to include a new namespace for dependencies.
31-50
: Introduced Mozart configuration in theextra
section.
59-66
: Updated scripts for post-installation and post-update commands to include Mozart operations.
71-71
: Updated PHP platform version to 7.4 in config.dependencies/Appsero/Client.php (10)
17-17
: Added multiple new properties to theClient
class.Also applies to: 24-24, 31-31, 40-40, 49-49, 58-58, 65-65, 72-72, 79-79, 86-86, 93-93
102-108
: Modified constructor to accept fewer parameters and added automatic setting of basename and slug.
115-127
: Addedinsights()
method to manage insights with caching mechanism.
155-167
: Addedlicense()
method to manage licensing with caching mechanism.
175-178
: Refactoredendpoint()
method to use filters for endpoint customization.Tools
PHPStan
176-176: Function apply_filters not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
178-178: Function trailingslashit not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
186-210
: Refactoredset_basename_and_slug()
to handle both plugins and themes, and set additional properties.Tools
PHPStan
187-187: Constant WP_CONTENT_DIR not found. (constant.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
188-188: Function plugin_basename not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
192-192: Constant ABSPATH not found. (constant.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
194-194: Function get_plugin_data not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
199-199: Constant WP_CONTENT_DIR not found. (constant.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
203-203: Function wp_get_theme not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
220-243
: Enhancedsend_request()
to include more detailed configuration for HTTP requests.Tools
PHPStan
224-224: Function esc_url not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
224-224: Function home_url not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
228-228: Function wp_remote_post not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
250-253
: Addedis_local_server()
to determine if the server is local.Tools
PHPStan
253-253: Function apply_filters not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
260-277
: Added translation helper methods_etrans()
and__trans()
.
135-147
: Refactoredupdater()
method to use the newUpdater
class and added deprecation notice.Tools
PHPStan
137-137: Function wp_doing_ajax not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
142-142: Function _deprecated_function not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
146-146: Call to static method init() on an unknown class WeDevs\WePOS\Dependencies\Appsero\Updater. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbolsdependencies/Appsero/Updater.php (10)
40-50
: Refactored constructor to initialize hooks based on the project type.
52-58
: Implemented singleton pattern forUpdater
class.
66-69
: Added hooks for plugin and theme updates.Also applies to: 76-78
Tools
PHPStan
67-67: Function add_filter not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
68-68: Function add_filter not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
83-115
: Enhancedcheck_plugin_update()
to handle update checks more robustly, including multisite considerations.Tools
PHPStan
90-90: Function is_multisite not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
123-152
: Implemented caching for version info inget_cached_version_info()
.Tools
PHPStan
131-131: Function get_transient not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
157-163
: Addedset_cached_version_info()
to manage caching of version information.Tools
PHPStan
162-162: Constant HOUR_IN_SECONDS not found. (constant.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
162-162: Function set_transient not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
168-205
: Refactoredget_project_latest_version()
to fetch and process update information.Tools
PHPStan
183-183: Function is_wp_error not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
187-187: Function wp_remote_retrieve_body not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
217-226
: Enhancedplugins_api_filter()
to provide custom data for the plugin information screen.
232-262
: Addedcheck_theme_update()
to handle theme update checks.Tools
PHPStan
239-239: Function is_multisite not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
268-276
: Refactoredget_version_info()
to utilize caching and direct API calls.README.md (1)
9-9
: Updated PHP version requirement to 7.4.This change aligns with the project's goal to support newer PHP versions and is consistent with updates in other project files like
composer.json
.readme.txt (1)
9-9
: Updated PHP version requirement to 7.4.This change aligns with the project's goal to support newer PHP versions and is consistent with updates in other project files like
composer.json
.wepos.php (1)
389-391
: Ensure the class existence check is functioning as expected.Verification successful
Let's verify the context and usage of the
WeDevs\WePOS\Dependencies\Appsero\Client
class in thedependencies/Appsero/Updater.php
anddependencies/Appsero/Insights.php
files to ensure they are correctly handling the class existence check.
Let's extract the relevant lines from the
dependencies/Appsero/Insights.php
file to ensure it handles theClient
class correctly.
The class existence check for
WeDevs\WePOS\Dependencies\Appsero\Client
is functioning correctly. BothUpdater.php
andInsights.php
files handle theClient
class appropriately by checking its type before usage.
dependencies/Appsero/Updater.php
: TheClient
class is checked to ensure it is an object of the correct type before assignment.dependencies/Appsero/Insights.php
: TheClient
class is similarly checked in the constructor to ensure it is an object of the correct type before assignment.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify that the class existence check for `WeDevs\WePOS\Dependencies\Appsero\Client` is functioning correctly. # Test: Search for the class usage. Expect: Only occurances of the new signature. rg --type php $'WeDevs\\\\WePOS\\\\Dependencies\\\\Appsero\\\\Client'Length of output: 492
Script:
#!/bin/bash # Description: Verify the context and usage of the `WeDevs\WePOS\Dependencies\Appsero\Client` class in the `dependencies/Appsero/Updater.php` and `dependencies/Appsero/Insights.php` files. # Extract relevant lines from `dependencies/Appsero/Updater.php` rg --type php --context 5 $'WeDevs\\\\WePOS\\\\Dependencies\\\\Appsero\\\\Client' dependencies/Appsero/Updater.php # Extract relevant lines from `dependencies/Appsero/Insights.php` rg --type php --context 5 $'WeDevs\\\\WePOS\\\\Dependencies\\\\Appsero\\\\Client' dependencies/Appsero/Insights.phpLength of output: 676
Script:
#!/bin/bash # Description: Verify the context and usage of the `WeDevs\WePOS\Dependencies\Appsero\Client` class in the `dependencies/Appsero/Insights.php` file. # Extract relevant lines from `dependencies/Appsero/Insights.php` rg --type php --context 10 $'WeDevs\\\\WePOS\\\\Dependencies\\\\Appsero\\\\Client' dependencies/Appsero/Insights.phpLength of output: 641
dependencies/Appsero/License.php (1)
74-74
: Missing WordPress function definitions.Many WordPress functions such as
add_action
,get_option
,wp_verify_nonce
, etc., are used throughout the file. Ensure that WordPress core is properly loaded or initialized in the environment where this code is executed to avoid function not found errors.Also applies to: 77-77, 108-108, 152-152, 152-152, 158-158, 165-165, 190-190, 217-217, 219-219, 248-248, 248-248, 248-248, 250-250, 250-250, 251-251, 251-251, 252-252, 252-252, 267-267, 279-279, 286-286, 304-304, 317-317, 317-317, 317-317, 323-323, 329-329, 329-329, 330-330, 330-330, 369-369, 612-612, 653-653, 756-756, 757-757, 759-759, 767-767, 776-776, 777-777, 781-781, 782-782
Tools
PHPStan
74-74: Function add_action not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbolsdependencies/Appsero/Insights.php (2)
213-213
: Ensure option handling functions are available.
- Multiple uses of
get_option
,update_option
, anddelete_option
are found throughout the file. These are standard WordPress functions used to handle options in the database.- Verify that these functions are available in the execution environment to ensure the functionality of the
Insights
class.Also applies to: 247-247, 294-294, 297-297, 302-302, 353-353, 365-365, 375-375, 525-526, 545-546, 733-733, 743-744, 747-747, 762-763, 766-766, 1093-1093, 1103-1103
Tools
PHPStan
213-213: Function update_option not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
140-141
: Ensure WordPress functions are defined.
- The use of WordPress-specific functions like
add_action
,add_filter
,register_activation_hook
, etc., suggests that this file is a part of a WordPress plugin or theme. However, PHPStan has flagged these functions as not found. This could be due to the lack of a WordPress context in the static analysis or these functions not being included in a custom autoload definition.- It's crucial to ensure that these functions are correctly defined or included in your project to prevent runtime errors.
Also applies to: 157-158, 162-163, 175-175, 178-178, 181-181, 184-185
Tools
PHPStan
140-140: Function add_action not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
141-141: Function add_action not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
* | ||
* @param Client $client | ||
*/ | ||
public function __construct( Client $client ) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ensure the correct namespace or class import for Client
.
The constructor parameter $client
is expected to be of type WeDevs\WePOS\Dependencies\Appsero\Client
, but there seems to be an issue with the namespace or class not being found. Please verify that the class exists and is correctly namespaced or imported.
Tools
PHPStan
66-66: Parameter $client of method WeDevs\WePOS\Dependencies\Appsero\License::__construct() has invalid type WeDevs\WePOS\Dependencies\Appsero\Client. (class.notFound)
public function __construct( Client $client ) { | ||
$this->client = $client; | ||
|
||
$this->option_key = 'appsero_' . md5( $this->client->slug ) . '_manage_license'; | ||
|
||
$this->schedule_hook = $this->client->slug . '_license_check_event'; | ||
|
||
// Creating WP Ajax Endpoint to refresh license remotely | ||
add_action( 'wp_ajax_appsero_refresh_license_' . $this->client->hash, [ $this, 'refresh_license_api' ] ); | ||
|
||
// Run hook to check license status daily | ||
add_action( $this->schedule_hook, [ $this, 'check_license_status' ] ); | ||
|
||
// Active/Deactive corn schedule | ||
$this->run_schedule(); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Review the constructor for potential improvements.
The constructor of the License
class is doing multiple things: setting properties, adding actions, and running schedules. Consider refactoring to improve separation of concerns, perhaps by moving action hooks and schedule setups to a dedicated initialization method.
Tools
PHPStan
66-66: Parameter $client of method WeDevs\WePOS\Dependencies\Appsero\License::__construct() has invalid type WeDevs\WePOS\Dependencies\Appsero\Client. (class.notFound)
74-74: Function add_action not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
77-77: Function add_action not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
public function __construct($client, $name = null, $file = null) | ||
{ | ||
if (is_string($client) && !empty($name) && !empty($file)) { | ||
$client = new Client($client, $name, $file); | ||
} | ||
|
||
if (is_object($client) && is_a($client, 'WeDevs\WePOS\Dependencies\Appsero\Client')) { | ||
$this->client = $client; | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Constructor logic needs attention.
- The constructor of
Insights
class is designed to accept a$client
parameter which can be either a string or an object. However, the instantiation of theClient
class on line 57 might fail because the class might not be found as indicated by the static analysis tool PHPStan. This could lead to a fatal error if not handled properly. - Additionally, the checks using
empty()
on line 56 are always false because the variables$name
and$file
are always defined in the function signature, even if they are null.
- if (is_string($client) && !empty($name) && !empty($file)) {
+ if (is_string($client) && $name !== null && $file !== null) {
Committable suggestion was skipped due to low confidence.
Tools
PHPStan
56-56: Variable $file in empty() always exists and is always falsy. (empty.variable)
56-56: Variable $name in empty() always exists and is always falsy. (empty.variable)
57-57: Instantiated class WeDevs\WePOS\Dependencies\Appsero\Client not found. (class.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
$host = isset($_SERVER['HTTP_HOST']) ? sanitize_text_field(wp_unslash($_SERVER['HTTP_HOST'])) : 'localhost'; | ||
$ip = isset($_SERVER['SERVER_ADDR']) ? sanitize_text_field(wp_unslash($_SERVER['SERVER_ADDR'])) : '127.0.0.1'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sanitization and security checks need correction.
- The use of
sanitize_text_field
andwp_unslash
on server variables might not be necessary if the data is not being output directly to the browser or used in a database query. It's important to sanitize data appropriately based on the context in which it is used. - The nonce verification in functions handling form submissions (lines 495 and 855) is crucial for security. Ensure that the nonce is created and verified correctly to prevent CSRF attacks.
- if (!wp_verify_nonce(sanitize_key($_GET['_wpnonce']), '_wpnonce')) {
+ if (!wp_verify_nonce($_GET['_wpnonce'], 'expected_nonce_action')) {
Also applies to: 391-392, 495-495, 855-855, 864-865
Committable suggestion was skipped due to low confidence.
Tools
PHPStan
391-391: Function sanitize_text_field not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
391-391: Function wp_unslash not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
392-392: Function sanitize_text_field not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
392-392: Function wp_unslash not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
protected function send_request( $license_key, $route ) { | ||
$params = [ | ||
'license_key' => $license_key, | ||
'url' => esc_url( home_url() ), | ||
'is_local' => $this->client->is_local_server(), | ||
]; | ||
|
||
$response = $this->client->send_request( $params, $route, true ); | ||
|
||
if ( is_wp_error( $response ) ) { | ||
return [ | ||
'success' => false, | ||
'error' => $response->get_error_message(), | ||
]; | ||
} | ||
|
||
$response = json_decode( wp_remote_retrieve_body( $response ), true ); | ||
|
||
if ( empty( $response ) || isset( $response['exception'] ) ) { | ||
return [ | ||
'success' => false, | ||
'error' => $this->client->__trans( 'Unknown error occurred, Please try again.' ), | ||
]; | ||
} | ||
|
||
if ( isset( $response['errors'] ) && isset( $response['errors']['license_key'] ) ) { | ||
$response = [ | ||
'success' => false, | ||
'error' => $response['errors']['license_key'][0], | ||
]; | ||
} | ||
|
||
return $response; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Optimize the send_request
method.
The send_request
method could be optimized by abstracting the error handling into a separate method. This would make the send_request
method cleaner and more focused on its primary responsibility.
- if ( is_wp_error( $response ) ) {
- return [
- 'success' => false,
- 'error' => $response->get_error_message(),
- ];
- }
- $response = json_decode( wp_remote_retrieve_body( $response ), true );
- if ( empty( $response ) || isset( $response['exception'] ) ) {
- return [
- 'success' => false,
- 'error' => $this->client->__trans( 'Unknown error occurred, Please try again.' ),
- ];
- }
- if ( isset( $response['errors'] ) && isset( $response['errors']['license_key'] ) ) {
- $response = [
- 'success' => false,
- 'error' => $response['errors']['license_key'][0],
- ];
- }
+ return $this->handle_response($response);
Committable suggestion was skipped due to low confidence.
Tools
PHPStan
152-152: Function esc_url not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
152-152: Function home_url not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
158-158: Function is_wp_error not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
165-165: Function wp_remote_retrieve_body not found. (function.notFound)
Learn more at https://phpstan.org/user-guide/discovering-symbols
composer.json
Outdated
"php": ">=7.2", | ||
"appsero/client": "dev-develop", | ||
"php": ">=7.4", | ||
"appsero/updater": "^v1.0.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We do not need "appsero/updater":
here. Please remove it from the dependency.
composer.json
Outdated
"classmap_directory": "/dependencies/classes/", | ||
"classmap_prefix": "WeDevs_WePOS_", | ||
"packages": [ | ||
"appsero/updater", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please change it also from here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files ignored due to path filters (1)
composer.lock
is excluded by!**/*.lock
Files selected for processing (1)
- composer.json (2 hunks)
Additional comments not posted (8)
composer.json (8)
14-14
: Update PHP version requirement to 7.4.This change aligns with the PR's objective to update the PHP version requirement from 7.2 to 7.4.
15-15
: Updateappsero/client
to version^v2.0.2
.This update is necessary to keep the dependencies up-to-date and potentially leverage new features or fixes from the newer version.
19-19
: Keepwp-coding-standards/wpcs
atdev-develop
.This ensures that the latest development standards are used, which is crucial for maintaining code quality.
20-21
: Add new dependencies for code standards and Mozart.These additions are part of enhancing the project's dependency management and integrating Mozart, as outlined in the PR objectives.
25-26
: Update PSR-4 autoload paths.This change supports the new directory structure introduced by the integration of new dependencies.
30-48
: Configure Mozart in theextra
section.This configuration is essential for the proper functioning of Mozart, ensuring that dependencies are handled correctly without class conflicts.
57-64
: Update scripts for post-install and post-update commands.The inclusion of Mozart commands in these scripts is crucial for maintaining the project's operability post-dependency updates.
69-69
: Ensure the PHP platform version is set to 7.4 in the config.This setting is necessary to enforce the PHP version requirement across different environments, ensuring consistency.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
Outside diff range and nitpick comments (1)
bin/zip.sh (1)
Line range hint
59-59
: Ensure paths are correctly quoted to prevent globbing and word splitting.- rm -rf $BUILD_DIR/assets/src - rm -rf $BUILD_DIR/assets/less + rm -rf "$BUILD_DIR/assets/src" + rm -rf "$BUILD_DIR/assets/less"Shellcheck warning SC2086: Double quote to prevent globbing and word splitting.
Tools
Shellcheck
[error] 49-49: Double quote array expansions to avoid re-splitting elements. (SC2068)
[info] 50-50: Double quote to prevent globbing and word splitting. (SC2086)
[info] 50-50: Double quote to prevent globbing and word splitting. (SC2086)
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (1)
- bin/zip.sh (1 hunks)
Additional context used
Shellcheck
bin/zip.sh
[error] 49-49: Double quote array expansions to avoid re-splitting elements. (SC2068)
[info] 50-50: Double quote to prevent globbing and word splitting. (SC2086)
[info] 50-50: Double quote to prevent globbing and word splitting. (SC2086)
[info] 59-59: Double quote to prevent globbing and word splitting. (SC2086)
Additional comments not posted (1)
bin/zip.sh (1)
47-47
: Ensure the inclusion of thedependencies
directory aligns with the project's new structure.This change is consistent with the PR's objective to integrate Mozart and manage dependencies more effectively.
@@ -44,7 +44,7 @@ npm run build | |||
|
|||
# Copy all files | |||
status "Copying files... ✌️" | |||
FILES=(wepos.php readme.txt assets includes languages templates composer.json composer.lock) | |||
FILES=(wepos.php readme.txt assets dependencies includes languages templates composer.json composer.lock) | |||
|
|||
for file in ${FILES[@]}; do | |||
cp -R $file $BUILD_DIR |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Double quote this variable to prevent globbing and word splitting.
- cp -R $file $BUILD_DIR
+ cp -R "$file" "$BUILD_DIR"
Shellcheck warnings SC2086: Double quote to prevent globbing and word splitting.
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.
cp -R $file $BUILD_DIR | |
cp -R "$file" "$BUILD_DIR" |
Tools
Shellcheck
[info] 50-50: Double quote to prevent globbing and word splitting. (SC2086)
[info] 50-50: Double quote to prevent globbing and word splitting. (SC2086)
@@ -44,7 +44,7 @@ npm run build | |||
|
|||
# Copy all files | |||
status "Copying files... ✌️" | |||
FILES=(wepos.php readme.txt assets includes languages templates composer.json composer.lock) | |||
FILES=(wepos.php readme.txt assets dependencies includes languages templates composer.json composer.lock) | |||
|
|||
for file in ${FILES[@]}; do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Double quote array expansions to prevent issues.
- for file in ${FILES[@]}; do
+ for file in "${FILES[@]}"; do
Shellcheck warning SC2068: Double quote array expansions to avoid re-splitting elements.
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.
for file in ${FILES[@]}; do | |
for file in "${FILES[@]}"; do |
Tools
Shellcheck
[error] 49-49: Double quote array expansions to avoid re-splitting elements. (SC2068)
Integrated Mozart.
Summary by CodeRabbit
New Features
Enhancements
Bug Fixes
Chores