Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
2 changes: 0 additions & 2 deletions finder-constants.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
<?php

require_once 'vendor/autoload.php';

return \StubsGenerator\Finder::create()
->in( array(
'source/vendor/freemius/wordpress-sdk/includes',
Expand Down
28 changes: 2 additions & 26 deletions finder.php
Original file line number Diff line number Diff line change
@@ -1,41 +1,17 @@
<?php

require_once 'vendor/autoload.php';

return \StubsGenerator\Finder::create()
->in( array(
'source/vendor/freemius/wordpress-sdk/includes',
'source/vendor/freemius/wordpress-sdk/templates'
) )
->append(
\StubsGenerator\Finder::create()
->in(['source/vendor/freemius/wordpress-sdk'])
->files()
->depth('< 1')
->path('config.php')
)
->append(
\StubsGenerator\Finder::create()
->in(['source/vendor/freemius/wordpress-sdk/includes/'])
->files()
->depth('< 1')
->path('fs-essential-functions.php')
)
->append(
\StubsGenerator\Finder::create()
->in(['source/vendor/freemius/wordpress-sdk/includes/'])
->files()
->depth('< 1')
->path('require.php')
)
->notPath('customizer')
->notPath('debug')
->append(
\StubsGenerator\Finder::create()
->in(['source/vendor/freemius/wordpress-sdk'])
->files()
->depth('< 1')
->path('start.php')
)
->notPath('source/vendor/freemius/wordpress-sdk/includes/customizer')
->notPath('source/vendor/freemius/wordpress-sdk/includes/debug')
->sortByName(true)
;
25 changes: 6 additions & 19 deletions freemius-stubs.php
Original file line number Diff line number Diff line change
Expand Up @@ -5052,9 +5052,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 @@ -5097,9 +5097,9 @@ function should_use_external_pricing()
*
*
* @return array {
* @var bool $success
* @var string $error
* @var string $next_page
* @type bool $success
* @type string $error
* @type string $next_page
* }
*/
private function activate_license($license_key, $sites = array(), $is_marketing_allowed = \null, $blog_id = \null, $plugin_id = \null, $license_owner_id = \null, $is_extensions_tracking_allowed = \null, $is_diagnostic_tracking_allowed = \null)
Expand Down Expand Up @@ -15849,19 +15849,6 @@ private static function ThrowSquidAclException($pResult = '')
}
#endregion
}
/**
* Initialize Freemius custom debug panels.
*
* @param array $panels Debug bar panels objects
*
* @return array Debug bar panels with your custom panels
*/
function fs_custom_panels_init($panels)
{
}
function fs_custom_status_init($statuses)
{
}
/**
* Get object's public variables.
*
Expand Down
10 changes: 2 additions & 8 deletions phpstan.neon
Original file line number Diff line number Diff line change
@@ -1,20 +1,14 @@
parameters:
paths:
- freemius-constants-stubs.php
- freemius-stubs.php
scanFiles:
- freemius-constants-stubs.php
bootstrapFiles:
- bootstrap.php
level: 5
tipsOfTheDay: false
ignoreErrors:
- '#is always (true|false).#'
- '#but return statement is missing\.$#'
- '#has an unused parameter#'
- '#^(Property|Static property|Method|Static method) \S+ is unused\.$#'
- '#is never read, only written\.$#'
- '#has invalid (return )?type (WP_Error|WP_Customize_Manager|WP_Theme|WP_User|WP_Site|WP_Upgrader)#'
- '#Parameter \d+ of \S+ is never used\.$#'
- '#Variable \$\S+ might not be defined\.$#'
- '#Function \S+ not found\.#'
- '#tag @var above a method has no effect.#'