From 12818d952ea3c50634e4996ba5571befa6e71a40 Mon Sep 17 00:00:00 2001 From: PBX_g33k Date: Sat, 12 May 2018 14:19:49 +0200 Subject: [PATCH] ignore coverage for test code --- src/Command/BaseCommand.php | 8 ++++++++ src/DependencyInjection/Configuration.php | 7 +++++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/src/Command/BaseCommand.php b/src/Command/BaseCommand.php index e0f615c..9026040 100644 --- a/src/Command/BaseCommand.php +++ b/src/Command/BaseCommand.php @@ -31,6 +31,7 @@ abstract protected function initializeService(); protected function configure() { + // @codeCoverageIgnoreStart if (!$this->infoService) { $this->initializeService(); } @@ -41,15 +42,18 @@ protected function configure() ->addOption('debug', 'd', InputOption::VALUE_NONE, 'Enables debug mode'); parent::configure(); + // @codeCoverageIgnoreEnd } protected function initialize(InputInterface $input, OutputInterface $output) { + // @codeCoverageIgnoreStart if ($input->getOption('debug')) { Debug::enable(); } parent::initialize($input, $output); + // @codeCoverageIgnoreEnd } /** @@ -60,6 +64,7 @@ protected function initialize(InputInterface $input, OutputInterface $output) */ protected function generateTableForSearchResult($collection, $columns, Table $table) { + // @codeCoverageIgnoreStart $table->setHeaders(array_values($columns)); foreach ($collection as $service => $serviceResult) { @@ -67,6 +72,7 @@ protected function generateTableForSearchResult($collection, $columns, Table $ta } return $table; + // @codeCoverageIgnoreEnd } /** @@ -77,6 +83,7 @@ protected function generateTableForSearchResult($collection, $columns, Table $ta */ protected function generateTableRows($collection, $columns, Table $table) { + // @codeCoverageIgnoreStart foreach ($collection as $item) { $row = []; @@ -88,5 +95,6 @@ protected function generateTableRows($collection, $columns, Table $table) } return $table; + // @codeCoverageIgnoreEnd } } \ No newline at end of file diff --git a/src/DependencyInjection/Configuration.php b/src/DependencyInjection/Configuration.php index 0e4eae4..aaecd58 100644 --- a/src/DependencyInjection/Configuration.php +++ b/src/DependencyInjection/Configuration.php @@ -7,6 +7,7 @@ class Configuration implements ConfigurationInterface { + /** * Generates the configuration tree builder. * @@ -14,14 +15,16 @@ class Configuration implements ConfigurationInterface */ public function getConfigTreeBuilder() { + // @codeCoverageIgnoreStart throw new InvalidConfigurationException("You must override getConfigTreeBuilder and call buildConfigTreeBuilder"); + // @codeCoverageIgnoreEnd } protected function buildConfigTreeBuilder(TreeBuilder $treeBuilder, $rootName) { + // @codeCoverageIgnoreStart $rootNode = $treeBuilder->root($rootName); - // @codingStandardsIgnoreStart $rootNode ->children() ->booleanNode('init_services')->defaultTrue()->end() @@ -44,7 +47,7 @@ protected function buildConfigTreeBuilder(TreeBuilder $treeBuilder, $rootName) ->end() ; - // @codingStandardsIgnoreEnd return $treeBuilder; + // @codeCoverageIgnoreEnd } } \ No newline at end of file