Add type hints to dml.php methods

Bug #1400975 reported by Aaron Wells on 2014-12-10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Aaron Wells

Bug Description

Following up on patch , I think it'd be a good idea to add PHP type hints to all the applicable method params in dml.php, so that people get warning messages if they're passing in the wrong types of params. That should make it easier to troubleshoot problem code.

Aaron Wells (u-aaronw) wrote :

For the record, PHP type hinting with arrays has been available since PHP 5.1, and we only support PHP 5.3 and later.

Aaron Wells (u-aaronw) wrote :

Some of the method params are specifically designed to accept an object or an array. I have not placed type hints on those, because neither stdClass nor array would be applicable.

Submitter: Robert Lyon (<email address hidden>)
Branch: master

commit 0a802bbe4bdc3cbe9f9bfcbbcf9dd2434b220c27
Author: Aaron Wells <email address hidden>
Date: Wed Dec 10 16:27:30 2014 +1300

Add type hints to dml.php methods

Bug 1400975

Change-Id: I0b7145a6febdb9a5e7c32da9e5ae6cc138840f9b

Robert Lyon (robertl-9) on 2014-12-11
Changed in mahara:
milestone: none → 15.04.0
assignee: nobody → Aaron Wells (u-aaronw)
importance: Undecided → Medium
status: New → Fix Committed
tags: added: nominatedfeature
Robert Lyon (robertl-9) on 2015-04-17
Changed in mahara:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers