stable
Clone or download
Read-only
Keep only one way to verify that the REST routes operate on a item of the expected type
The changes done in this contribution also gives the capability to static analysis tools to determine the return type a call to Docman_Item::accept(). Part of story #12456: Cut/Copy/paste items Change-Id: I1558b1a53a1b95bf888145f2687e08e89d4cbefc
Modified Files
Name | ||||
---|---|---|---|---|
M | plugins/docman/include/Docman_ActionsDeleteVisitor.class.php | +1 | −0 | Go to diff View file |
M | plugins/docman/include/Docman_CloneItemsVisitor.class.php | +3 | −0 | Go to diff View file |
M | plugins/docman/include/Docman_Document.class.php | +1 | −10 | Go to diff View file |
M | plugins/docman/include/Docman_Item.class.php | +6 | −6 | Go to diff View file |
M | plugins/docman/include/Item/ItemVisitor.php | +25 | −1 | Go to diff View file |
A | plugins/docman/include/ItemType/DoesItemHasExpectedTypeVisitor.php | +95 | −0 | Go to diff View file |
M | plugins/docman/include/REST/v1/AfterItemCreationVisitor.php | +4 | −1 | Go to diff View file |
M | plugins/docman/include/REST/v1/CopyItem/BeforeCopyVisitor.php | +9 | −6 | Go to diff View file |
M | plugins/docman/include/REST/v1/CopyItem/DocmanItemCopier.php | +0 | −1 | Go to diff View file |
M | plugins/docman/include/REST/v1/DocmanEmbeddedFilesResource.php | +7 | −1 | Go to diff View file |
M | plugins/docman/include/REST/v1/DocmanEmptyDocumentsResource.php | +11 | −2 | Go to diff View file |
M | plugins/docman/include/REST/v1/DocmanFilesResource.php | +7 | −1 | Go to diff View file |
M | plugins/docman/include/REST/v1/DocmanFoldersResource.php | +8 | −2 | Go to diff View file |
M | plugins/docman/include/REST/v1/DocmanLinksResource.php | +8 | −1 | Go to diff View file |
M | plugins/docman/include/REST/v1/DocmanWikiResource.php | +8 | −1 | Go to diff View file |
M | plugins/docman/include/REST/v1/DocumentBeforeModificationValidatorVisitor.php | +36 | −36 | Go to diff View file |
M | plugins/docman/include/REST/v1/DocumentBeforeVersionCreationValidatorVisitor.php | +21 | −28 | Go to diff View file |
M | plugins/docman/include/REST/v1/ItemCanHaveSubitemsCheckerVisitor.php | +4 | −1 | Go to diff View file |
M | plugins/docman/include/view/Docman_View_GetSpecificFieldsVisitor.class.php | +1 | −0 | Go to diff View file |
M | plugins/docman/include/view/Docman_View_ItemTreeUlVisitor.class.php | +1 | −0 | Go to diff View file |
A | plugins/docman/phpunit/ItemType/DoesItemHasExpectedTypeVisitorTest.php | +64 | −0 | Go to diff View file |
M | plugins/docman/phpunit/REST/v1/CopyItem/BeforeCopyVisitorTest.php | +63 | −40 | Go to diff View file |
M | plugins/docman/phpunit/REST/v1/CopyItem/DocmanItemCopierTest.php | +2 | −1 | Go to diff View file |
M | plugins/docman/phpunit/REST/v1/DocumentBeforeModificationValidatorVisitorTest.php | +2 | −1 | Go to diff View file |
M | plugins/docman/phpunit/REST/v1/DocumentBeforeVersionCreationValidatorVisitorTest.php | +1 | −1 | Go to diff View file |