Navigation Menu

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

Cleaning up classes, relocate code with side effects #14292

Closed
szepeviktor opened this issue Mar 30, 2019 · 3 comments
Closed

Cleaning up classes, relocate code with side effects #14292

szepeviktor opened this issue Mar 30, 2019 · 3 comments
Labels
answered For when a question was asked and we referred to forum or answered it.

Comments

@szepeviktor
Copy link
Contributor

As Matomo autoloads its classes by Composer we could clean up all class files:

  • core/Metrics.php
  • core/dispatch.php
  • core/bootstrap.php
  • core/DataTable.php
  • core/Plugin.php
  • core/testMinimumPhpVersion.php
  • core/ReportRenderer/Pdf.php
  • core/Twig.php
  • core/Piwik.php
  • core/Plugin/MetadataLoader.php
  • core/Plugin/Manager.php
  • core/View.php

These contain lines outside the class.

@szepeviktor
Copy link
Contributor Author

And plugins:

  • plugins/TwoFactorAuth/TwoFactorAuthentication.php
  • plugins/TwoFactorAuth/Dao/TwoFaSecretRandomGenerator.php
  • plugins/Goals/Visualizations/Goals.php
  • plugins/SEO/API.php
  • plugins/Live/API.php
  • plugins/Referrers/Referrers.php
  • plugins/CoreVisualizations/Visualizations/JqplotGraph.php
  • plugins/CoreVisualizations/JqplotDataGenerator.php
  • plugins/CoreVisualizations/CoreVisualizations.php
  • plugins/UserCountryMap/Controller.php
  • plugins/UserCountry/VisitorDetails.php
  • plugins/UserCountry/Columns/Country.php
  • plugins/UserCountry/UserCountry.php
  • plugins/UserCountry/LocationProvider.php
  • plugins/UserCountry/GeoIPAutoUpdater.php
  • plugins/UserCountry/VisitorGeolocator.php
  • plugins/UserCountry/API.php
  • plugins/UserLanguage/VisitorDetails.php
  • plugins/UserLanguage/Columns/Language.php
  • plugins/UserLanguage/API.php
  • plugins/UserLanguage/Archiver.php
  • plugins/VisitTime/Columns/LocalMinute.php
  • plugins/VisitTime/Columns/LocalTime.php
  • plugins/VisitTime/API.php
  • plugins/DevicesDetection/VisitorDetails.php
  • plugins/DevicesDetection/DevicesDetection.php
  • plugins/ImageGraph/StaticGraph.php
  • plugins/Provider/VisitorDetails.php
  • plugins/Provider/API.php
  • plugins/DevicePlugins/VisitorDetails.php
  • plugins/DevicePlugins/API.php
  • plugins/DevicePlugins/Archiver.php
  • plugins/CoreHome/Columns/VisitLastActionMinute.php
  • plugins/CoreHome/Columns/VisitLastActionMonth.php
  • plugins/CoreHome/Columns/ServerTime.php
  • plugins/CoreHome/Columns/VisitLastActionDayOfWeek.php
  • plugins/CoreHome/Columns/VisitFirstActionMinute.php
  • plugins/CoreHome/Columns/VisitLastActionTime.php
  • plugins/CoreHome/Columns/VisitFirstActionTime.php
  • plugins/API/API.php
  • plugins/MobileMessaging/Controller.php
  • plugins/MobileMessaging/SMSProvider/Clockwork.php
  • plugins/MobileMessaging/SMSProvider/ASPSMS.php
  • plugins/PrivacyManager/PrivacyManager.php
  • plugins/Annotations/API.php
  • plugins/Resolution/API.php
  • plugins/TestRunner/Aws/config.ini.php
  • plugins/GeoIp2/GeoIP2AutoUpdater.php
  • plugins/GeoIp2/data/regionMapping.php
  • plugins/GeoIp2/data/isoRegionNames.php
  • plugins/CustomVariables/Archiver.php

I've written a small tool using nikic/php-parser to sort out non-clean class files.

@tsteur
Copy link
Member

tsteur commented Mar 30, 2019

Thanks for this but we have no interesting in changing them. It's fine to have code outside classes etc. and it works for us and there is no bug nor security issue (unless you find a clear bug/security issue somewhere). Cheers for looking into it.

@tsteur tsteur closed this as completed Mar 30, 2019
@tsteur tsteur added the answered For when a question was asked and we referred to forum or answered it. label Mar 30, 2019
@szepeviktor
Copy link
Contributor Author

Okay. I see.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
answered For when a question was asked and we referred to forum or answered it.
Projects
None yet
Development

No branches or pull requests

2 participants