@@ -18,18 +18,18 @@ discard block |
||
| 18 | 18 | * |
| 19 | 19 | * @return self |
| 20 | 20 | */ |
| 21 | - public static function withTagName( $tagName ) { |
|
| 22 | - return new static( Util::wrapValueWithIsEqual( $tagName ) ); |
|
| 21 | + public static function withTagName($tagName) { |
|
| 22 | + return new static(Util::wrapValueWithIsEqual($tagName)); |
|
| 23 | 23 | } |
| 24 | 24 | |
| 25 | - public function __construct( Matcher $tagNameMatcher ) { |
|
| 25 | + public function __construct(Matcher $tagNameMatcher) { |
|
| 26 | 26 | parent::__construct(); |
| 27 | 27 | $this->tagNameMatcher = $tagNameMatcher; |
| 28 | 28 | } |
| 29 | 29 | |
| 30 | - public function describeTo( Description $description ) { |
|
| 31 | - $description->appendText( 'with tag name ' ) |
|
| 32 | - ->appendDescriptionOf( $this->tagNameMatcher ); |
|
| 30 | + public function describeTo(Description $description) { |
|
| 31 | + $description->appendText('with tag name ') |
|
| 32 | + ->appendDescriptionOf($this->tagNameMatcher); |
|
| 33 | 33 | } |
| 34 | 34 | |
| 35 | 35 | /** |
@@ -38,10 +38,10 @@ discard block |
||
| 38 | 38 | * |
| 39 | 39 | * @return bool |
| 40 | 40 | */ |
| 41 | - protected function matchesSafelyWithDiagnosticDescription( $item, Description $mismatchDescription ) { |
|
| 42 | - $mismatchDescription->appendText( 'tag name ' ); |
|
| 43 | - $this->tagNameMatcher->describeMismatch( $item->tagName, $mismatchDescription ); |
|
| 44 | - return $this->tagNameMatcher->matches( $item->tagName ); |
|
| 41 | + protected function matchesSafelyWithDiagnosticDescription($item, Description $mismatchDescription) { |
|
| 42 | + $mismatchDescription->appendText('tag name '); |
|
| 43 | + $this->tagNameMatcher->describeMismatch($item->tagName, $mismatchDescription); |
|
| 44 | + return $this->tagNameMatcher->matches($item->tagName); |
|
| 45 | 45 | } |
| 46 | 46 | |
| 47 | 47 | } |
@@ -18,17 +18,17 @@ discard block |
||
| 18 | 18 | * |
| 19 | 19 | * @return self |
| 20 | 20 | */ |
| 21 | - public static function havingTextContents( $text ) { |
|
| 22 | - return new static( Util::wrapValueWithIsEqual( $text ) ); |
|
| 21 | + public static function havingTextContents($text) { |
|
| 22 | + return new static(Util::wrapValueWithIsEqual($text)); |
|
| 23 | 23 | } |
| 24 | 24 | |
| 25 | - public function __construct( Matcher $matcher ) { |
|
| 25 | + public function __construct(Matcher $matcher) { |
|
| 26 | 26 | parent::__construct(); |
| 27 | 27 | $this->matcher = $matcher; |
| 28 | 28 | } |
| 29 | 29 | |
| 30 | - public function describeTo( Description $description ) { |
|
| 31 | - $description->appendText( 'having text contents ' )->appendDescriptionOf( $this->matcher ); |
|
| 30 | + public function describeTo(Description $description) { |
|
| 31 | + $description->appendText('having text contents ')->appendDescriptionOf($this->matcher); |
|
| 32 | 32 | } |
| 33 | 33 | |
| 34 | 34 | /** |
@@ -37,8 +37,8 @@ discard block |
||
| 37 | 37 | * |
| 38 | 38 | * @return bool |
| 39 | 39 | */ |
| 40 | - protected function matchesSafelyWithDiagnosticDescription( $item, Description $mismatchDescription ) { |
|
| 41 | - return $this->matcher->matches( $item->textContent ); |
|
| 40 | + protected function matchesSafelyWithDiagnosticDescription($item, Description $mismatchDescription) { |
|
| 41 | + return $this->matcher->matches($item->textContent); |
|
| 42 | 42 | } |
| 43 | 43 | |
| 44 | 44 | } |