Skip to content

Commit

Permalink
remove annotation reader from matcher
Browse files Browse the repository at this point in the history
  • Loading branch information
koriym committed Aug 14, 2014
1 parent 0986014 commit 39c4a5c
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 17 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ Finally, we configure everything. In this case we match any class, but only the
```php
<?php
$bind = new Bind;
$matcher = new Matcher(new Reader);
$matcher = new Matcher;
$interceptors = [new WeekendBlocker];
$pointcut = new Pointcut(
$matcher->any(),
Expand Down
16 changes: 0 additions & 16 deletions src/Matcher.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,27 +16,11 @@

class Matcher extends AbstractMatcher implements Matchable
{
/**
* Annotation reader
*
* @var Reader
*/
private static $annotationReader;

/**
* @var Reader
*/
protected $reader;

/**
* @param Reader $reader
*/
public function __construct(Reader $reader = null)
{
if (is_null(self::$annotationReader)) {
self::$annotationReader = $reader ?: new AnnotationReader;
}
$this->reader = self::$annotationReader;
}

/**
Expand Down

0 comments on commit 39c4a5c

Please sign in to comment.