📈 Add GlitchTip

Signed-off-by: Luke Tainton <luke@tainton.uk>
This commit was merged in pull request #16.
This commit is contained in:
2020-08-05 18:24:40 +01:00
committed by Luke Tainton
parent baeeca06cf
commit d5679a626d
548 changed files with 74474 additions and 4 deletions

View File

@@ -0,0 +1,35 @@
<?php
namespace Http\Message\RequestMatcher;
use Http\Message\RequestMatcher;
use Psr\Http\Message\RequestInterface;
/**
* Match a request with a callback.
*
* @author Márk Sági-Kazár <mark.sagikazar@gmail.com>
*/
final class CallbackRequestMatcher implements RequestMatcher
{
/**
* @var callable
*/
private $callback;
/**
* @param callable $callback
*/
public function __construct(callable $callback)
{
$this->callback = $callback;
}
/**
* {@inheritdoc}
*/
public function matches(RequestInterface $request)
{
return (bool) call_user_func($this->callback, $request);
}
}