Skip to content

Commit

Permalink
Document ugly dependencies to old spaghetti code (#12)
Browse files Browse the repository at this point in the history
  • Loading branch information
carstingaxion committed Feb 24, 2024
1 parent 5e8d46f commit e5ce663
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 1 deletion.
9 changes: 9 additions & 0 deletions inc/class-manager.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,15 @@
*/
class Manager extends SiteParts\SitePartsManagerAbstract {

/**
* Setup the manager.
*
* @param SiteParts\SitePartsCollectionInterface $collection The collection of all elements of options.
*/
public function __construct( SiteParts\SitePartsCollectionInterface $collection ) { // phpcs:ignore Generic.CodeAnalysis.UselessOverridingMethod.Found
parent::__construct( $collection );
}

/**
* Returns an array of hooks that this subscriber wants to register with
* the WordPress plugin API.
Expand Down
18 changes: 17 additions & 1 deletion phpstan.neon
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,27 @@ parameters:
- plugin.php
excludePaths:
analyse:
# TODO #12 Remove ugly dependencies to old spaghetti code
# Error message "Class Figuren_Theater\Options\Collection extends unknown class ...
# ... Figuren_Theater\SiteParts\SitePartsCollectionAbstract." cannot be ignored, use
# excludePaths instead.
- inc/class-collection.php
# Error message "Class Figuren_Theater\Options\Proxied_Collection extends unknown class ...
# ... Figuren_Theater\SiteParts\ProxiedSitePartsCollectionAbstract." cannot be ignored, use
# excludePaths instead.
- inc/class-proxied-collection.php
# Error message "Class Figuren_Theater\Options\Manager extends unknown class ...
# ... Figuren_Theater\SiteParts\SitePartsManagerAbstract." cannot be ignored, use
# excludePaths instead.
- inc/class-manager.php
- vendor/
# "/wp-content/" is created during composer install,
# when package is tested
# and not running within ft-platform
- wp-content/
- tests/
ignoreErrors:

# TODO #12 Remove ugly dependencies to old spaghetti code
- '#Call to static method add\(\) on an unknown class Figuren_Theater\\API\.#'
- '#Call to static method get\(\) on an unknown class Figuren_Theater\\API\.#'
- '#Call to method set_Options_Manager\(\) on an unknown class Figuren_Theater\\ProxiedSite\.#'

0 comments on commit e5ce663

Please sign in to comment.