Completed
Push — master ( bbdfc2...ebac7c )
by Thomas
05:30
created

ApiPaginateOperationGenerator::generateParams()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 3
rs 10
cc 1
eloc 1
nc 1
nop 2
1
<?php
2
namespace keeko\tools\generator\api;
3
4
use gossi\swagger\collections\Parameters;
5
use Propel\Generator\Model\Table;
6
use gossi\swagger\collections\Responses;
7
use keeko\framework\utils\NameUtils;
8
9
class ApiPaginateOperationGenerator extends ApiCrudOperationGenerator {
10
11
	protected function generateParams(Parameters $params, Table $model) {
12
13
	}
14
15
	protected function generateResponses(Responses $responses, Table $model) {
16
		$ok = $responses->get('200');
17
		$ok->setDescription(sprintf('Array of %s', NameUtils::pluralize($model->getOriginCommonName())));
18
		$ok->getSchema()->setRef('#/definitions/' . 'Paged' . NameUtils::pluralize($model->getPhpName()));
19
	}
20
}