Skip to content

Commit

Permalink
Declare type with imported namespaces
Browse files Browse the repository at this point in the history
  • Loading branch information
o0h committed Feb 27, 2018
1 parent 95296d9 commit b4096f0
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
5 changes: 3 additions & 2 deletions src/Error/SentryErrorHandlerTrait.php
Expand Up @@ -5,6 +5,7 @@
use Cake\Core\InstanceConfigTrait;
use Cake\Error\PHP7ErrorException;
use Cake\Log\Log;
use Connehito\CakeSentry\Http\Client;
use ErrorException;
use Exception;

Expand All @@ -22,7 +23,7 @@ trait SentryErrorHandlerTrait
*/
abstract protected function _getMessage(Exception $exception);

/* @var \Connehito\CakeSentry\Http\Client */
/* @var Client */
protected $client;

/**
Expand All @@ -42,7 +43,7 @@ protected function _logError($level, $data)
/**
* Handles exception logging.
*
* @param \Exception $exception Exception instance.
* @param Exception $exception Exception instance.
* @return bool
*/
protected function _logException(Exception $exception)
Expand Down
8 changes: 4 additions & 4 deletions src/Http/Client.php
Expand Up @@ -25,14 +25,14 @@ class Client
/* @var \Raven_Client */
protected $raven;

/* @var \Psr\Http\Message\ServerRequestInterface */
/* @var ServerRequestInterface */
protected $request;

/**
* Client constructor.
*
* @param array $config config for uses Sentry
* @param \Psr\Http\Message\ServerRequestInterface $request request context message
* @param ServerRequestInterface $request request context message
*/
public function __construct(array $config, ServerRequestInterface $request = null)
{
Expand All @@ -46,7 +46,7 @@ public function __construct(array $config, ServerRequestInterface $request = nul
/**
* Set context RequestMessage.
*
* @param null|\Psr\Http\Message\ServerRequestInterface $request if null, factory from global
* @param null|ServerRequestInterface $request if null, factory from global
* @return void
*/
protected function setRequest($request)
Expand All @@ -62,7 +62,7 @@ protected function setRequest($request)
/**
* Set context RequestMessage.
*
* @return null|\Psr\Http\Message\ServerRequestInterface contextual request
* @return null|ServerRequestInterface contextual request
*/
public function getRequest()
{
Expand Down
2 changes: 1 addition & 1 deletion src/Log/Engine/SentryLog.php
Expand Up @@ -7,7 +7,7 @@

class SentryLog extends BaseLog
{
/* @var \Connehito\CakeSentry\Http\Client */
/* @var Client */
protected $client;

/**
Expand Down

0 comments on commit b4096f0

Please sign in to comment.