Welcome Guest, Not a member yet? Register   Sign In
User Documentation
#3

(This post was last modified: 08-08-2016, 04:08 AM by prezire.)

(08-07-2016, 10:58 PM)skunkbad Wrote:
(08-07-2016, 10:34 PM)prezire Wrote: Is it possible to enhance the user documentation by providing datatypes to method signatures? It's easier to see everything in a glance that you don't need to find what and where things are.

See examples from:
Java http://icecream.me/5bd24c8336499692e990a7de84e4e8ba
PHP http://icecream.me/44998e053b59b2bbf505c86ded89afee
.NET framework http://icecream.me/26cfe49c08b2285ff859b5e99bf60369

and so forth.

Unlike Java (and not sure about .NET), PHP functions don't necessarily return a declared datatype. Take stripos for example:

http://php.net/manual/en/function.stripos.php

In CI, this happens a lot. Consider the Input class methods for getting values from GET or POST vars. Maybe it could help the docs to know what the return type is, but if you've really read the entire user guide, do you really still need that?

IMO yes, it's better to have it especially when you're on tight deadlines wherein you only need to get a single glance of what the signatures looks like. It doesn't have to be declared datatypes because native datatypes will do as long as the signatures are there.

See this screenshot http://icecream.me/5cf61b1fd05c152a3433c06c77e0b246.
To the right, are the helper functions. To the left is their equivalent user guide. I've modified singular() with datatypes in it VS plural(). Can you see the difference and ease of quickly knowing what the method signatures are? This is the end result http://icecream.me/c7a8c6831cfb34ebde128c797e59a283.
Long live CodeIgniter!
Reply


Messages In This Thread
User Documentation - by prezire - 08-07-2016, 10:34 PM
RE: User Documentation - by skunkbad - 08-07-2016, 10:58 PM
RE: User Documentation - by prezire - 08-08-2016, 03:58 AM
RE: User Documentation - by Narf - 08-08-2016, 04:09 AM
RE: User Documentation - by prezire - 08-08-2016, 05:30 AM
RE: User Documentation - by Narf - 08-09-2016, 04:07 AM
RE: User Documentation - by prezire - 08-09-2016, 04:09 PM
RE: User Documentation - by Narf - 08-10-2016, 02:14 AM
RE: User Documentation - by prezire - 08-10-2016, 07:01 AM
RE: User Documentation - by Narf - 08-10-2016, 08:00 AM
RE: User Documentation - by ciadmin - 08-09-2016, 08:23 PM
RE: User Documentation - by prezire - 08-10-2016, 07:10 AM
RE: User Documentation - by prezire - 08-10-2016, 09:36 AM
RE: User Documentation - by Michus - 08-10-2016, 05:07 PM
RE: User Documentation - by prezire - 08-10-2016, 09:52 PM
RE: User Documentation - by ridho - 08-12-2016, 02:42 AM
RE: User Documentation - by kilishan - 08-12-2016, 11:43 AM
RE: User Documentation - by prezire - 08-13-2016, 05:09 AM



Theme © iAndrew 2016 - Forum software by © MyBB