stable

Clone or download

Read-only

request #13361: Require the nullability symbol to be present when the default value is null

It is more explicit and this discussion [0] from two years ago from the doctrine/repo also points out it can hide a LSP violation. Now seems to be a good time to introduce this rule as we start to aggressively type scalar values so we might encounter the case more often. To test, you can review the code of the sniff [1], apply the new ruleset and allow to autofix this rule then launch `make phpcbf`. The diff should be identical with this contribution. [0] https://github.com/doctrine/common/pull/805#discussion_r128762923 [1] https://github.com/slevomat/coding-standard/blob/5.0.4/SlevomatCodingStandard/Sniffs/TypeHints/NullableTypeForNullDefaultValueSniff.php Change-Id: Ia7477be1ee75b40e02ccd4d097b9de3fcca64e4c

Modified Files

Name
M plugins/agiledashboard/include/AgileDashboard/FormElement/Burnup.php +6 −6 Go to diff View file
M plugins/agiledashboard/include/AgileDashboard/Kanban/TrackerReport/TrackerReportDao.php +1 −1 Go to diff View file
M plugins/agiledashboard/include/AgileDashboard/Milestone/Pane/Details/DetailsChartPresenter.php +3 −3 Go to diff View file
M plugins/agiledashboard/include/AgileDashboard/REST/v1/Artifact/BurnupRepresentation.php +1 −1 Go to diff View file
M plugins/agiledashboard/include/AgileDashboard/REST/v1/BacklogItemResource.php +1 −1 Go to diff View file
M plugins/agiledashboard/include/AgileDashboard/REST/v1/Kanban/KanbanResource.php +7 −7 Go to diff View file
M plugins/agiledashboard/include/AgileDashboard/REST/v1/MilestoneResource.class.php +4 −4 Go to diff View file
M plugins/agiledashboard/include/AgileDashboard/REST/v1/MilestoneResourceValidator.class.php +3 −3 Go to diff View file
M plugins/agiledashboard/include/AgileDashboard/REST/v1/ProjectBacklogResource.class.php +1 −1 Go to diff View file
M plugins/agiledashboard/include/AgileDashboard/Semantic/Dao/SemanticDoneDao.php +1 −1 Go to diff View file
M plugins/agiledashboard/include/AgileDashboard/Semantic/SemanticDoneAdminPresenter.php +1 −1 Go to diff View file
M plugins/agiledashboard/include/AgileDashboard/Semantic/SemanticDoneIntroPresenter.php +1 −1 Go to diff View file
M plugins/agiledashboard/include/AgileDashboard/Semantic/Semantic_InitialEffort.class.php +1 −1 Go to diff View file
M plugins/agiledashboard/include/AgileDashboard/Widget/WidgetKanbanPresenter.php +1 −1 Go to diff View file
M plugins/agiledashboard/include/PermissionsPerGroup/AgileDashboardPermissionsRepresentationBuilder.php +1 −1 Go to diff View file
M plugins/agiledashboard/include/PermissionsPerGroup/PlanningPermissionsRepresentationBuilder.php +1 −1 Go to diff View file
M plugins/agiledashboard/include/Planning/ArtifactLinker.class.php +1 −1 Go to diff View file
M plugins/agiledashboard/include/Planning/ArtifactMilestone.class.php +1 −1 Go to diff View file
M plugins/agiledashboard/include/Planning/MilestoneFactory.class.php +1 −1 Go to diff View file
M plugins/agiledashboard/include/agiledashboardPlugin.class.php +1 −1 Go to diff View file
M plugins/artifactsfolders/include/Folder/ArtifactLinkInformationPrepender.php +1 −1 Go to diff View file
M plugins/artifactsfolders/include/Folder/FolderHierarchicalRepresentationCollection.php +1 −1 Go to diff View file
M plugins/artifactsfolders/include/Folder/PostSaveNewChangesetCommand.php +1 −1 Go to diff View file
M plugins/bugzilla_reference/include/Bugzilla/Reference/Dao.php +1 −1 Go to diff View file
M plugins/cardwall/include/CardPresenter.class.php +1 −1 Go to diff View file
M plugins/cardwall/include/Cardwall_Renderer.class.php +1 −1 Go to diff View file
M plugins/cardwall/include/Column.class.php +1 −1 Go to diff View file
M plugins/cardwall/include/OnTop/Config/Command/DeleteMappingFields.class.php +1 −1 Go to diff View file
M plugins/cardwall/include/OnTop/Config/Command/UpdateMappingFields.class.php +3 −3 Go to diff View file
M plugins/cardwall/include/Semantic/CardFields.class.php +1 −1 Go to diff View file
M plugins/crosstracker/include/CrossTracker/Report/CSV/Format/UserValue.php +1 −1 Go to diff View file
M plugins/docman/include/REST/v1/CreatedItemRepresentation.php +1 −1 Go to diff View file
M plugins/docman/include/REST/v1/ItemRepresentation.php +6 −6 Go to diff View file
M plugins/docman/include/REST/v1/ItemRepresentationBuilder.php +4 −4 Go to diff View file
M plugins/git/include/CommitMetadata/CommitMetadata.php +1 −1 Go to diff View file
M plugins/git/include/Git/HTTP/CommandFactory.class.php +1 −1 Go to diff View file
M plugins/git/include/Git/PermissionsPerGroup/GitPanePresenter.php +1 −1 Go to diff View file
M plugins/git/include/Git/PermissionsPerGroup/RepositoriesSectionPresenter.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/Git/Repository/View/RepositoryHeaderPresenter.php +1 −1 Go to diff View file
M plugins/git/include/GitPHP/Commit/CommitUserPresenter.php +1 −1 Go to diff View file
M plugins/git/include/Git_GitoliteDriver.class.php +6 −6 Go to diff View file
M plugins/git/include/REST/v1/RepositoryResource.class.php +1 −1 Go to diff View file
M plugins/gitlfs/include/Batch/Request/BatchRequest.php +1 −1 Go to diff View file
M plugins/gitlfs/include/SSHAuthenticate/SSHAuthenticate.php +1 −1 Go to diff View file
M plugins/hudson/include/HudsonJobLazyExceptionHandler.php +1 −1 Go to diff View file
M plugins/ldap/include/LDAP/Project/UGroup/Binding/AdditionalModalPresenterBuilder.php +2 −2 Go to diff View file
M plugins/ldap/include/LDAP_UserManager.class.php +1 −1 Go to diff View file
M plugins/mediawiki/include/PermissionsPerGroup/PermissionPerGroupPaneBuilder.php +5 −5 Go to diff View file
M plugins/mediawiki/include/mediawikiPlugin.class.php +1 −1 Go to diff View file
M plugins/project_ownership/include/ProjectAdmin/ProjectOwnerPresenter.php +1 −1 Go to diff View file
M plugins/project_ownership/include/REST/ProjectOwnershipRepresentation.php +1 −1 Go to diff View file
M plugins/pullrequest/include/PullRequest/Exception/UnknownBranchNameException.php +1 −1 Go to diff View file
M plugins/svn/include/REST/v1/RepositoryResource.php +4 −4 Go to diff View file
M plugins/svn/include/REST/v1/SettingsRepresentationValidator.php +5 −5 Go to diff View file
M plugins/svn/include/SVN/Notifications/CannotAddUgroupsNotificationException.php +1 −1 Go to diff View file
M plugins/svn/include/SVN/Notifications/CannotAddUsersNotificationException.php +1 −1 Go to diff View file
M plugins/svn/include/SVN/PermissionsPerGroup/PermissionPerGroupServicePresenter.php +1 −1 Go to diff View file
M plugins/svn/include/SVN/Service/ServiceActivator.php +4 −4 Go to diff View file
M plugins/tracker/include/PermissionsPerGroup/PermissionPerGroupPanePresenter.php +1 −1 Go to diff View file
M plugins/tracker/include/REST/Artifact/ArtifactUpdater.class.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/v1/ArtifactsResource.class.php +2 −2 Go to diff View file
M plugins/tracker/include/Tracker/Artifact/ActionButtons/AdditionalButtonLinkPresenter.php +1 −1 Go to diff View file
M plugins/tracker/include/Tracker/Artifact/ActionButtons/GlobalButtonsActionPresenter.php +8 −8 Go to diff View file
M plugins/tracker/include/Tracker/Artifact/Attachment/TemporaryFileManager.class.php +1 −1 Go to diff View file
M plugins/tracker/include/Tracker/Artifact/Changeset/ChangesetCreatorBase.class.php +1 −1 Go to diff View file
M plugins/tracker/include/Tracker/Artifact/MailGateway/IncomingMessage.class.php +1 −1 Go to diff View file
M plugins/tracker/include/Tracker/Artifact/Node.php +1 −1 Go to diff View file
M plugins/tracker/include/Tracker/Artifact/Tracker_Artifact_Changeset.class.php +3 −3 Go to diff View file
M plugins/tracker/include/Tracker/Artifact/Tracker_Artifact_ChangesetFactory.class.php +1 −1 Go to diff View file
M plugins/tracker/include/Tracker/Artifact/Tracker_Artifact_ChangesetValue.class.php +3 −3 Go to diff View file
M plugins/tracker/include/Tracker/Artifact/Tracker_Artifact_ChangesetValue_ArtifactLink.class.php +2 −2 Go to diff View file
M plugins/tracker/include/Tracker/Artifact/Tracker_Artifact_ChangesetValue_Date.class.php +1 −1 Go to diff View file
M plugins/tracker/include/Tracker/Artifact/Tracker_Artifact_ChangesetValue_File.class.php +2 −2 Go to diff View file
M plugins/tracker/include/Tracker/Artifact/Tracker_Artifact_ChangesetValue_List.class.php +1 −1 Go to diff View file
M plugins/tracker/include/Tracker/Artifact/Tracker_Artifact_ChangesetValue_Numeric.class.php +1 −1 Go to diff View file
M plugins/tracker/include/Tracker/Artifact/Tracker_Artifact_ChangesetValue_PermissionsOnArtifact.class.php +1 −1 Go to diff View file
M plugins/tracker/include/Tracker/Artifact/Tracker_Artifact_ChangesetValue_Text.class.php +3 −3 Go to diff View file
M plugins/tracker/include/Tracker/Artifact/Tracker_Artifact_Changeset_Null.class.php +1 −1 Go to diff View file
M plugins/tracker/include/Tracker/ChangesetValueComputed.php +1 −1 Go to diff View file
M plugins/tracker/include/Tracker/DateReminder/Tracker_DateReminderManager.class.php +1 −1 Go to diff View file
M plugins/tracker/include/Tracker/FormElement/BurndownFieldPresenter.php +1 −1 Go to diff View file
M plugins/tracker/include/Tracker/FormElement/DateFormatter.class.php +2 −2 Go to diff View file
M plugins/tracker/include/Tracker/FormElement/Field/ArtifactLink/ArtifactLinksToRenderForPerTrackerTable.php +1 −1 Go to diff View file
M plugins/tracker/include/Tracker/FormElement/Field/ArtifactLink/PostSaveNewChangesetCommand.class.php +1 −1 Go to diff View file
M plugins/tracker/include/Tracker/FormElement/Field/ArtifactLink/PostSaveNewChangesetQueue.class.php +1 −1 Go to diff View file
M plugins/tracker/include/Tracker/FormElement/Field/ArtifactLink/ProcessChildrenTriggersCommand.class.php +2 −2 Go to diff View file
M plugins/tracker/include/Tracker/FormElement/Field/ArtifactLink/SubmittedValueConvertor.php +2 −2 Go to diff View file
M plugins/tracker/include/Tracker/FormElement/Field/ArtifactLink/UpdateLinkingDirectionCommand.class.php +1 −1 Go to diff View file
M plugins/tracker/include/Tracker/FormElement/Tracker_FormElement.class.php +6 −6 Go to diff View file
M plugins/tracker/include/Tracker/FormElement/Tracker_FormElement_Container.class.php +1 −1 Go to diff View file
M plugins/tracker/include/Tracker/FormElement/Tracker_FormElement_Field.class.php +13 −13 Go to diff View file
M plugins/tracker/include/Tracker/FormElement/Tracker_FormElement_Field_Alphanum.class.php +1 −1 Go to diff View file
M plugins/tracker/include/Tracker/FormElement/Tracker_FormElement_Field_ArtifactId.class.php +5 −5 Go to diff View file
M plugins/tracker/include/Tracker/FormElement/Tracker_FormElement_Field_ArtifactLink.class.php +15 −15 Go to diff View file
M plugins/tracker/include/Tracker/FormElement/Tracker_FormElement_Field_Burndown.class.php +6 −6 Go to diff View file
M plugins/tracker/include/Tracker/FormElement/Tracker_FormElement_Field_Computed.class.php +10 −10 Go to diff View file
M plugins/tracker/include/Tracker/FormElement/Tracker_FormElement_Field_CrossReferences.class.php +6 −6 Go to diff View file
M plugins/tracker/include/Tracker/FormElement/Tracker_FormElement_Field_Date.class.php +8 −8 Go to diff View file
M plugins/tracker/include/Tracker/FormElement/Tracker_FormElement_Field_File.class.php +9 −9 Go to diff View file
M plugins/tracker/include/Tracker/FormElement/Tracker_FormElement_Field_Float.class.php +1 −1 Go to diff View file
M plugins/tracker/include/Tracker/FormElement/Tracker_FormElement_Field_Integer.class.php +1 −1 Go to diff View file
M plugins/tracker/include/Tracker/FormElement/Tracker_FormElement_Field_LastModifiedBy.class.php +9 −9 Go to diff View file
M plugins/tracker/include/Tracker/FormElement/Tracker_FormElement_Field_LastUpdateDate.class.php +7 −7 Go to diff View file
M plugins/tracker/include/Tracker/FormElement/Tracker_FormElement_Field_List.class.php +10 −10 Go to diff View file
M plugins/tracker/include/Tracker/FormElement/Tracker_FormElement_Field_List_BindFactory.class.php +1 −1 Go to diff View file
M plugins/tracker/include/Tracker/FormElement/Tracker_FormElement_Field_MultiSelectbox.class.php +2 −2 Go to diff View file
M plugins/tracker/include/Tracker/FormElement/Tracker_FormElement_Field_Numeric.class.php +4 −4 Go to diff View file
M plugins/tracker/include/Tracker/FormElement/Tracker_FormElement_Field_OpenList.class.php +7 −7 Go to diff View file
M plugins/tracker/include/Tracker/FormElement/Tracker_FormElement_Field_PerTrackerArtifactIdclass.php +3 −3 Go to diff View file
M plugins/tracker/include/Tracker/FormElement/Tracker_FormElement_Field_PermissionsOnArtifact.class.php +11 −11 Go to diff View file
M plugins/tracker/include/Tracker/FormElement/Tracker_FormElement_Field_Priority.class.php +7 −7 Go to diff View file
M plugins/tracker/include/Tracker/FormElement/Tracker_FormElement_Field_Selectbox.class.php +1 −1 Go to diff View file
M plugins/tracker/include/Tracker/FormElement/Tracker_FormElement_Field_String.class.php +4 −4 Go to diff View file
M plugins/tracker/include/Tracker/FormElement/Tracker_FormElement_Field_SubmittedBy.class.php +9 −9 Go to diff View file
M plugins/tracker/include/Tracker/FormElement/Tracker_FormElement_Field_SubmittedOn.class.php +8 −8 Go to diff View file
M plugins/tracker/include/Tracker/FormElement/Tracker_FormElement_Field_Text.class.php +7 −7 Go to diff View file
M plugins/tracker/include/Tracker/FormElement/Tracker_FormElement_StaticField.class.php +1 −1 Go to diff View file
M plugins/tracker/include/Tracker/FormElement/TransitionListValidator.php +1 −1 Go to diff View file
M plugins/tracker/include/Tracker/IFetchTrackerSwitcher.class.php +1 −1 Go to diff View file
M plugins/tracker/include/Tracker/Migration/MailLogger.class.php +3 −3 Go to diff View file
M plugins/tracker/include/Tracker/Report/Query/Advanced/Grammar/AndExpression.php +1 −1 Go to diff View file
M plugins/tracker/include/Tracker/Report/Query/Advanced/Grammar/AndOperand.php +1 −1 Go to diff View file
M plugins/tracker/include/Tracker/Report/Query/Advanced/Grammar/OrExpression.php +1 −1 Go to diff View file
M plugins/tracker/include/Tracker/Report/Query/Advanced/Grammar/OrOperand.php +1 −1 Go to diff View file
M plugins/tracker/include/Tracker/Semantic/Tracker_Semantic_Contributor.class.php +1 −1 Go to diff View file
M plugins/tracker/include/Tracker/Semantic/Tracker_Semantic_Description.class.php +1 −1 Go to diff View file
M plugins/tracker/include/Tracker/Semantic/Tracker_Semantic_Status.class.php +1 −1 Go to diff View file
M plugins/tracker/include/Tracker/Semantic/Tracker_Semantic_Title.class.php +1 −1 Go to diff View file
M plugins/tracker/include/Tracker/Service/ServiceActivator.php +4 −4 Go to diff View file
M plugins/tracker/include/Tracker/TrackerManager.class.php +3 −3 Go to diff View file
M plugins/tracker/include/Tracker/XML/Importer/CopyArtifactInformationsAggregator.php +2 −2 Go to diff View file
M plugins/tracker/include/Tracker/dao/ConfigNotificationAssignedToDao.php +1 −1 Go to diff View file
M plugins/tracker/include/TrackerXmlImport.class.php +1 −1 Go to diff View file
M plugins/tracker/include/Workflow/Transition/Condition/FieldNotEmpty.class.php +1 −1 Go to diff View file
M plugins/tracker/include/Workflow/Transition/ConditionsCollection.class.php +1 −1 Go to diff View file
M plugins/tracker/include/Workflow/TransitionDeletionException.php +1 −1 Go to diff View file
M plugins/tracker/include/Workflow/WorkflowBackendLogger.php +2 −2 Go to diff View file
M plugins/tracker/tests/Tracker_FormElement_Field_OpenListTest.php +1 −1 Go to diff View file
M plugins/tracker/tests/builders/aTracker.php +1 −1 Go to diff View file
M plugins/tracker_encryption/include/ChangesetValue.php +1 −1 Go to diff View file
M plugins/tracker_encryption/include/Tracker_FormElement_Field_Encrypted.class.php +6 −6 Go to diff View file
M plugins/velocity/include/Velocity/Semantic/SemanticVelocity.php +2 −2 Go to diff View file
M plugins/velocity/include/Velocity/Semantic/SemanticVelocityPresenter.php +1 −1 Go to diff View file
M plugins/velocity/include/Velocity/Semantic/SemanticVelocityPresenterBuilder.php +1 −1 Go to diff View file
M plugins/velocity/include/Velocity/VelocityComputation.php +1 −1 Go to diff View file
M plugins/webdav/include/Webdav_URLVerification.class.php +1 −1 Go to diff View file
M src/common/CLI/ConsoleLogger.php +3 −3 Go to diff View file
M src/common/DB/Compat/Legacy2018/CompatPDODataAccessResult.php +1 −1 Go to diff View file
M src/common/Dashboard/Widget/DashboardWidgetDao.php +1 −1 Go to diff View file
M src/common/Error/Error_PermissionDenied.class.php +3 −3 Go to diff View file
M src/common/Error/PermissionDeniedMailSender.php +1 −1 Go to diff View file
M src/common/Error/PermissionDeniedPrivateProjectController.php +1 −1 Go to diff View file
M src/common/Project/Admin/PermissionPerGroup/PermissionPerGroupLoadAllButtonPresenter.php +1 −1 Go to diff View file
M src/common/Project/Admin/PermissionPerGroup/PermissionPerGroupPanePresenter.php +1 −1 Go to diff View file
M src/common/Project/Group.class.php +1 −1 Go to diff View file
M src/common/Project/Project.class.php +2 −2 Go to diff View file
M src/common/Project/ProjectCreationData.class.php +8 −8 Go to diff View file
M src/common/Project/ProjectUGroup.php +1 −1 Go to diff View file
M src/common/Project/REST/v1/ProjectResource.class.php +1 −1 Go to diff View file
M src/common/Project/RestrictedUserCanAccessProjectVerifier.php +1 −1 Go to diff View file
M src/common/Project/RestrictedUserCanAccessUrlOrProjectVerifier.php +1 −1 Go to diff View file
M src/common/Project/RestrictedUserCanAccessVerifier.php +1 −1 Go to diff View file
M src/common/Project/UGroupManager.class.php +4 −4 Go to diff View file
M src/common/REST/JsonCast.class.php +1 −1 Go to diff View file
M src/common/Request/ForbiddenException.php +1 −1 Go to diff View file
M src/common/User/AccessKey/AccessKeyMetadata.php +1 −1 Go to diff View file
M src/common/Widget/ProjectMembers/AdministratorPresenter.php +2 −2 Go to diff View file
M src/common/admin/PermissionDelegationGroupModalPresenter.php +1 −1 Go to diff View file
M src/common/admin/PermissionDelegationIndexPresenter.php +4 −4 Go to diff View file
M src/common/backend/BackendLogger.class.php +3 −3 Go to diff View file
M src/common/backend/SystemCheckLogger.php +1 −1 Go to diff View file
M src/common/dao/include/DataAccessObject.class.php +1 −1 Go to diff View file
M src/common/frs/FRSFileFactory.class.php +1 −1 Go to diff View file
M src/common/frs/FRSXMLImporter.class.php +3 −3 Go to diff View file
M src/common/include/Codendi_Request.class.php +1 −1 Go to diff View file
M src/common/include/SiteCache.php +1 −1 Go to diff View file
M src/common/include/URLVerification.class.php +3 −3 Go to diff View file
M src/common/log/BrokerLogger.class.php +2 −2 Go to diff View file
M src/common/log/ConsoleLogger.class.php +3 −3 Go to diff View file
M src/common/log/Logger.class.php +2 −2 Go to diff View file
M src/common/log/NoopLogger.class.php +2 −2 Go to diff View file
M src/common/log/TruncateLevelLogger.class.php +2 −2 Go to diff View file
M src/common/log/WrapperLogger.class.php +2 −2 Go to diff View file
M src/common/soap/TuleapSOAPServer.class.php +1 −1 Go to diff View file
M src/common/svn/SVNAuthenticationCacheInvalidator.php +1 −1 Go to diff View file
M src/common/system_event/SystemEvent.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/trove/TroveCatLinkDao.php +1 −1 Go to diff View file
M src/common/wiki/REST/v1/PhpWikiPageVersionFullRepresentation.class.php +1 −1 Go to diff View file
M src/tuleap-cfg/Command/ConfigureCommand.php +1 −1 Go to diff View file
M src/www/include/utils_soap.php +1 −1 Go to diff View file
M src/www/themes/FlamingParrot/ContainerPresenter.class.php +1 −1 Go to diff View file
M tests/lib/MockBuilder.php +1 −1 Go to diff View file
M tests/phpcs/tuleap-ruleset-minimal.xml +2 −0 Go to diff View file
M tests/phpunit/common/Project/REST/UserRESTReferenceRetrieverTest.php +1 −1 Go to diff View file