Closed szepeviktor closed 4 years ago
Current @phpstan output. Are you interested??
viktor@mail:~/tmp/italystrap$ vendor/bin/phpstan analyse -l 0
Note: Using configuration file /home/viktor/tmp/italystrap/phpstan.neon.dist.
94/94 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓] 100%
------ ------------------------------------------------------------------------------
Line Asset/Asset.php
------ ------------------------------------------------------------------------------
78 Undefined variable: $config
90 Call to an undefined method ItalyStrap\Asset\Asset::get_default_structure().
93 Call to an undefined method ItalyStrap\Asset\Asset::deregister().
97 Call to an undefined method ItalyStrap\Asset\Asset::pre_register().
102 Call to an undefined method ItalyStrap\Asset\Asset::enqueue().
110 Call to an undefined method ItalyStrap\Asset\Asset::localize_script().
------ ------------------------------------------------------------------------------
------ --------------------------------------------------------------------------
Line Asset/Asset_Factory.php
------ --------------------------------------------------------------------------
103 Access to an undefined property ItalyStrap\Asset\Asset_Factory::$style.
154 Access to an undefined property ItalyStrap\Asset\Asset_Factory::$script.
------ --------------------------------------------------------------------------
------ ----------------------------------------------------------------------------------------------------------------------------------------
Line Controllers/Controller.php
------ ----------------------------------------------------------------------------------------------------------------------------------------
163 Parameter $post of method ItalyStrap\Controllers\Controller::get_post_type() has invalid typehint type ItalyStrap\Controllers\WP_Post.
------ ----------------------------------------------------------------------------------------------------------------------------------------
------ --------------------------------------------------------------------------------------------------------------------------------------------------------------
Line Controllers/Headers/Image.php
------ --------------------------------------------------------------------------------------------------------------------------------------------------------------
121 Parameter $image_obj of method ItalyStrap\Controllers\Headers\Image::get_custom_header_image() has invalid typehint type ItalyStrap\Controllers\Headers\obj.
------ --------------------------------------------------------------------------------------------------------------------------------------------------------------
------ --------------------------------------------------------------------------------------
Line Controllers/Misc/Author_Info.php
------ --------------------------------------------------------------------------------------
100 Access to an undefined property ItalyStrap\Controllers\Misc\Author_Info::$user_list.
------ --------------------------------------------------------------------------------------
------ ---------------------------------------------------------------------------------------------------------------------------------
Line Controllers/Sidebars/Sidebar.php
------ ---------------------------------------------------------------------------------------------------------------------------------
45 ItalyStrap\Controllers\Sidebars\Sidebar::__construct() does not call parent constructor from ItalyStrap\Controllers\Controller.
46 Access to an undefined property ItalyStrap\Controllers\Sidebars\Sidebar::$layout.
57 Access to an undefined property ItalyStrap\Controllers\Sidebars\Sidebar::$layout.
73 Access to an undefined property ItalyStrap\Controllers\Sidebars\Sidebar::$layout.
------ ---------------------------------------------------------------------------------------------------------------------------------
------ -------------------------------------------------------------------
Line Css/Css.php
------ -------------------------------------------------------------------
91 Function get_theme_support invoked with 2 parameters, 1 required.
105 Function get_theme_support invoked with 2 parameters, 1 required.
113 Function get_theme_support invoked with 2 parameters, 1 required.
121 Function get_theme_support invoked with 2 parameters, 1 required.
------ -------------------------------------------------------------------
------ ----------------------------------------------------------------------------
Line Custom/Image/Size.php
------ ----------------------------------------------------------------------------
66 Access to an undefined property ItalyStrap\Custom\Image\Size::$theme_mods.
96 Access to an undefined property ItalyStrap\Custom\Image\Size::$theme_mods.
160 Access to an undefined property ItalyStrap\Custom\Image\Size::$theme_mods.
165 Access to an undefined property ItalyStrap\Custom\Image\Size::$theme_mods.
------ ----------------------------------------------------------------------------
------ ------------------------------------------------------------------------------
Line Custom/Metabox/Register.php
------ ------------------------------------------------------------------------------
65 Access to an undefined property ItalyStrap\Custom\Metabox\Register::$config.
94 Function new_cmb2_box not found.
------ ------------------------------------------------------------------------------
------ ---------------------------------------------------------------------------------------------------------------------------------
Line Customizer/Customizer_Beta.php
------ ---------------------------------------------------------------------------------------------------------------------------------
94 Parameter $size of method ItalyStrap\Customizer\Customizer_Beta::__construct() has invalid typehint type ItalyStrap\Image\Size.
130 Access to an undefined property ItalyStrap\Customizer\Customizer_Beta::$config.
168 Access to an undefined property ItalyStrap\Customizer\Customizer_Beta::$config.
228 Undefined variable: $id
229 Undefined variable: $args
238 Undefined variable: $id
239 Undefined variable: $args
251 Undefined variable: $id
252 Undefined variable: $args
------ ---------------------------------------------------------------------------------------------------------------------------------
------ -------------------------------------------------------------------------------------
Line Editors/TinyMCE.php
------ -------------------------------------------------------------------------------------
69 Access to an undefined property ItalyStrap\Editors\TinyMCE::$assets_mce_plugin_url.
80 Access to an undefined property ItalyStrap\Editors\TinyMCE::$assets_mce_plugin_url.
96 Access to an undefined property ItalyStrap\Editors\TinyMCE::$assets_mce_plugin_url.
------ -------------------------------------------------------------------------------------
------ --------------------------------------------------------------------------------------------------------------------------
Line Layout/Layout.php
------ --------------------------------------------------------------------------------------------------------------------------
79 Constructor of class ItalyStrap\Layout\Layout has an unused parameter $config.
114 Parameter $post of method ItalyStrap\Layout\Layout::get_post_type() has invalid typehint type ItalyStrap\Layout\WP_Post.
157 Access to an undefined property ItalyStrap\Layout\Layout::$schema.
219 Access to an undefined property ItalyStrap\Layout\Layout::$schema.
------ --------------------------------------------------------------------------------------------------------------------------
------ -----------------------------------------------------------------------------------------------------------------------------------------------------------
Line Nav_Menu/Register_Nav_Menu_Edit.php
------ -----------------------------------------------------------------------------------------------------------------------------------------------------------
66 Constructor of class ItalyStrap\Nav_Menu\Register_Nav_Menu_Edit has an unused parameter $args.
66 Constructor of class ItalyStrap\Nav_Menu\Register_Nav_Menu_Edit has an unused parameter $options.
67 Access to an undefined property ItalyStrap\Nav_Menu\Register_Nav_Menu_Edit::$args.
76 Parameter $item of method ItalyStrap\Nav_Menu\Register_Nav_Menu_Edit::add_new_field() has invalid typehint type ItalyStrap\Nav_Menu\WP_Post.
96 Parameter $menu_item of method ItalyStrap\Nav_Menu\Register_Nav_Menu_Edit::add_custom_nav_fields() has invalid typehint type ItalyStrap\Nav_Menu\WP_Post.
96 Return typehint of method ItalyStrap\Nav_Menu\Register_Nav_Menu_Edit::add_custom_nav_fields() has invalid type ItalyStrap\Nav_Menu\WP_Post.
98 Access to an undefined property ItalyStrap\Nav_Menu\Register_Nav_Menu_Edit::$args.
------ -----------------------------------------------------------------------------------------------------------------------------------------------------------
------ ------------------------------------------------------------------------
Line Navbar/Navbar.php
------ ------------------------------------------------------------------------
87 Access to an undefined property ItalyStrap\Navbar\Navbar::$theme_mods.
176 Access to an undefined property ItalyStrap\Navbar\Navbar::$theme_mods.
187 Access to an undefined property ItalyStrap\Navbar\Navbar::$theme_mods.
191 Access to an undefined property ItalyStrap\Navbar\Navbar::$theme_mods.
202 Access to an undefined property ItalyStrap\Navbar\Navbar::$theme_mods.
224 Access to an undefined property ItalyStrap\Navbar\Navbar::$theme_mods.
344 Access to an undefined property ItalyStrap\Navbar\Navbar::$theme_mods.
378 Access to an undefined property ItalyStrap\Navbar\Navbar::$theme_mods.
379 Access to an undefined property ItalyStrap\Navbar\Navbar::$theme_mods.
415 Access to an undefined property ItalyStrap\Navbar\Navbar::$theme_mods.
------ ------------------------------------------------------------------------
------ -------------------------------------------------------------------------------------
Line Required_Plugins/Register.php
------ -------------------------------------------------------------------------------------
145 Array has 2 duplicate keys with value 'parent_slug' ('parent_slug', 'parent_slug').
194 Function tgmpa not found.
------ -------------------------------------------------------------------------------------
------ --------------------------------------------------------------------------------------
Line Router/Controller.php
------ --------------------------------------------------------------------------------------
101 Constructor of class ItalyStrap\Router\Controller has an unused parameter $argument.
------ --------------------------------------------------------------------------------------
------ -----------------------------
Line Theme_Test_Load.php
------ -----------------------------
103 Undefined variable: $config
103 Undefined variable: $config
------ -----------------------------
------ ------------------------------------------------------------------------------------
Line User/Contact_Method_List.php
------ ------------------------------------------------------------------------------------
31 Access to an undefined property ItalyStrap\User\Contact_Method_List::$author_info.
31 Undefined variable: $author_name
47 Access to an undefined property ItalyStrap\User\Contact_Method_List::$author_info.
------ ------------------------------------------------------------------------------------
------ -------------------------------------
Line WooCommerce/WC_Nav_Menu.php
------ -------------------------------------
48 Function WC not found.
48 Function WC not found.
80 Function WC not found.
80 Function WC not found.
91 Function get_the_account not found.
93 Function get_the_wc_cart not found.
104 Function get_the_account not found.
106 Function get_the_wc_cart not found.
------ -------------------------------------
[ERROR] Found 74 errors
Thank you @szepeviktor This file is no longer in the repository because in the Dev branch I changed a lot of code. The Dev branch is always the branch to make all pull requests.
Thnak you for the test you made, I will try it soon to check my code.
Okay. Please see https://packagist.org/packages/szepeviktor/phpstan-wordpress