Completed
Push — master ( f1c264...f58245 )
by Thomas
04:22
created

SkeletonJsonResponderGenerator::addMethods()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 6
rs 9.4285
cc 1
eloc 4
nc 1
nop 2
1
<?php
2
namespace keeko\tools\generator\responder;
3
4
use gossi\codegen\model\PhpClass;
5
use keeko\framework\schema\ActionSchema;
6
7
class SkeletonJsonResponderGenerator extends AbstractJsonResponderGenerator {
8
9
	protected function addMethods(PhpClass $class, ActionSchema $action) {
1 ignored issue
show
Unused Code introduced by
The parameter $action is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
10
		// method: run(Request $request, $data = null)
1 ignored issue
show
Unused Code Comprehensibility introduced by
38% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
11
		$class->addUseStatement('Tobscure\\JsonApi\\Resource');
12
		$class->addUseStatement('Tobscure\\JsonApi\\Document');
13
		$class->setMethod($this->generateRunMethod($this->twig->render('skeleton-run.twig')));
14
	}
15
}