for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace keeko\tools\generator\action;
use gossi\codegen\model\AbstractPhpStruct;
use gossi\codegen\model\PhpTrait;
use keeko\framework\schema\ActionSchema;
use gossi\codegen\model\PhpClass;
class AbstractModelActionGenerator extends AbstractActionGenerator {
/**
* Generates an action trait with the given name as classname
*
* @param string $name
$name
This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.
Consider the following example. The parameter $italy is not defined by the method finale(...).
$italy
finale(...)
/** * @param array $germany * @param array $island * @param array $italy */ function finale($germany, $island) { return "2:1"; }
The most likely cause is that the parameter was removed, but the annotation was not.
* @param ActionSchema $action
* @return PhpTrait
*/
public function generate(ActionSchema $action) {
$class = PhpClass::create($action->getClass())
->setDescription('Action Class for ' . $action->getName())
->setLongDescription('This code is automatically created. Modifications will probably be overwritten.');
$this->ensureBasicSetup($class);
$this->addMethods($class, $action);
return $class;
}
protected function addMethods(PhpClass $struct, ActionSchema $action) {
protected function ensureUseStatements(AbstractPhpStruct $struct) {
parent::ensureUseStatements($struct);
This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.
Consider the following example. The parameter
$italy
is not defined by the methodfinale(...)
.The most likely cause is that the parameter was removed, but the annotation was not.