stable
Clone or download
Read-only
request #13478: Enforce a set of coding standard rules on how PHP use statements should be used
This contribution adds the following set of rules: * 1 newline before and after the group of use statements, no newline in the middle of the group * Forbid usage of alias that is same as unqualified name * Forbid use from the same namespace * Forbid multiple use statements per line * Forbid usage of group use To test, you can review the code of the sniffs, apply the new ruleset and then launch `make phpcbf`. The resulting diff should be identical this contribution. Change-Id: I0af2047d678a52b20d43a60024553553d8528a7a
Modified Files
Name | ||||
---|---|---|---|---|
M | plugins/agiledashboard/include/AgileDashboard/Kanban/TrackerReport/TrackerReportBuilder.php | +0 | −1 | Go to diff View file |
M | plugins/agiledashboard/include/AgileDashboard/REST/v1/ArtifactCannotBeChildrenOfException.class.php | +1 | −1 | Go to diff View file |
M | plugins/agiledashboard/include/AgileDashboard/REST/v1/ArtifactCannotBeInBacklogOfException.class.php | +1 | −1 | Go to diff View file |
M | plugins/agiledashboard/include/AgileDashboard/REST/v1/ArtifactDoesNotExistException.class.php | +1 | −1 | Go to diff View file |
M | plugins/agiledashboard/include/AgileDashboard/REST/v1/ArtifactIsClosedOrAlreadyPlannedInAnotherMilestone.class.php | +1 | −1 | Go to diff View file |
M | plugins/agiledashboard/include/AgileDashboard/REST/v1/ArtifactIsNotInBacklogTrackerException.class.php | +1 | −1 | Go to diff View file |
M | plugins/agiledashboard/include/AgileDashboard/REST/v1/ArtifactIsNotInMilestoneContentException.class.php | +1 | −1 | Go to diff View file |
M | plugins/agiledashboard/include/AgileDashboard/REST/v1/ArtifactIsNotInUnassignedBacklogItemsException.class.php | +1 | −1 | Go to diff View file |
M | plugins/agiledashboard/include/AgileDashboard/REST/v1/ArtifactIsNotInUnplannedBacklogItemsException.class.php | +1 | −1 | Go to diff View file |
M | plugins/agiledashboard/include/AgileDashboard/REST/v1/CardRepresentation.class.php | +1 | −1 | Go to diff View file |
M | plugins/agiledashboard/include/AgileDashboard/REST/v1/ColumnRepresentation.class.php | +1 | −1 | Go to diff View file |
M | plugins/agiledashboard/include/AgileDashboard/REST/v1/ElementCannotBeSubmilestoneException.php | +1 | −1 | Go to diff View file |
M | plugins/agiledashboard/include/AgileDashboard/REST/v1/FilterValidContent.class.php | +3 | −3 | Go to diff View file |
M | plugins/agiledashboard/include/AgileDashboard/REST/v1/IdsFromBodyAreNotUniqueException.class.php | +1 | −1 | Go to diff View file |
M | plugins/agiledashboard/include/AgileDashboard/REST/v1/Kanban/KanbanItemsResource.php | +2 | −2 | Go to diff View file |
M | plugins/agiledashboard/include/AgileDashboard/REST/v1/MilestoneContentUpdater.class.php | +4 | −4 | Go to diff View file |
M | plugins/agiledashboard/include/AgileDashboard/REST/v1/MilestoneResourceValidator.class.php | +13 | −14 | Go to diff View file |
M | plugins/agiledashboard/include/AgileDashboard/REST/v1/OrderIdOutOfBoundException.class.php | +1 | −1 | Go to diff View file |
M | plugins/agiledashboard/include/AgileDashboard/REST/v1/PlanningReference.class.php | +3 | −3 | Go to diff View file |
M | plugins/agiledashboard/include/AgileDashboard/REST/v1/PlanningResource.class.php | +12 | −12 | Go to diff View file |
M | plugins/agiledashboard/include/AgileDashboard/REST/v1/ProjectMilestonesResource.class.php | +14 | −14 | Go to diff View file |
M | plugins/agiledashboard/include/AgileDashboard/REST/v1/ProjectPlanningsResource.class.php | +2 | −2 | Go to diff View file |
M | plugins/agiledashboard/include/AgileDashboard/REST/v1/SubMilestoneAlreadyHasAParentException.class.php | +1 | −1 | Go to diff View file |
M | plugins/agiledashboard/include/AgileDashboard/REST/v1/SubMilestoneDoesNotExistException.class.php | +1 | −1 | Go to diff View file |
M | plugins/agiledashboard/include/AgileDashboard/REST/v1/SubmilestoneListedTwiceException.class.php | +1 | −1 | Go to diff View file |
M | plugins/agiledashboard/include/AgileDashboard/REST/v1/UserCannotReadSubMilestoneException.class.php | +1 | −1 | Go to diff View file |
M | plugins/agiledashboard/include/AgileDashboard/REST/v1/UserCannotUpdateMilestoneException.php | +1 | −1 | Go to diff View file |
M | plugins/agiledashboard/include/AgileDashboard/REST/v2/BacklogItemRepresentation.php | +4 | −4 | Go to diff View file |
M | plugins/agiledashboard/include/AgileDashboard/REST/v2/BacklogItemRepresentationFactory.class.php | +3 | −3 | Go to diff View file |
M | plugins/agiledashboard/include/AgileDashboard/REST/v2/ProjectBacklogResource.class.php | +16 | −16 | Go to diff View file |
M | plugins/agiledashboard/include/Planning/MilestoneControllerFactory.class.php | +1 | −0 | Go to diff View file |
M | plugins/agiledashboard/include/Planning/PlanningFormPresenter.class.php | +0 | −1 | Go to diff View file |
M | plugins/agiledashboard/tests/include/AgileDashboard/REST/v1/MilestoneResourceValidatorTest.php | +6 | −6 | Go to diff View file |
M | plugins/cardwall/include/REST/v1/CardUpdater.class.php | +4 | −4 | Go to diff View file |
M | plugins/cardwall/include/REST/v1/CardValidator.php | +7 | −7 | Go to diff View file |
M | plugins/cardwall/include/REST/v1/MilestonesCardwallResource.class.php | +7 | −7 | Go to diff View file |
M | plugins/cardwall/include/RendererPresenter.class.php | +0 | −1 | Go to diff View file |
M | plugins/crosstracker/include/CrossTracker/REST/v1/ArtifactRepresentationFactory.php | +0 | −2 | Go to diff View file |
M | plugins/docman/include/Docman_ItemAction.class.php | +0 | −1 | Go to diff View file |
M | plugins/docman/include/Docman_VersionFactory.class.php | +1 | −0 | Go to diff View file |
M | plugins/docman/include/Docman_Widget_MyDocman.class.php | +1 | −0 | Go to diff View file |
M | plugins/git/include/CIToken/Manager.php | +2 | −2 | Go to diff View file |
M | plugins/git/include/Git/Permissions/PermissionChangesDetector.php | +0 | −1 | Go to diff View file |
M | plugins/git/tests/Git/Notifications/NotificationsForProjectMemberCleanerTest.php | +0 | −1 | Go to diff View file |
M | plugins/git/tests/GitRepositoryImplTest.php | +0 | −1 | Go to diff View file |
M | plugins/git/tests/GitXmlImporterTest.php | +0 | −1 | Go to diff View file |
M | plugins/git/tests/rest/GitDataBuilder.php | +0 | −1 | Go to diff View file |
M | plugins/gitlfs/bin/git-lfs-authenticate.php | +7 | −6 | Go to diff View file |
M | plugins/gitlfs/phpunit/HTTP/LFSAPIHTTPAccessControlTest.php | +0 | −2 | Go to diff View file |
M | plugins/gitlfs/phpunit/HTTP/LSFBatchAPIHTTPAuthorizationTest.php | +0 | −1 | Go to diff View file |
M | plugins/graphontrackersv5/include/data-access/GraphOnTrackersV5_Chart_Burndown.class.php | +1 | −0 | Go to diff View file |
M | plugins/graphontrackersv5/include/data-access/GraphOnTrackersV5_Chart_CumulativeFlow.class.php | +1 | −0 | Go to diff View file |
M | plugins/graphontrackersv5/include/data-access/GraphOnTrackersV5_Chart_Pie.class.php | +1 | −0 | Go to diff View file |
M | plugins/hudson/include/hudson_Widget_JobBuildHistory.class.php | +0 | −1 | Go to diff View file |
M | plugins/hudson/include/hudson_Widget_JobLastBuilds.class.php | +0 | −1 | Go to diff View file |
M | plugins/hudson_git/include/HudsonGit/Plugin/PluginInfo.php | +0 | −1 | Go to diff View file |
M | plugins/hudson_svn/include/HudsonSvnPluginInfo.php | +0 | −1 | Go to diff View file |
M | plugins/ldap/include/GroupSyncAdminEmailNotificationsManager.class.php | +0 | −1 | Go to diff View file |
M | plugins/ldap/include/GroupSyncSilentNotificationsManager.class.php | +0 | −1 | Go to diff View file |
M | plugins/ldap/include/LDAP_ProjectGroupManager.class.php | +1 | −1 | Go to diff View file |
M | plugins/openidconnectclient/include/OpenIDConnectClient/AccountLinker/Presenter.php | +0 | −1 | Go to diff View file |
M | plugins/openidconnectclient/include/OpenIDConnectClient/AccountLinker/UnlinkedAccountManager.php | +0 | −1 | Go to diff View file |
M | plugins/openidconnectclient/include/OpenIDConnectClient/Administration/Controller.php | +0 | −1 | Go to diff View file |
M | plugins/openidconnectclient/include/OpenIDConnectClient/Authentication/FlowResponse.php | +0 | −1 | Go to diff View file |
M | plugins/openidconnectclient/include/OpenIDConnectClient/Provider/ProviderManager.php | +0 | −1 | Go to diff View file |
M | plugins/proftpd/include/ProFTPd/Admin/ACLUpdater.class.php | +3 | −3 | Go to diff View file |
M | plugins/proftpd/include/ProFTPd/Xferlog/FileImporter.class.php | +4 | −4 | Go to diff View file |
M | plugins/proftpd/include/proftpdPlugin.class.php | +1 | −0 | Go to diff View file |
M | plugins/pullrequest/include/PullRequest/Factory.php | +2 | −2 | Go to diff View file |
M | plugins/pullrequest/include/PullRequest/PullRequestUpdater.php | +2 | −2 | Go to diff View file |
M | plugins/pullrequest/include/PullRequest/REST/v1/PullRequestFileRepresentationFactory.php | +1 | −1 | Go to diff View file |
M | plugins/pullrequest/include/PullRequest/REST/v1/PullRequestInlineCommentRepresentationBuilder.php | +3 | −3 | Go to diff View file |
M | plugins/pullrequest/include/PullRequest/REST/v1/PullRequestLineUniDiffRepresentation.php | +1 | −1 | Go to diff View file |
M | plugins/pullrequest/include/PullRequest/Reference/ReferenceFactory.php | +0 | −2 | Go to diff View file |
M | plugins/pullrequest/tests/InlineComment/InlineCommentUpdaterTest.php | +3 | −3 | Go to diff View file |
M | plugins/pullrequest/tests/PullRequestUpdaterTest.php | +3 | −3 | Go to diff View file |
M | plugins/referencealias_git/include/ReferenceAliasGit/ReferencesBuilder.php | +0 | −1 | Go to diff View file |
M | plugins/referencealias_svn/include/ReferenceAliasSVN/ReferencesBuilder.php | +0 | −1 | Go to diff View file |
M | plugins/referencealias_tracker/include/ReferenceAliasTracker/OriginalReferencesBuilder.php | +0 | −1 | Go to diff View file |
M | plugins/statistics/www/frequence_stat_graph.php | +0 | −1 | Go to diff View file |
M | plugins/svn/include/REST/ResourcesInjector.php | +1 | −1 | Go to diff View file |
M | plugins/svn/include/SVN/Admin/BaseAdminPresenter.php | +0 | −1 | Go to diff View file |
M | plugins/svn/include/SVN/Commit/Svnlook.php | +0 | −2 | Go to diff View file |
M | plugins/svn/include/SVN/Logs/LogCache.php | +1 | −1 | Go to diff View file |
M | plugins/svn/include/SVN/Logs/Parser.php | +1 | −1 | Go to diff View file |
M | plugins/svn/include/SVN/Repository/Destructor.php | +0 | −1 | Go to diff View file |
M | plugins/svn/tests/SVN/AccessControl/AccessFileReaderTest.php | +0 | −1 | Go to diff View file |
M | plugins/svn/tests/SVN/Mails/MailReceivedFromUserExtractorTest.php | +0 | −2 | Go to diff View file |
M | plugins/svn/tests/rest/SVN/ProjectTest.php | +0 | −1 | Go to diff View file |
M | plugins/tracker/include/REST/Artifact/ArtifactReference.class.php | +3 | −4 | Go to diff View file |
M | plugins/tracker/include/REST/Artifact/ArtifactReferenceRepresentation.class.php | +0 | −1 | Go to diff View file |
M | plugins/tracker/include/REST/Artifact/ChangesetCommentRepresentation.class.php | +1 | −1 | Go to diff View file |
M | plugins/tracker/include/REST/Artifact/ChangesetRepresentation.class.php | +4 | −4 | Go to diff View file |
M | plugins/tracker/include/REST/Artifact/MovedArtifactValueBuilder.php | +1 | −1 | Go to diff View file |
M | plugins/tracker/include/REST/Artifact/ParentArtifactReference.php | +1 | −1 | Go to diff View file |
M | plugins/tracker/include/REST/CompleteTrackerRepresentation.class.php | +1 | −1 | Go to diff View file |
M | plugins/tracker/include/REST/FieldListBindUGroupValueRepresentation.class.php | +1 | −1 | Go to diff View file |
M | plugins/tracker/include/REST/FieldListBindUserValueRepresentation.class.php | +1 | −1 | Go to diff View file |
M | plugins/tracker/include/REST/FieldListStaticValueRepresentation.class.php | +1 | −1 | Go to diff View file |
M | plugins/tracker/include/REST/FieldValueRepresentation.class.php | +1 | −1 | Go to diff View file |
M | plugins/tracker/include/REST/ReportRepresentation.class.php | +1 | −1 | Go to diff View file |
M | plugins/tracker/include/REST/TrackerReference.class.php | +2 | −2 | Go to diff View file |
M | plugins/tracker/include/REST/v1/ArtifactFilesResource.class.php | +10 | −10 | Go to diff View file |
M | plugins/tracker/include/REST/v1/MilestonesBurndownResource.class.php | +4 | −4 | Go to diff View file |
M | plugins/tracker/include/REST/v1/ReportsResource.class.php | +11 | −11 | Go to diff View file |
M | plugins/tracker/include/REST/v1/TrackerFieldRepresentations/PermissionsOnArtifacts.class.php | +1 | −1 | Go to diff View file |
M | plugins/tracker/include/Tracker/Artifact/Tracker_Artifact_ChangesetValueVisitor.class.php | +1 | −0 | Go to diff View file |
M | plugins/tracker/include/Tracker/Chart/BurndownView.class.php | +1 | −1 | Go to diff View file |
M | plugins/tracker/include/Tracker/FormElement/Tracker_FormElement_Field_Alphanum.class.php | +0 | −1 | Go to diff View file |
M | plugins/tracker/include/Tracker/FormElement/Tracker_FormElement_Field_List_BindDecorator.class.php | +1 | −0 | Go to diff View file |
M | plugins/tracker/include/Tracker/FormElement/Tracker_FormElement_Field_String.class.php | +0 | −1 | Go to diff View file |
M | plugins/tracker/include/Tracker/FormElement/Tracker_FormElement_Field_SubmittedBy.class.php | +0 | −1 | Go to diff View file |
M | plugins/tracker/include/Tracker/FormElement/View/Admin.class.php | +1 | −1 | Go to diff View file |
M | plugins/tracker/include/Tracker/FormElement/View/Admin/Field/Computed.class.php | +1 | −1 | Go to diff View file |
M | plugins/tracker/include/Tracker/Report/Query/Advanced/InvalidComparisonCollectorVisitor.php | +0 | −1 | Go to diff View file |
M | plugins/tracker/include/Tracker/Report/Query/Advanced/QueryBuilder/EqualFieldComparisonVisitor.php | +0 | −1 | Go to diff View file |
M | plugins/tracker/include/Tracker/Report/Query/Advanced/QueryBuilder/NotEqualFieldComparisonVisitor.php | +0 | −1 | Go to diff View file |
M | plugins/tracker/include/Tracker/Report/Tracker_Report.class.php | +0 | −1 | Go to diff View file |
M | plugins/tracker/include/Workflow/Action/Transitions/Details.class.php | +0 | −1 | Go to diff View file |
M | plugins/tracker/phpunit/Tracker/Notifications/ConfigNotificationEmailCustomSenderFormatterTest.php | +0 | −4 | Go to diff View file |
M | plugins/tracker/tests/Tracker_FormElement_Field_List_Bind_UsersTest.php | +1 | −0 | Go to diff View file |
M | plugins/tracker/tests/builders/aTracker.php | +5 | −4 | Go to diff View file |
M | plugins/tracker/tests/rest/XML/ArtifactTest.php | +1 | −1 | Go to diff View file |
M | plugins/tracker_encryption/include/Tracker_Key.class.php | +1 | −0 | Go to diff View file |
M | plugins/userlog/include/UserLogManager.class.php | +0 | −1 | Go to diff View file |
M | src/common/Project/REST/ProjectResourceReference.class.php | +1 | −1 | Go to diff View file |
M | src/common/Project/REST/UserGroupRepresentation.class.php | +4 | −3 | Go to diff View file |
M | src/common/Project/REST/UserRepresentation.class.php | +3 | −2 | Go to diff View file |
M | src/common/Project/REST/v2/ProjectResource.class.php | +9 | −9 | Go to diff View file |
M | src/common/REST/BasicAuthentication.class.php | +2 | −2 | Go to diff View file |
M | src/common/REST/Exceptions/InvalidJsonException.class.php | +1 | −1 | Go to diff View file |
M | src/common/REST/Exceptions/LimitOutOfBoundsException.class.php | +1 | −1 | Go to diff View file |
M | src/common/REST/ProjectAuthorization.class.php | +10 | −10 | Go to diff View file |
M | src/common/REST/RESTAuthenticationFlowIsAllowed.php | +1 | −2 | Go to diff View file |
M | src/common/REST/ResourceReference.class.php | +0 | −2 | Go to diff View file |
M | src/common/REST/ResourcesInjector.class.php | +8 | −8 | Go to diff View file |
M | src/common/REST/TuleapRESTAuthentication.php | +1 | −1 | Go to diff View file |
M | src/common/User/REST/UserRepresentation.class.php | +1 | −2 | Go to diff View file |
M | src/common/User/REST/v1/UserResource.php | +1 | −1 | Go to diff View file |
M | src/common/backend/Backend.class.php | +1 | −0 | Go to diff View file |
M | src/common/chart/Chart.class.php | +0 | −1 | Go to diff View file |
M | src/common/frs/FRSFile.class.php | +0 | −1 | Go to diff View file |
M | src/common/frs/PackagePermissionManager.php | +0 | −1 | Go to diff View file |
M | src/common/svn/SVN_Apache_Auth_Factory.class.php | +1 | −0 | Go to diff View file |
M | src/common/svn/hook/PreCommit.class.php | +1 | −0 | 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 | +0 | −1 | Go to diff View file |
M | src/common/wiki/REST/v1/PhpWikiPageFullRepresentation.class.php | +0 | −1 | Go to diff View file |
M | src/common/wiki/phpwiki/lib/WikiDB.php | +20 | −3 | Go to diff View file |
M | src/common/wiki/phpwiki/lib/loadsave.php | +2 | −5 | Go to diff View file |
M | src/www/account/lostpw-confirm.php | +22 | −4 | Go to diff View file |
M | src/www/admin/approve_pending_users.php | +22 | −5 | Go to diff View file |
M | src/www/api/index.php | +2 | −4 | Go to diff View file |
M | src/www/include/user.php | +0 | −1 | Go to diff View file |
M | src/www/soap/index.php | +0 | −1 | Go to diff View file |
M | tests/phpcs/tuleap-ruleset-minimal.xml | +18 | −0 | Go to diff View file |
M | tests/phpcs/tuleap-ruleset.xml | +2 | −0 | Go to diff View file |
M | tests/phpunit/common/Upload/UploadPathAllocatorTest.php | +0 | −1 | Go to diff View file |
M | tests/rest/lib/tracker/Tracker.php | +2 | −2 | Go to diff View file |
M | tests/rest/lib/tracker/TrackerFactory.php | +2 | −2 | Go to diff View file |
M | tests/rest/tests/ArtifactFilesTest.php | +1 | −1 | Go to diff View file |
M | tests/simpletest/common/User/ForgeUserGroupPermissionsFactoryTest.php | +0 | −1 | Go to diff View file |
M | tests/simpletest/common/reference/ReferenceValidatorTest.php | +0 | −2 | Go to diff View file |
M | tools/Configuration/Setup/DistributedSVN.php | +1 | −1 | Go to diff View file |
M | tools/utils/generate-po.php | +21 | −16 | Go to diff View file |