Code Duplication    Length = 6-7 lines in 2 locations

src/Hook/PseudoMatcher.php 2 locations

@@ 105-111 (lines=7) @@
102
	}
103
104
	public function attr() {
105
		foreach ($this->pseudo as $pseudo) {
106
			if (strpos($pseudo, 'attr') === 0) {
107
				$bracketMatcher = new \Transphporm\Parser\BracketMatcher($pseudo);
108
				$criteria = trim($bracketMatcher->match('(', ')'));
109
				return $criteria;
110
			}
111
		}
112
113
		return false;
114
	}
@@ 118-123 (lines=6) @@
115
116
	public function header($element)  {
117
		if ($this->matches($element)) {
118
			foreach ($this->pseudo as $pseudo) {
119
				if (strpos($pseudo, 'header') === 0) {
120
					$bracketMatcher = new \Transphporm\Parser\BracketMatcher($pseudo);
121
					return $bracketMatcher->match('[', ']');
122
				}
123
			}
124
		}
125
	}
126