Code `Hamcrest\Matcher` should be replaced with `\Hamcrest\Matcher`, otherwise within `Hamcrest\Core` namespace it won't be recognized.