joomla / joomla-cms

Home of the Joomla! Content Management System
https://www.joomla.org
GNU General Public License v2.0
4.77k stars 3.65k forks source link

[4.0][com_workflow] Docblocks Incorrect return types documented. #23021

Closed PhilETaylor closed 5 years ago

PhilETaylor commented 6 years ago

Incorrect return types documented.

https://github.com/joomla/joomla-cms/blob/b7673120c5b26544756c5bb50e1695c5dfaa820f/administrator/components/com_workflow/Model/WorkflowModel.php#L278

https://github.com/joomla/joomla-cms/blob/b7673120c5b26544756c5bb50e1695c5dfaa820f/administrator/components/com_workflow/Controller/WorkflowController.php#L229

SharkyKZ commented 6 years ago

For first point test PR #23026.

Second point is correct, I think. It calls parent's save() method which should return a boolean. See https://github.com/joomla/joomla-cms/blob/b7673120c5b26544756c5bb50e1695c5dfaa820f/libraries/src/MVC/Controller/FormController.php

PhilETaylor commented 6 years ago

@SharkyKZ parent::save might return something to this function, but this fuction DOESNT return that value, it returns void, when the documentation states it returns a boolean.

maybe this function should add return like

return parent::save($key, $urlVar);

or the documentation should be updated to state the return type is void.

SharkyKZ commented 6 years ago

Yes, you're right. There are several instances of this.

SharkyKZ commented 5 years ago

Test PR #23048 please.

SharkyKZ commented 5 years ago

This can be closed now.

joomla-cms-bot commented 5 years ago

Set to "closed" on behalf of @Quy by The JTracker Application at issues.joomla.org/joomla-cms/23021