open-orchestra/open-orchestra-cms-bundle

View on GitHub

Showing 318 of 14,363 total issues

Method getSubscribingMethods has 26 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public static function getSubscribingMethods()
    {
        return array(
            array(
                'direction' => GraphNavigator::DIRECTION_DESERIALIZATION,
Severity: Minor
Found in ApiBundle/Handler/ContentAttributeValueHandler.php - About 1 hr to fix

Method execute has 26 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    protected function execute(InputInterface $input, OutputInterface $output)
    {
        $io = new SymfonyStyle($input, $output);

        $siteRepository = $this->getContainer()->get('open_orchestra_model.repository.site');
Severity: Minor
Found in BackofficeBundle/Command/OrchestraDeleteSiteCommand.php - About 1 hr to fix

Method newAction has 26 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function newAction(Request $request)
    {
        /** @var ContentTypeInterface $contentType */
        $contentType = $this->get('open_orchestra_backoffice.manager.content_type')->initializeNewContentType();

Severity: Minor
Found in BackofficeBundle/Controller/ContentTypeController.php - About 1 hr to fix

Method testDisplayUsedReferences has 26 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function testDisplayUsedReferences()
    {
        $content = Phake::mock('OpenOrchestra\ModelInterface\Model\ContentInterface');
        $contentName = 'contentName';
        Phake::when($content)->getName()->thenReturn($contentName);
Severity: Minor
Found in Backoffice/Tests/Command/OrchestraDeleteSiteToolsTest.php - About 1 hr to fix

Function format has 26 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    format(value) {
        let getGeneralPattern = function (originPattern) {
            return new RegExp(originPattern
            .replace('d', '[0-9]{2}')
            .replace('Y', '[0-9]{4}')

Function listStatus has 26 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    listStatus(page) {
        if (null === page) {
            page = 1
        }
        this._displayLoader(Application.getRegion('content'));

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

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

Method provideFacadesConfig has 26 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function provideFacadesConfig()
    {
        return array(
            array('api_client', 'ApiClientFacade'),
            array('api_client_collection', 'ApiClientCollectionFacade'),

Method provideEvent has 26 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function provideEvent()
    {
        $event0 = Phake::mock('Symfony\Component\Form\FormEvent');
        $form0 = Phake::mock('Symfony\Component\Form\FormInterface');
        $contentType0 = Phake::mock('OpenOrchestra\ModelInterface\Model\ContentTypeInterface');

Function exports has 26 lines of code (exceeds 25 allowed). Consider refactoring.
Open

module.exports = function(grunt) {

    grunt.registerTask('template:compile', 'Open Orchestra task to find template underscore and compile it', function () {
        var config = grunt.config('application.config');

Severity: Minor
Found in GruntTasks/template_task.js - About 1 hr to fix

Method provideEditContent has 26 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function provideEditContent()
    {
        $status0 = Phake::mock('OpenOrchestra\ModelInterface\Model\StatusInterface');
        Phake::when($status0)->isBlockedEdition()->thenReturn(false);
        $content0 = Phake::mock('OpenOrchestra\ModelInterface\Model\ContentInterface');
Severity: Minor
Found in Backoffice/Tests/BusinessRules/Strategies/ContentStrategyTest.php - About 1 hr to fix

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

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

Function listContentType has 26 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    listContentType(page) {
        if (null === page) {
            page = 1
        }
        this._displayLoader(Application.getRegion('content'));

Method testResolver has 26 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function testResolver()
    {
        $this->form->configureOptions($this->resolver);

        Phake::verify($this->resolver)->setDefaults(
Severity: Minor
Found in Backoffice/Tests/Form/Type/FieldTypeTypeTest.php - About 1 hr to fix

Function _addSharedBlock has 26 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    _addSharedBlock(event) {
        let blockId = $(event.currentTarget).attr('data-block-id');
        let block = this._blocks.findWhere({'id': blockId});
        if (typeof block === 'undefined') {
            throw new ApplicationError('Block not found');

Method duplicateAction has 26 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function duplicateAction(Request $request)
    {
        $format = $request->get('_format', 'json');
        $facade = $this->get('jms_serializer')->deserialize(
            $request->getContent(),
Severity: Minor
Found in ApiBundle/Controller/ContentController.php - About 1 hr to fix

Method provideEntityAndKeywords has 26 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function provideEntityAndKeywords()
    {
        $nodeId = 'nodeId';
        $node = $this->createPhakeNode($nodeId);
        $contentId = 'contentId';

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

    public function preSetData(FormEvent $event)
    {
        $form = $event->getForm();
        $user = $event->getData();

Severity: Minor
Found in UserAdminBundle/EventSubscriber/UserProfilSubscriber.php - About 1 hr to fix

Method addFormType has 26 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    protected function addFormType(FormEvent $event)
    {
        $form = $event->getForm();
        $data = $event->getData();
        $event->setData($data);
Severity: Minor
Found in Backoffice/EventSubscriber/ContentSearchSubscriber.php - About 1 hr to fix

Method newAction has 26 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function newAction(Request $request)
    {
        $groupClass = $this->getParameter('open_orchestra_user.document.group.class');
        /** @var GroupInterface $group */
        $group = new $groupClass();
Severity: Minor
Found in GroupBundle/Controller/Admin/GroupController.php - About 1 hr to fix
Severity
Category
Status
Source
Language