Showing 318 of 14,363 total issues
Method transform
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function transform($contentType, array $params = array())
{
if (!$contentType instanceof ContentTypeInterface) {
throw new TransformerParameterTypeException();
}
- Create a ticketCreate a ticket
Method getConfigTreeBuilder
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getConfigTreeBuilder()
{
$treeBuilder = new TreeBuilder();
$rootNode = $treeBuilder->root('open_orchestra_api');
- Create a ticketCreate a ticket
Method transform
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function transform($content, array $params = array())
{
if (!$content instanceof ContentInterface) {
throw new TransformerParameterTypeException();
}
- Create a ticketCreate a ticket
Method testConfigureOptions
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function testConfigureOptions()
{
$resolver = Phake::mock('Symfony\Component\OptionsResolver\OptionsResolver');
$this->form->configureOptions($resolver);
- Create a ticketCreate a ticket
Method testConfigureOptions
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function testConfigureOptions()
{
$resolver = Phake::mock('Symfony\Component\OptionsResolver\OptionsResolver');
$this->form->configureOptions($resolver);
- Create a ticketCreate a ticket
Method getBadRoles
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function getBadRoles()
{
$actions = array(
'Read' => ContributionActionInterface::READ,
'Edit' => ContributionActionInterface::EDIT,
- Create a ticketCreate a ticket
Method addWorkflowProfile
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function addWorkflowProfile(GroupFormEvent $event)
{
$builder = $event->getBuilder();
$group = $builder->getData();
$configuration = array();
- Create a ticketCreate a ticket
Method changeStatusAction
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function changeStatusAction(Request $request, $saveOldPublishedVersion)
{
$facade = $this->get('jms_serializer')->deserialize(
$request->getContent(),
'OpenOrchestra\ApiBundle\Facade\NodeFacade',
- Create a ticketCreate a ticket
Method testUpdatePath
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function testUpdatePath()
{
$nodeId = 'node';
$path = 'path';
$parentNodeId = 'parent';
- Create a ticketCreate a ticket
Method testConfigureOptions
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function testConfigureOptions()
{
$resolverMock = Phake::mock('Symfony\Component\OptionsResolver\OptionsResolver');
$this->form->configureOptions($resolverMock);
- Create a ticketCreate a ticket
Method buildForm
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function buildForm(FormBuilderInterface $builder, array $options)
{
$builder->add('nodeId', 'text', array(
'group_id' => 'data',
'sub_group_id' => 'content',
- Create a ticketCreate a ticket
Method getNotSupportedSubjects
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function getNotSupportedSubjects()
{
$content = $this->createPhakeContent();
$trashItem = $this->createPhakeTrashItem();
$site = $this->createPhakeSite();
- Create a ticketCreate a ticket
Method buildForm
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function buildForm(FormBuilderInterface $builder, array $options)
{
$builder
->add('labels', 'oo_multi_languages', array(
'label' => 'open_orchestra_group.form.group.label',
- Create a ticketCreate a ticket
Method getNotSupportedSubjects
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function getNotSupportedSubjects()
{
$node = $this->createPhakeNode();
$content = $this->createPhakeContent();
$site = $this->createPhakeSite();
- Create a ticketCreate a ticket
Function reverseTransform
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
public function reverseTransform($groups)
{
$value = new ArrayCollection();
if (is_array($groups) && array_key_exists('groups_collection', $groups)) {
$groups = $groups['groups_collection'];
- Read upRead up
- Create a ticketCreate a ticket
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function preSubmit
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
public function preSubmit(FormEvent $event)
{
$form = $event->getForm();
$data = $form->getData();
- Read upRead up
- Create a ticketCreate a ticket
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function transform
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
public function transform($value)
{
$result = array();
$workflowProfiles = $this->workflowProfileRepository->findAll();
$contentTypes = $this->contentTypeRepository->findAllNotDeletedInLastVersion();
- Read upRead up
- Create a ticketCreate a ticket
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method addMainAttributes
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function addMainAttributes(FacadeInterface $facade, NodeInterface $node)
{
if ($site = $this->siteRepository->findOneBySiteId($node->getSiteId())) {
$facade->templateSet = $site->getTemplateSet();
}
- Create a ticketCreate a ticket
Method testBuildView
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function testBuildView()
{
$resolvedFormType = Phake::mock('Symfony\Component\Form\ResolvedFormTypeInterface');
Phake::when($resolvedFormType)->getName()->thenReturn('collection');
- Create a ticketCreate a ticket
Function getColumnsDefinition
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
getColumnsDefinition() {
let columnsDefinition = [];
if (this._collection.length > 1) {
columnsDefinition.push(this._getColumnsDefinitionDeleteCheckbox());
}
- Create a ticketCreate a ticket