Actions
in package
Table of Contents
Properties
- $actions : mixed
- $generatedSteps : array<string|int, mixed>
- $methodTemplate : mixed
- $modules : mixed
- $name : mixed
- $numMethods : mixed
- $settings : mixed
- $template : mixed
Methods
- __construct() : mixed
- genHash() : mixed
- getNumMethods() : mixed
- produce() : mixed
- stringifyNamedType() : string
- addDoc() : string
- addMethod() : mixed
- getParamsString() : array<string|int, mixed>
- createReturnTypeHint() : mixed
- stringifyNamedTypes() : string
- stringifyType() : string
Properties
$actions
protected
mixed
$actions
$generatedSteps
protected
array<string|int, mixed>
$generatedSteps
= []
GeneratedStep[]
$methodTemplate
protected
mixed
$methodTemplate
= <<<EOF
/**
* [!] Method is generated. Documentation taken from corresponding module.
*
{{doc}}
* @see \\{{module}}::{{method}}()
*/
public function {{action}}({{params}}){{return_type}} {
{{return}}\$this->getScenario()->runStep(new \\Codeception\\Step\\{{step}}('{{method}}', func_get_args()));
}
EOF
$modules
protected
mixed
$modules
= []
$name
protected
mixed
$name
$numMethods
protected
mixed
$numMethods
= 0
$settings
protected
mixed
$settings
$template
protected
mixed
$template
= <<<EOF
<?php //[STAMP] {{hash}}
namespace {{namespace}}_generated;
// This class was automatically generated by build task
// You should not change it manually as it will be overwritten on next build
// @codingStandardsIgnoreFile
trait {{name}}Actions
{
/**
* @return \\Codeception\\Scenario
*/
abstract protected function getScenario();
{{methods}}
}
EOF
Methods
__construct()
public
__construct(mixed $settings) : mixed
Parameters
- $settings : mixed
genHash()
public
static genHash(mixed $modules, mixed $settings) : mixed
Parameters
- $modules : mixed
- $settings : mixed
getNumMethods()
public
getNumMethods() : mixed
produce()
public
produce() : mixed
stringifyNamedType()
public
static stringifyNamedType(ReflectionNamedType|ReflectionType $type, ReflectionClass $moduleClass) : string
Parameters
- $type : ReflectionNamedType|ReflectionType
- $moduleClass : ReflectionClass
Tags
Return values
stringaddDoc()
protected
addDoc(ReflectionClass $class, ReflectionMethod $refMethod) : string
Parameters
- $class : ReflectionClass
- $refMethod : ReflectionMethod
Return values
stringaddMethod()
protected
addMethod(ReflectionMethod $refMethod) : mixed
Parameters
- $refMethod : ReflectionMethod
getParamsString()
protected
getParamsString(ReflectionMethod $refMethod) : array<string|int, mixed>
Parameters
- $refMethod : ReflectionMethod
Return values
array<string|int, mixed>createReturnTypeHint()
private
createReturnTypeHint(ReflectionMethod $refMethod) : mixed
Parameters
- $refMethod : ReflectionMethod
stringifyNamedTypes()
private
stringifyNamedTypes(array<string|int, ReflectionNamedType|ReflectionType> $types, ReflectionClass $moduleClass, string $separator) : string
Parameters
- $types : array<string|int, ReflectionNamedType|ReflectionType>
- $moduleClass : ReflectionClass
- $separator : string
Return values
stringstringifyType()
private
stringifyType(ReflectionType $type, ReflectionClass $moduleClass) : string
Parameters
- $type : ReflectionType
- $moduleClass : ReflectionClass