Skip to content
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

Fix PHPStan Validation Errors for Incorrect Parameter Types #714

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 14 additions & 15 deletions includes/class-freemius.php
Original file line number Diff line number Diff line change
Expand Up @@ -8958,7 +8958,7 @@ private function update_plugin_version_event() {
* @author Vova Feldman (@svovaf)
* @since 2.0.0
*
* @param array [string]array $plugins
* @param array [string] $plugins
*
* @return string
*/
Expand Down Expand Up @@ -9373,7 +9373,7 @@ private function get_install_data_for_api(
* @author Vova Feldman (@svovaf)
* @since 2.0.0
*
* @param string[] string $override
* @param string[] $override
* @param bool $only_diff
* @param bool $is_keepalive
* @param bool $include_plugins Since 1.1.8 by default include plugin changes.
Expand Down Expand Up @@ -9560,7 +9560,7 @@ private function get_installs_data_for_api(
*
* @param array $site
* @param FS_Site $install
* @param string[] string $override
* @param string[] $override
*
* @return array
*/
Expand Down Expand Up @@ -9682,7 +9682,7 @@ function send_clone_resolution_update( $resolution_type, $clone_context_install
* @author Vova Feldman (@svovaf)
* @since 1.0.9
*
* @param string[] string $override
* @param string[] $override
* @param bool $flush
* @param bool $is_two_way_sync @since 2.5.0 If true and there's a successful API request, the install sync cron will be cleared.
*
Expand Down Expand Up @@ -9755,7 +9755,7 @@ private function send_install_update( $override = array(), $flush = false, $is_t
* @author Vova Feldman (@svovaf)
* @since 2.0.0
*
* @param string[] string $override
* @param string[] $override
* @param bool $flush
* @param bool $is_two_way_sync @since 2.5.0 If true and there's a successful API request, the install sync cron will be cleared.
*
Expand Down Expand Up @@ -9842,7 +9842,7 @@ private function maybe_sync_install_user() {
* @author Vova Feldman (@svovaf)
* @since 1.0.9
*
* @param string[] string $override
* @param string[] $override
* @param bool $flush
*/
function sync_install( $override = array(), $flush = false ) {
Expand Down Expand Up @@ -9871,7 +9871,7 @@ function sync_install( $override = array(), $flush = false ) {
* @author Vova Feldman (@svovaf)
* @since 1.0.9
*
* @param string[] string $override
* @param string[] $override
* @param bool $flush
*/
private function sync_installs( $override = array(), $flush = false ) {
Expand Down Expand Up @@ -10046,7 +10046,7 @@ function _uninstall_plugin_event( $check_user = true ) {
* @author Vova Feldman (@svovaf)
* @since 2.2.1
*
* @param string $is_premium
* @param bool $is_premium
* @param string $caller
*
* @return void
Expand Down Expand Up @@ -13914,9 +13914,9 @@ function is_migration() {
* @param int $blog_id
*
* @return array {
* @var bool $success
* @var string $error
* @var string $next_page
* @type bool $success
* @type string $error
* @type string $next_page
* }
*
* @uses Freemius::activate_license()
Expand Down Expand Up @@ -17313,7 +17313,6 @@ function get_opt_in_params( $override_with = array(), $network_level_or_blog_id
* @param bool $redirect
*
* @return string|object
* @use WP_Error
*/
function opt_in(
$email = false,
Expand Down Expand Up @@ -19900,7 +19899,7 @@ function has_filter( $tag, $function_to_check = false ) {
* @author Vova Feldman (@svovaf)
* @since 1.1.6
*
* @param string[] string $key_value
* @param string[] $key_value
*
* @uses fs_override_i18n()
*/
Expand Down Expand Up @@ -22840,8 +22839,8 @@ private function complete_change_owner() {
* @author Leo Fajardo (@leorw)
* @since 2.3.2
*
* @param number $user_id
* @param array[string]number $install_ids_by_slug_map
* @param number $user_id
* @param array[string] $install_ids_by_slug_map
*
*/
private function complete_ownership_change_by_license( $user_id, $install_ids_by_slug_map ) {
Expand Down
2 changes: 1 addition & 1 deletion includes/entities/class-fs-entity.php
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ static function equals( $entity1, $entity2 ) {
* @author Vova Feldman (@svovaf)
* @since 1.0.9
*
* @param string|array[string]mixed $key
* @param string|array[string] $key
* @param string|bool $val
*
* @return bool
Expand Down
2 changes: 1 addition & 1 deletion includes/fs-core-functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -1389,7 +1389,7 @@ function fs_esc_html_echo_inline( $text, $key = '', $slug = 'freemius' ) {
* @author Vova Feldman (@svovaf)
* @since 1.1.6
*
* @param array[string]string $key_value
* @param array[string] $key_value
* @param string $slug
*
* @global $fs_text_overrides
Expand Down