Skip to content

Commit f5a065f

Browse files
committed
Add missing use statement and deprecate old methods
1 parent d316ba9 commit f5a065f

File tree

5 files changed

+10
-7
lines changed

5 files changed

+10
-7
lines changed

formats/boilerplate/SRF_Boilerplate.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
use SMW\Query\QueryResult;
44
use SMW\Query\ResultPrinters\ResultPrinter;
5+
use SMW\Query\Result\ResultArray;
56

67
/**
78
* Boilerplate query printer
@@ -101,12 +102,12 @@ protected function getResultData( QueryResult $result, $outputMode ) {
101102
/**
102103
* Get all values for all rows that belong to the result set
103104
*
104-
* @var \SMW\Query\Result\ResultArray $rows
105+
* @var ResultArray $rows
105106
*/
106107
while ( $rows = $result->getNext() ) {
107108

108109
/**
109-
* @var \SMW\Query\Result\ResultArray $field
110+
* @var ResultArray $field
110111
* @var SMWDataValue $dataValue
111112
*/
112113
foreach ( $rows as $field ) {

formats/datatables/Api.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,14 @@
1212
namespace SRF\DataTables;
1313

1414
use ApiBase;
15-
use ParamProcessor\ParamDefinition;
15+
use ParamProcessor\ParamDefinitionFactory;
1616
use SMW\DataValueFactory;
1717
use SMW\DataValues\PropertyChainValue;
1818
use SMW\Query\PrintRequest;
1919
use SMW\Services\ServicesFactory;
2020
use SMWQuery;
2121
use SMWQueryProcessor;
22+
use SpecialVersion;
2223
use SRF\DataTables;
2324

2425
class Api extends ApiBase {
@@ -53,7 +54,7 @@ public function execute() {
5354
$printer = new Datatables( 'datatables', true );
5455

5556
// get defaults of parameters for the 'datatable' result format as array of ParamDefinition
56-
$paramDefinitions = ParamDefinition::getCleanDefinitions( $printer->getParamDefinitions( [] ) );
57+
$paramDefinitions = ParamDefinitionFactory::newDefault()->newDefinitionsFromArrays( $printer->getParamDefinitions( [] ) );
5758

5859
// transform into normal key-value array
5960
$parameters = [];

formats/datatables/DataTables.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,12 @@
1717
use SMW\DataValues\PropertyValue;
1818
use SMW\DIWikiPage;
1919
use SMW\Localizer\Message;
20+
use SMW\Parser\RecursiveTextProcessor;
2021
use SMW\Query\PrintRequest;
2122
use SMW\Query\QueryResult;
2223
use SMW\Query\ResultPrinters\ResultPrinter;
2324
use SMW\Utils\HtmlTable;
25+
use SMWDIBlob as DIBlob;
2426
use SRF\DataTables\SearchPanes;
2527

2628
class DataTables extends ResultPrinter {

formats/datatables/SearchPanes.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ private function getPanesOptions( $printRequest, $canonicalLabel, $searchPanesOp
142142
$qobj = $querySegmentList[$rootid];
143143

144144
$property = new DIProperty( DIProperty::newFromUserLabel( $printRequest->getCanonicalLabel() ) );
145-
$propTypeid = $property->findPropertyTypeID();
145+
$propTypeid = $property->findPropertyValueType();
146146

147147
if ( $isCategory ) {
148148

@@ -305,7 +305,7 @@ private function getPanesOptions( $printRequest, $canonicalLabel, $searchPanesOp
305305
}
306306

307307
// @see ByGroupPropertyValuesLookup
308-
$diType = DataTypeRegistry::getInstance()->getDataItemId(
308+
$diType = DataTypeRegistry::getInstance()->getDataItemByType(
309309
$propTypeid
310310
);
311311

src/Graph/GraphPrinter.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
use MediaWiki\MediaWikiServices;
77
use SMW\Query\PrintRequest;
88
use SMW\Query\QueryResult;
9-
use SMW\Query\Result\ResultArray;
109
use SMW\Query\ResultPrinters\ResultPrinter;
1110

1211
/**

0 commit comments

Comments
 (0)