Completed
Push — master ( 5a341e...263060 )
by Josh
18:25
created

BlockElementsFosterFormattingElements   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 10
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1
Metric Value
wmc 5
lcom 0
cbo 1
dl 0
loc 10
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
B generateTargetedRules() 0 4 5
1
<?php
2
3
/**
4
* @package   s9e\TextFormatter
5
* @copyright Copyright (c) 2010-2016 The s9e Authors
6
* @license   http://www.opensource.org/licenses/mit-license.php The MIT License
7
*/
8
namespace s9e\TextFormatter\Configurator\RulesGenerators;
9
10
use s9e\TextFormatter\Configurator\Helpers\TemplateForensics;
11
use s9e\TextFormatter\Configurator\RulesGenerators\Interfaces\TargetedRulesGenerator;
12
13
class BlockElementsFosterFormattingElements implements TargetedRulesGenerator
14
{
15
	/**
16
	* {@inheritdoc}
17
	*/
18
	public function generateTargetedRules(TemplateForensics $src, TemplateForensics $trg)
19
	{
20
		return ($src->isBlock() && $trg->isFormattingElement() && !$src->isEmpty() && !$src->isVoid()) ? ['fosterParent'] : [];
21
	}
22
}