src/Splitter.php
private function summarizeBlock($block)
	{
		$block = array(
			'rules' => is_array($block) ? $block : $this->splitIntoRules(trim($block)),
			'count' => 0
		);
		foreach ($block['rules'] as $key => $rule) {
			$block['rules'][$key] = array(
				'rule'  => $rule,
				'count' => $this->countSelectorsInRule($rule),
			);
			$block['count'] += $block['rules'][$key]['count'];
		}

		return $block;
	}
private function summarizeBlock($block)
	{
		$block = array(
			'rules' => is_array($block) ? $block : $this->splitIntoRules(trim($block)),
			'count' => 0
		);
		foreach ($block['rules'] as $key => $rule) {
			$block['rules'][$key] = array(
				'rule'  => $rule,
				'count' => $this->countSelectorsInRule($rule),
			);
			$block['count'] += $block['rules'][$key]['count'];
		}

		return $block;
	}
private function summarizeBlock ( $ block ) { $ block = array ( 'rules' => is_array ( $ block ) ? $ block : $ this -> splitIntoRules ( trim ( $ block ) ) , 'count' => 0 ) ; foreach ( $ block [ 'rules' ] as $ key => $ rule ) { $ block [ 'rules' ] [ $ key ] = array ( 'rule' => $ rule , 'count' => $ this -> countSelectorsInRule ( $ rule ) , ) ; $ block [ 'count' ] += $ block [ 'rules' ] [ $ key ] [ 'count' ] ; } return $ block ; }
Summarizes the block of CSS

This splits the block into it's css rules and then counts the selectors in the rule

@param $block
@return array Array(rules,count)
Summarizes the block of CSS