open-orchestra/open-orchestra-cms-bundle

View on GitHub

Showing 318 of 14,363 total issues

Method buildForm has 30 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function buildForm(FormBuilderInterface $builder, array $options)
    {
        $builder
            ->add('name', 'text', array(
                'label'    => 'open_orchestra_workflow_admin.form.status.name',
Severity: Minor
Found in Workflow/Form/Type/StatusType.php - About 1 hr to fix

Method getNotSupportedSubjects has 30 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    protected function getNotSupportedSubjects()
    {
        $node = $this->createPhakeNode();
        $trashItem = $this->createPhakeTrashItem();
        $site = $this->createPhakeSite();
Severity: Minor
Found in Backoffice/Tests/Security/Authorization/Voter/ContentVoterTest.php - About 1 hr to fix

Method buildForm has 30 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function buildForm(FormBuilderInterface $builder, array $options)
    {
        $configuration = array();
        $maxColumns = 0;

Severity: Minor
Found in GroupBundle/Form/Type/GroupRoleType.php - About 1 hr to fix

Method onPreSetData has 30 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function onPreSetData(FormEvent $event)
    {
        $form = $event->getForm();
        $data = $event->getData();
        $disabled = null !== $data->getSiteId();
Severity: Minor
Found in Backoffice/EventSubscriber/WebSiteNodeTemplateSubscriber.php - About 1 hr to fix

Function render has 29 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    render() {
        let content = this._collection.first();
        if (typeof content === 'undefined') {
            throw new ApplicationError('A content should have at least one version')
        }

Function getColumnsDefinition has 29 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    getColumnsDefinition() {
        return [
            {
                name: 'name',
                title: Translator.trans('open_orchestra_backoffice.table.node.title'),

Function manageVersionsNode has 29 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    manageVersionsNode(nodeId, language, page) {
        if (null === page) {
            page = 1
        }
        page = Number(page) - 1;

Method updateBlockPositionAction has 29 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function updateBlockPositionAction(Request $request, $nodeId, $language, $version, $siteId)
    {
        $node = $this->findOneNode($nodeId, $language, $siteId, $version);
        if (!$node instanceof NodeInterface) {
            throw new NodeNotFoundHttpException();
Severity: Minor
Found in ApiBundle/Controller/NodeController.php - About 1 hr to fix

Method testSubscribingMethods has 29 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function testSubscribingMethods()
    {
        $this->assertSame(
            array(
                array(
Severity: Minor
Found in ApiBundle/Tests/Handler/ContentAttributeValueHandlerTest.php - About 1 hr to fix

Method generateRoutesForRedirection has 29 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    protected function generateRoutesForRedirection(RedirectionInterface $redirection, ReadSiteInterface $site)
    {
        $routes = array();

        $node = $this->getNodeForRedirection($redirection);
Severity: Minor
Found in Backoffice/Manager/RouteDocumentManager.php - About 1 hr to fix

Method preSetData has 29 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function preSetData(FormEvent $event)
    {
        $form = $event->getForm();
        $data = $event->getData();
        if (null === $data->getId()) {
Severity: Minor
Found in Backoffice/EventSubscriber/NodeTemplateSelectionSubscriber.php - About 1 hr to fix

Method buildForm has 29 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function buildForm(FormBuilderInterface $builder, array $options)
    {
        $newAttr = array();
        if (!is_null($options['authorize_new'])) {
            $newAttr['data-authorize-new'] = $options['authorize_new'];
Severity: Minor
Found in Backoffice/Form/Type/Component/ContentSearchType.php - About 1 hr to fix

Method getNotSupportedSubjects has 29 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    protected function getNotSupportedSubjects()
    {
        $node = $this->createPhakeNode();
        $content = $this->createPhakeContent();
        $trashItem = $this->createPhakeTrashItem();

Method testAddWorkflowProfile has 29 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function testAddWorkflowProfile()
    {
        $event = Phake::mock('OpenOrchestra\GroupBundle\Event\GroupFormEvent');
        $builder = Phake::mock('Symfony\Component\Form\FormBuilderInterface');
        $group = Phake::mock('OpenOrchestra\Backoffice\Model\GroupInterface');

Method testPreSetData has 28 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function testPreSetData($siteId, $disabled)
    {
        $templateSetChoices = array(
            'fakeTemplateSet' => 'fakeTemplateSet'
        );

Function _renderContentActionToolbar has 28 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    _renderContentActionToolbar($selector) {
        this._displayLoader($selector);

        let statuses = new Statuses();
        let contentVersions = new Contents();

Method testSubmitWithNoExistingData has 28 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function testSubmitWithNoExistingData()
    {
        $name = 'name';
        $status = 'status';
        $language = 'fr';
Severity: Minor
Found in Backoffice/Tests/EventSubscriber/ContentTypeSubscriberTest.php - About 1 hr to fix

Function _errorCallbackEdit has 28 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    _errorCallbackEdit(contentTypeId, contentId, language) {
        let noCallback = () => {
            let url = Backbone.history.generateUrl('listContent',{
                contentTypeId: contentTypeId,
                language: language

Method generateRoutesForNode has 28 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    protected function generateRoutesForNode(NodeInterface $node, ReadSiteInterface $site, array $routePattern)
    {
        $routes = array();

        if (!$node instanceof NodeInterface) {
Severity: Minor
Found in Backoffice/Manager/RouteDocumentManager.php - About 1 hr to fix

Method reverseTransform has 28 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function reverseTransform($value)
    {
        $result = new ArrayCollection();
        if (is_array($value)) {
            foreach ($value as $type => $perimeters) {
Severity: Minor
Found in GroupBundle/Form/DataTransformer/GroupPerimeterTransformer.php - About 1 hr to fix
Severity
Category
Status
Source
Language