stable
Clone or download
request #13436: PHP class names should be referenced by ::class when possible
This contribution replaces and forces the usage of: - self::class instead of __CLASS__ - parent::class instead of get_parent_class() - self::class instead of get_class() - static::class instead of get_called_class() and get_class($this) This brings consistency all over the codebase by forcing the usage of modern class references. It's also a bit faster for the PHP engine. To test, you can review the code of the sniff [0], apply the new ruleset and allow to autofix this rule then launch `make phpcbf`. The diff should be identical with this contribution (with a few exceptions for fixing spaces issue). [0] https://github.com/slevomat/coding-standard/blob/5.0.4/SlevomatCodingStandard/Sniffs/Classes/ModernClassNameReferenceSniff.php Change-Id: Iac33d36a56b6c1699ea23f86d9e17728bdc5de50
Modified Files
Name | ||||
---|---|---|---|---|
M | plugins/agiledashboard/include/AgileDashboard/Semantic/Semantic_InitialEffortFactory.class.php | +1 | −1 | Go to diff View file |
M | plugins/cardwall/include/Semantic/CardFieldsFactory.class.php | +1 | −1 | Go to diff View file |
M | plugins/docman/bin/DocmanExport/Docman_ExportException.class.php | +1 | −1 | Go to diff View file |
M | plugins/docman/include/Docman_Controller.class.php | +1 | −1 | Go to diff View file |
M | plugins/forumml/include/ForumML_HTMLPurifier.class.php | +1 | −1 | Go to diff View file |
M | plugins/git/include/Git/Ci/Launcher.class.php | +1 | −1 | Go to diff View file |
M | plugins/git/include/Git/Hook/LogAnalyzer.class.php | +1 | −1 | Go to diff View file |
M | plugins/git/include/Git/Hook/ParseLog.class.php | +1 | −1 | Go to diff View file |
M | plugins/git/include/Git/Mirror/Mirror.class.php | +1 | −1 | Go to diff View file |
M | plugins/git/include/Git/RemoteServer/GerritServer.class.php | +1 | −1 | Go to diff View file |
M | plugins/git/include/exceptions/GitBackendException.class.php | +1 | −1 | Go to diff View file |
M | plugins/git/include/exceptions/GitDaoException.class.php | +1 | −1 | Go to diff View file |
M | plugins/git/include/exceptions/GitDriverDestinationNotEmptyException.class.php | +1 | −1 | Go to diff View file |
M | plugins/git/include/exceptions/GitDriverErrorException.class.php | +1 | −1 | Go to diff View file |
M | plugins/git/include/exceptions/GitDriverException.class.php | +1 | −1 | Go to diff View file |
M | plugins/git/include/exceptions/GitDriverSourceNotFoundException.class.php | +1 | −1 | Go to diff View file |
M | plugins/git/include/mvc/PluginController.class.php | +5 | −7 | Go to diff View file |
M | plugins/ldap/include/LDAP_UserSync.class.php | +1 | −1 | Go to diff View file |
M | plugins/tracker/include/Tracker/Artifact/ArtifactsDeletion/ArtifactDeletorBuilder.php | +1 | −1 | Go to diff View file |
M | plugins/tracker/include/Tracker/Artifact/Changeset/IncomingMailGoldenRetriever.php | +1 | −1 | Go to diff View file |
M | plugins/tracker/include/Tracker/Artifact/Changeset/PostCreation/ActionsRunner.php | +1 | −1 | Go to diff View file |
M | plugins/tracker/include/Tracker/Artifact/Changeset/PostCreation/AsynchronousSupervisor.php | +1 | −1 | Go to diff View file |
M | plugins/tracker/include/Tracker/Artifact/Tracker_ArtifactFactory.class.php | +1 | −1 | Go to diff View file |
M | plugins/tracker/include/Tracker/CannedResponse/Tracker_CannedResponseFactory.class.php | +1 | −1 | Go to diff View file |
M | plugins/tracker/include/Tracker/FormElement/Tracker_FormElement.class.php | +1 | −1 | Go to diff View file |
M | plugins/tracker/include/Tracker/FormElement/Tracker_FormElementFactory.class.php | +1 | −1 | Go to diff View file |
M | plugins/tracker/include/Tracker/FormElement/Tracker_FormElement_Field_List_Bind_Ugroups.class.php | +10 | −12 | Go to diff View file |
M | plugins/tracker/include/Tracker/FormElement/Tracker_FormElement_Field_List_Bind_UgroupsValue.class.php | +1 | −1 | Go to diff View file |
M | plugins/tracker/include/Tracker/FormElement/Tracker_FormElement_Field_List_Bind_Users.class.php | +6 | −6 | Go to diff View file |
M | plugins/tracker/include/Tracker/FormElement/Tracker_FormElement_Field_Text.class.php | +3 | −3 | Go to diff View file |
M | plugins/tracker/include/Tracker/FormElement/dao/Tracker_FormElement_Field_ComputedDaoCache.class.php | +1 | −1 | Go to diff View file |
M | plugins/tracker/include/Tracker/Report/Tracker_ReportFactory.class.php | +1 | −1 | Go to diff View file |
M | plugins/tracker/include/Tracker/Report/Tracker_Report_CriteriaFactory.class.php | +1 | −1 | Go to diff View file |
M | plugins/tracker/include/Tracker/Semantic/Tracker_SemanticFactory.class.php | +1 | −1 | Go to diff View file |
M | plugins/tracker/include/Tracker/Semantic/Tracker_Semantic_ContributorFactory.class.php | +1 | −1 | Go to diff View file |
M | plugins/tracker/include/Tracker/Semantic/Tracker_Semantic_DescriptionFactory.class.php | +1 | −1 | Go to diff View file |
M | plugins/tracker/include/Tracker/Semantic/Tracker_Semantic_StatusFactory.class.php | +1 | −1 | Go to diff View file |
M | plugins/tracker/include/Tracker/Semantic/Tracker_Semantic_TitleFactory.class.php | +1 | −1 | Go to diff View file |
M | plugins/tracker/include/Tracker/Tooltip/Tracker_TooltipFactory.class.php | +1 | −1 | Go to diff View file |
M | plugins/tracker/include/Tracker/TrackerFactory.class.php | +1 | −1 | Go to diff View file |
M | plugins/tracker/include/trackerPlugin.class.php | +3 | −5 | Go to diff View file |
M | src/common/Project/ServiceManager.class.php | +1 | −1 | Go to diff View file |
M | src/common/Request/RouteCollector.php | +32 | −32 | Go to diff View file |
M | src/common/TreeNode/TreeNode.class.php | +5 | −5 | Go to diff View file |
M | src/common/User/UserHelper.class.php | +1 | −1 | Go to diff View file |
M | src/common/frs/FRSLog.class.php | +1 | −1 | Go to diff View file |
M | src/common/include/HTTPRequest.class.php | +1 | −1 | Go to diff View file |
M | src/common/include/MIME.class.php | +1 | −1 | Go to diff View file |
M | src/common/include/lib/PHP_BigFile.class.php | +2 | −2 | Go to diff View file |
M | src/common/layout/BaseLayout.php | +1 | −1 | Go to diff View file |
M | src/common/mvc/Controler.class.php | +9 | −3 | Go to diff View file |
M | src/common/plugin/Plugin.class.php | +1 | −1 | Go to diff View file |
M | src/common/reference/ReferenceManager.class.php | +1 | −1 | Go to diff View file |
M | src/common/system_event/SystemEventManager.class.php | +1 | −1 | Go to diff View file |
M | src/common/system_event/include/SystemEvent_PROJECT_IS_PRIVATE.class.php | +1 | −1 | Go to diff View file |
M | src/common/system_event/include/SystemEvent_PROJECT_RENAME.class.php | +3 | −4 | Go to diff View file |
M | src/common/system_event/include/SystemEvent_USER_RENAME.class.php | +1 | −1 | Go to diff View file |
M | src/common/wiki/phpwiki/lib/BlockParser.php | +1 | −1 | Go to diff View file |
M | src/common/wiki/phpwiki/lib/PageType.php | +1 | −1 | Go to diff View file |
M | src/common/wiki/phpwiki/lib/WikiDB.php | +2 | −2 | Go to diff View file |
M | src/common/wiki/phpwiki/lib/WikiDB/backend/PearDB.php | +2 | −2 | Go to diff View file |
M | src/common/wiki/phpwiki/lib/WikiPlugin.php | +1 | −1 | Go to diff View file |
M | src/common/wiki/phpwiki/lib/WikiUserNew.php | +8 | −8 | Go to diff View file |
M | src/common/wiki/phpwiki/lib/pear/DB/common.php | +1 | −1 | Go to diff View file |
M | src/common/wiki/phpwiki/lib/pear/PEAR.php | +5 | −5 | Go to diff View file |
M | src/embedded_vendor/jpgraph/jpgraph_errhandler.inc.php | +1 | −1 | Go to diff View file |
M | src/www/include/nusoap.php | +1 | −1 | Go to diff View file |
M | tests/phpcs/tuleap-ruleset-minimal.xml | +2 | −0 | Go to diff View file |
M | tests/simpletest/common/include/Codendi_HTMLPurifierTest.php | +1 | −1 | Go to diff View file |
M | tests/simpletest/common/templating/TemplateRendererTestBase.php | +1 | −1 | Go to diff View file |