r23673 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r23672‎ | r23673 | r23674 >
Date:15:53, 3 July 2007
Author:proes
Status:old
Tags:
Comment:
Added type hints to RecordSetQueries.php
Modified paths:
  • /trunk/extensions/Wikidata/OmegaWiki/RecordSetQueries.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Wikidata/OmegaWiki/RecordSetQueries.php
@@ -1,6 +1,8 @@
22 <?php
33
4 -function getTransactedSQL($transactionInformation, $selectFields, $table, $restrictions, $orderBy = array(), $count = -1, $offset = 0) {
 4+require_once('Transaction.php');
 5+
 6+function getTransactedSQL(QueryTransactionInformation $transactionInformation, array $selectFields, Table $table, array $restrictions, array $orderBy = array(), $count = -1, $offset = 0) {
57 $tableNames = array($table->identifier);
68
79 if ($table->isVersioned) {
@@ -32,7 +34,7 @@
3335 return $query;
3436 }
3537
36 -function queryRecordSet($recordSetStructureId, QueryTransactionInformation $transactionInformation, Attribute $keyAttribute, $fieldAttributeMapping, Table $table, $restrictions, $orderBy = array(), $count = -1, $offset = 0) {
 38+function queryRecordSet($recordSetStructureId, QueryTransactionInformation $transactionInformation, Attribute $keyAttribute, array $fieldAttributeMapping, Table $table, array $restrictions, array $orderBy = array(), $count = -1, $offset = 0) {
3739 $dbr =& wfGetDB(DB_SLAVE);
3840
3941 $selectFields = array_keys($fieldAttributeMapping);
@@ -66,7 +68,7 @@
6769 return $recordSet;
6870 }
6971
70 -function getUniqueIdsInRecordSet($recordSet, $idAttributes) {
 72+function getUniqueIdsInRecordSet(RecordSet $recordSet, array $idAttributes) {
7173 $ids = array();
7274
7375 for ($i = 0; $i < $recordSet->getRecordCount(); $i++) {

Status & tagging log