WorkflowAdminBundle/Transformer/WorkflowProfileTransformer.php
Avoid unused parameters such as '$params'. Open
Open
public function reverseTransform(FacadeInterface $facade, array $params = array())
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
UnusedFormalParameter
Since: 0.2
Avoid passing parameters to methods or constructors and then not using those parameters.
Example
class Foo
{
private function bar($howdy)
{
// $howdy is not used
}
}
Source https://phpmd.org/rules/unusedcode.html#unusedformalparameter
Avoid unused parameters such as '$params'. Open
Open
public function transform($workflowProfile, array $params = array())
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
UnusedFormalParameter
Since: 0.2
Avoid passing parameters to methods or constructors and then not using those parameters.
Example
class Foo
{
private function bar($howdy)
{
// $howdy is not used
}
}
Source https://phpmd.org/rules/unusedcode.html#unusedformalparameter
Checking instanceof against undeclared class \OpenOrchestra\ModelInterface\Model\WorkflowProfileInterface
Open
Open
if (!$workflowProfile instanceof WorkflowProfileInterface) {
- Create a ticketCreate a ticket
- Exclude checks
Call to method __construct
from undeclared class \OpenOrchestra\BaseApi\Exceptions\TransformerParameterTypeException
Open
Open
throw new TransformerParameterTypeException();
- Create a ticketCreate a ticket
- Exclude checks
Call to undeclared method \OpenOrchestra\WorkflowAdminBundle\Transformer\WorkflowProfileTransformer::newFacade
Open
Open
$facade = $this->newFacade();
- Create a ticketCreate a ticket
- Exclude checks
Call to method choose
from undeclared class \OpenOrchestra\ModelInterface\Manager\MultiLanguagesChoiceManagerInterface
Open
Open
$facade->description = $this->multiLanguagesChoiceManager->choose($workflowProfile->getDescriptions());
- Create a ticketCreate a ticket
- Exclude checks
Parameter $facade
has undeclared type \OpenOrchestra\BaseApi\Facade\FacadeInterface
Open
Open
public function reverseTransform(FacadeInterface $facade, array $params = array())
- Create a ticketCreate a ticket
- Exclude checks
Parameter $workflowProfile
has undeclared type \OpenOrchestra\ModelInterface\Model\WorkflowProfileInterface
Open
Open
public function transform($workflowProfile, array $params = array())
- Create a ticketCreate a ticket
- Exclude checks
Call to method getLabels
from undeclared class \OpenOrchestra\ModelInterface\Model\WorkflowProfileInterface
Open
Open
$facade->label = $this->multiLanguagesChoiceManager->choose($workflowProfile->getLabels());
- Create a ticketCreate a ticket
- Exclude checks
Return type of reverseTransform()
is undeclared type \OpenOrchestra\ModelInterface\Model\WorkflowProfileInterface
Open
Open
public function reverseTransform(FacadeInterface $facade, array $params = array())
- Create a ticketCreate a ticket
- Exclude checks
Call to method find
from undeclared class \OpenOrchestra\ModelInterface\Repository\WorkflowProfileRepositoryInterface
Open
Open
return $this->workflowProfileRepository->find($facade->id);
- Create a ticketCreate a ticket
- Exclude checks
Reference to undeclared class \OpenOrchestra\BaseApi\Transformer\AbstractSecurityCheckerAwareTransformer
Open
Open
parent::__construct($facadeClass, $authorizationChecker);
- Create a ticketCreate a ticket
- Exclude checks
Parameter $multiLanguagesChoiceManager
has undeclared type \OpenOrchestra\ModelInterface\Manager\MultiLanguagesChoiceManagerInterface
Open
Open
public function __construct(
- Create a ticketCreate a ticket
- Exclude checks
Class extends undeclared class \OpenOrchestra\BaseApi\Transformer\AbstractSecurityCheckerAwareTransformer
Open
Open
class WorkflowProfileTransformer extends AbstractSecurityCheckerAwareTransformer
- Create a ticketCreate a ticket
- Exclude checks
Parameter $workflowProfileRepository
has undeclared type \OpenOrchestra\ModelInterface\Repository\WorkflowProfileRepositoryInterface
Open
Open
public function __construct(
- Create a ticketCreate a ticket
- Exclude checks
Call to method getId
from undeclared class \OpenOrchestra\ModelInterface\Model\WorkflowProfileInterface
Open
Open
$facade->id = $workflowProfile->getId();
- Create a ticketCreate a ticket
- Exclude checks
Call to method choose
from undeclared class \OpenOrchestra\ModelInterface\Manager\MultiLanguagesChoiceManagerInterface
Open
Open
$facade->label = $this->multiLanguagesChoiceManager->choose($workflowProfile->getLabels());
- Create a ticketCreate a ticket
- Exclude checks
Call to method getTransitions
from undeclared class \OpenOrchestra\ModelInterface\Model\WorkflowProfileInterface
Open
Open
foreach ($workflowProfile->getTransitions() as $transition) {
- Create a ticketCreate a ticket
- Exclude checks
Call to method getDescriptions
from undeclared class \OpenOrchestra\ModelInterface\Model\WorkflowProfileInterface
Open
Open
$facade->description = $this->multiLanguagesChoiceManager->choose($workflowProfile->getDescriptions());
- Create a ticketCreate a ticket
- Exclude checks
Call to undeclared method \OpenOrchestra\WorkflowAdminBundle\Transformer\WorkflowProfileTransformer::hasGroup
Open
Open
if ($this->hasGroup(CMSGroupContext::AUTHORIZATIONS)) {
- Create a ticketCreate a ticket
- Exclude checks
Reference to instance property id
from undeclared class \OpenOrchestra\BaseApi\Facade\FacadeInterface
Open
Open
return $this->workflowProfileRepository->find($facade->id);
- Create a ticketCreate a ticket
- Exclude checks
Reference to undeclared property \OpenOrchestra\WorkflowAdminBundle\Transformer\WorkflowProfileTransformer->authorizationChecker
Open
Open
$canDelete = $this->authorizationChecker->isGranted(ContributionActionInterface::DELETE, $workflowProfile);
- Create a ticketCreate a ticket
- Exclude checks
Reference to instance property id
from undeclared class \OpenOrchestra\BaseApi\Facade\FacadeInterface
Open
Open
if (null !== $facade->id) {
- Create a ticketCreate a ticket
- Exclude checks
Parameter $authorizationChecker
has undeclared type \Symfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface
Open
Open
public function __construct(
- Create a ticketCreate a ticket
- Exclude checks
Return type of transform()
is undeclared type \OpenOrchestra\BaseApi\Facade\FacadeInterface
Open
Open
public function transform($workflowProfile, array $params = array())
- Create a ticketCreate a ticket
- Exclude checks
@throws type of transform
has undeclared type \OpenOrchestra\BaseApi\Exceptions\TransformerParameterTypeException
Open
Open
public function transform($workflowProfile, array $params = array())
- Create a ticketCreate a ticket
- Exclude checks
Call to undeclared method \OpenOrchestra\WorkflowAdminBundle\Transformer\WorkflowProfileTransformer::getTransformer
Open
Open
$facade->addTransition($this->getTransformer('workflow_transition')->transform($transition));
- Create a ticketCreate a ticket
- Exclude checks
Avoid excessively long variable names like $multiLanguagesChoiceManager. Keep variable name length under 20. Open
Open
MultiLanguagesChoiceManagerInterface $multiLanguagesChoiceManager,
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
LongVariable
Since: 0.2
Detects when a field, formal or local variable is declared with a long name.
Example
class Something {
protected $reallyLongIntName = -3; // VIOLATION - Field
public static function main( array $interestingArgumentsList[] ) { // VIOLATION - Formal
$otherReallyLongName = -5; // VIOLATION - Local
for ($interestingIntIndex = 0; // VIOLATION - For
$interestingIntIndex < 10;
$interestingIntIndex++ ) {
}
}
}
Source https://phpmd.org/rules/naming.html#longvariable
Avoid excessively long variable names like $workflowProfileRepository. Keep variable name length under 20. Open
Open
WorkflowProfileRepositoryInterface $workflowProfileRepository
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
LongVariable
Since: 0.2
Detects when a field, formal or local variable is declared with a long name.
Example
class Something {
protected $reallyLongIntName = -3; // VIOLATION - Field
public static function main( array $interestingArgumentsList[] ) { // VIOLATION - Formal
$otherReallyLongName = -5; // VIOLATION - Local
for ($interestingIntIndex = 0; // VIOLATION - For
$interestingIntIndex < 10;
$interestingIntIndex++ ) {
}
}
}
Source https://phpmd.org/rules/naming.html#longvariable
Avoid excessively long variable names like $multiLanguagesChoiceManager. Keep variable name length under 20. Open
Open
protected $multiLanguagesChoiceManager;
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
LongVariable
Since: 0.2
Detects when a field, formal or local variable is declared with a long name.
Example
class Something {
protected $reallyLongIntName = -3; // VIOLATION - Field
public static function main( array $interestingArgumentsList[] ) { // VIOLATION - Formal
$otherReallyLongName = -5; // VIOLATION - Local
for ($interestingIntIndex = 0; // VIOLATION - For
$interestingIntIndex < 10;
$interestingIntIndex++ ) {
}
}
}
Source https://phpmd.org/rules/naming.html#longvariable
Avoid excessively long variable names like $workflowProfileRepository. Keep variable name length under 20. Open
Open
protected $workflowProfileRepository;
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
LongVariable
Since: 0.2
Detects when a field, formal or local variable is declared with a long name.
Example
class Something {
protected $reallyLongIntName = -3; // VIOLATION - Field
public static function main( array $interestingArgumentsList[] ) { // VIOLATION - Formal
$otherReallyLongName = -5; // VIOLATION - Local
for ($interestingIntIndex = 0; // VIOLATION - For
$interestingIntIndex < 10;
$interestingIntIndex++ ) {
}
}
}