src/ConstructionKitBuildingBlocksDetector.php
protected function listChanges($existingConfig, array $blocks)
    {
        $existingBlocks = array();
        if (isset($existingConfig['c33s_construction_kit']['composer_building_blocks']) && is_array($existingConfig['c33s_construction_kit']['composer_building_blocks'])) {
            foreach ($existingConfig['c33s_construction_kit']['composer_building_blocks'] as $packageBlocks) {
                if (is_array($packageBlocks)) {
                    $existingBlocks = array_merge($existingBlocks, $packageBlocks);
                }
            }
        }

        $added = array_diff($blocks, $existingBlocks);
        $removed = array_diff($existingBlocks, $blocks);

        if (count($added)) {
            $this->event->getIO()->write('<info>[C33sConstructionKitBundle] Found new building blocks:</info>');
            $added = array_map(function ($block) {
                return '  - '.$block;
            }, $added);
            $this->event->getIO()->write($added);
        }

        if (count($removed)) {
            $this->event->getIO()->write('<info>[C33sConstructionKitBundle] The following building blocks have been removed:</info>');
            $removed = array_map(function ($block) {
                return '  - '.$block;
            }, $removed);
            $this->event->getIO()->write($removed);
        }
    }
protected function listChanges($existingConfig, array $blocks)
    {
        $existingBlocks = array();
        if (isset($existingConfig['c33s_construction_kit']['composer_building_blocks']) && is_array($existingConfig['c33s_construction_kit']['composer_building_blocks'])) {
            foreach ($existingConfig['c33s_construction_kit']['composer_building_blocks'] as $packageBlocks) {
                if (is_array($packageBlocks)) {
                    $existingBlocks = array_merge($existingBlocks, $packageBlocks);
                }
            }
        }

        $added = array_diff($blocks, $existingBlocks);
        $removed = array_diff($existingBlocks, $blocks);

        if (count($added)) {
            $this->event->getIO()->write('<info>[C33sConstructionKitBundle] Found new building blocks:</info>');
            $added = array_map(function ($block) {
                return '  - '.$block;
            }, $added);
            $this->event->getIO()->write($added);
        }

        if (count($removed)) {
            $this->event->getIO()->write('<info>[C33sConstructionKitBundle] The following building blocks have been removed:</info>');
            $removed = array_map(function ($block) {
                return '  - '.$block;
            }, $removed);
            $this->event->getIO()->write($removed);
        }
    }
protected function listChanges ( $ existingConfig , array $ blocks ) { $ existingBlocks = array ( ) ; if ( isset ( $ existingConfig [ 'c33s_construction_kit' ] [ 'composer_building_blocks' ] ) && is_array ( $ existingConfig [ 'c33s_construction_kit' ] [ 'composer_building_blocks' ] ) ) { foreach ( $ existingConfig [ 'c33s_construction_kit' ] [ 'composer_building_blocks' ] as $ packageBlocks ) { if ( is_array ( $ packageBlocks ) ) { $ existingBlocks = array_merge ( $ existingBlocks , $ packageBlocks ) ; } } } $ added = array_diff ( $ blocks , $ existingBlocks ) ; $ removed = array_diff ( $ existingBlocks , $ blocks ) ; if ( count ( $ added ) ) { $ this -> event -> getIO ( ) -> write ( '<info>[C33sConstructionKitBundle] Found new building blocks:</info>' ) ; $ added = array_map ( function ( $ block ) { return '  - ' . $ block ; } , $ added ) ; $ this -> event -> getIO ( ) -> write ( $ added ) ; } if ( count ( $ removed ) ) { $ this -> event -> getIO ( ) -> write ( '<info>[C33sConstructionKitBundle] The following building blocks have been removed:</info>' ) ; $ removed = array_map ( function ( $ block ) { return '  - ' . $ block ; } , $ removed ) ; $ this -> event -> getIO ( ) -> write ( $ removed ) ; } }
Display information regarding changed building blocks.

@param mixed $existingConfig
@param mixed $blocks
Display information regarding changed building blocks .