@@ -41,10 +41,17 @@ |
||
| 41 | 41 | $this->method1(array(1, 2), new stdClass()); // this arguments will be displayed in error backtrace |
| 42 | 42 | } |
| 43 | 43 | |
| 44 | + /** |
|
| 45 | + * @param integer[] $a |
|
| 46 | + * @param stdClass $b |
|
| 47 | + */ |
|
| 44 | 48 | protected function method1($a, $b) { |
| 45 | 49 | $this->method2('some long string argument'); |
| 46 | 50 | } |
| 47 | 51 | |
| 52 | + /** |
|
| 53 | + * @param string $c |
|
| 54 | + */ |
|
| 48 | 55 | public function method2($c) { |
| 49 | 56 | file_get_contents('not_existed.file'); // E_WARNING error |
| 50 | 57 | } |
@@ -14,10 +14,17 @@ |
||
| 14 | 14 | $this->method1(array(1, 2), new stdClass()); // this arguments will be displayed in error backtrace |
| 15 | 15 | } |
| 16 | 16 | |
| 17 | + /** |
|
| 18 | + * @param integer[] $a |
|
| 19 | + * @param stdClass $b |
|
| 20 | + */ |
|
| 17 | 21 | protected function method1($a, $b) { |
| 18 | 22 | $this->method2('some long string argument'); |
| 19 | 23 | } |
| 20 | 24 | |
| 25 | + /** |
|
| 26 | + * @param string $c |
|
| 27 | + */ |
|
| 21 | 28 | public function method2($c) { |
| 22 | 29 | echo $undefinedVar; // E_NOTICE error |
| 23 | 30 | file_get_contents('not_existed.file'); // E_WARNING error |
@@ -23,7 +23,7 @@ |
||
| 23 | 23 | * Send debug data message to client |
| 24 | 24 | * @param mixed $data |
| 25 | 25 | * @param null|string $tags Tags separated by dot, e.g. "low.db.billing" |
| 26 | - * @param int|array $ignoreTraceCalls Ignore tracing classes by name prefix `array('PhpConsole')` or fixed number of calls to ignore |
|
| 26 | + * @param integer $ignoreTraceCalls Ignore tracing classes by name prefix `array('PhpConsole')` or fixed number of calls to ignore |
|
| 27 | 27 | */ |
| 28 | 28 | public function dispatchDebug($data, $tags = null, $ignoreTraceCalls = 0) { |
| 29 | 29 | if($this->isActive()) { |
@@ -52,7 +52,7 @@ |
||
| 52 | 52 | * @param null|string $text |
| 53 | 53 | * @param null|string $file |
| 54 | 54 | * @param null|integer $line |
| 55 | - * @param int|array $ignoreTraceCalls Ignore tracing classes by name prefix `array('PhpConsole')` or fixed number of calls to ignore |
|
| 55 | + * @param integer $ignoreTraceCalls Ignore tracing classes by name prefix `array('PhpConsole')` or fixed number of calls to ignore |
|
| 56 | 56 | */ |
| 57 | 57 | public function dispatchError($code = null, $text = null, $file = null, $line = null, $ignoreTraceCalls = 0) { |
| 58 | 58 | if($this->isActive()) { |
@@ -69,8 +69,8 @@ discard block |
||
| 69 | 69 | |
| 70 | 70 | /** |
| 71 | 71 | * Call added code handlers |
| 72 | - * @param $code |
|
| 73 | - * @return mixed |
|
| 72 | + * @param string $code |
|
| 73 | + * @return string |
|
| 74 | 74 | */ |
| 75 | 75 | protected function applyHandlersToCode($code) { |
| 76 | 76 | foreach($this->codeCallbackHandlers as $callback) { |
@@ -107,7 +107,7 @@ discard block |
||
| 107 | 107 | |
| 108 | 108 | /** |
| 109 | 109 | * Execute code with shared vars |
| 110 | - * @param $_code |
|
| 110 | + * @param string $_code |
|
| 111 | 111 | * @param array $_sharedVars |
| 112 | 112 | * @return mixed |
| 113 | 113 | */ |
@@ -163,7 +163,7 @@ discard block |
||
| 163 | 163 | /** |
| 164 | 164 | * Protect response code access only to specified directories using http://www.php.net/manual/en/ini.core.php#ini.open-basedir |
| 165 | 165 | * IMPORTANT: classes autoload methods will work only for specified directories |
| 166 | - * @param array $openBaseDirs |
|
| 166 | + * @param string[] $openBaseDirs |
|
| 167 | 167 | * @codeCoverageIgnore |
| 168 | 168 | */ |
| 169 | 169 | public function setOpenBaseDirs(array $openBaseDirs) { |
@@ -174,7 +174,7 @@ discard block |
||
| 174 | 174 | * @param string|null $file |
| 175 | 175 | * @param int|null $line |
| 176 | 176 | * @param null $context |
| 177 | - * @param int|array $ignoreTraceCalls Ignore tracing classes by name prefix `array('PhpConsole')` or fixed number of calls to ignore |
|
| 177 | + * @param integer $ignoreTraceCalls Ignore tracing classes by name prefix `array('PhpConsole')` or fixed number of calls to ignore |
|
| 178 | 178 | */ |
| 179 | 179 | public function handleError($code = null, $text = null, $file = null, $line = null, $context = null, $ignoreTraceCalls = 0) { |
| 180 | 180 | if(!$this->isStarted || error_reporting() === 0 || $this->isHandlingDisabled() || ($this->errorsHandlerLevel && !($code & $this->errorsHandlerLevel))) { |
@@ -238,7 +238,7 @@ discard block |
||
| 238 | 238 | * Handle debug data |
| 239 | 239 | * @param mixed $data |
| 240 | 240 | * @param string|null $tags Tags separated by dot, e.g. "low.db.billing" |
| 241 | - * @param int|array $ignoreTraceCalls Ignore tracing classes by name prefix `array('PhpConsole')` or fixed number of calls to ignore |
|
| 241 | + * @param integer $ignoreTraceCalls Ignore tracing classes by name prefix `array('PhpConsole')` or fixed number of calls to ignore |
|
| 242 | 242 | */ |
| 243 | 243 | public function debug($data, $tags = null, $ignoreTraceCalls = 0) { |
| 244 | 244 | if($this->connector->isActiveClient()) { |
@@ -86,7 +86,7 @@ |
||
| 86 | 86 | * Analog of Handler::getInstance()->debug(...) method |
| 87 | 87 | * @param mixed $data |
| 88 | 88 | * @param string|null $tags Tags separated by dot, e.g. "low.db.billing" |
| 89 | - * @param int|array $ignoreTraceCalls Ignore tracing classes by name prefix `array('PhpConsole')` or fixed number of calls to ignore |
|
| 89 | + * @param integer $ignoreTraceCalls Ignore tracing classes by name prefix `array('PhpConsole')` or fixed number of calls to ignore |
|
| 90 | 90 | */ |
| 91 | 91 | public static function debug($data, $tags = null, $ignoreTraceCalls = 0) { |
| 92 | 92 | if(self::$isActive) { |
@@ -42,7 +42,7 @@ discard block |
||
| 42 | 42 | /** |
| 43 | 43 | * @param Connector|null $connector |
| 44 | 44 | * @param Dumper|null $contextDumper |
| 45 | - * @param int|array $ignoreTraceCalls Ignore tracing classes by name prefix `array('PhpConsole')` or fixed number of calls to ignore |
|
| 45 | + * @param integer $ignoreTraceCalls Ignore tracing classes by name prefix `array('PhpConsole')` or fixed number of calls to ignore |
|
| 46 | 46 | */ |
| 47 | 47 | public function __construct(Connector $connector = null, Dumper $contextDumper = null, $ignoreTraceCalls = 1) { |
| 48 | 48 | $this->connector = $connector ?: Connector::getInstance(); |
@@ -76,6 +76,9 @@ discard block |
||
| 76 | 76 | } |
| 77 | 77 | } |
| 78 | 78 | |
| 79 | + /** |
|
| 80 | + * @param string $message |
|
| 81 | + */ |
|
| 79 | 82 | protected function fetchMessageContext($message, array $context) { |
| 80 | 83 | $replace = array(); |
| 81 | 84 | foreach($context as $key => $value) { |
@@ -21,8 +21,8 @@ |
||
| 21 | 21 | * @param bool $autoStart Start session if it's not started |
| 22 | 22 | */ |
| 23 | 23 | public function __construct($sessionKey = '__PHP_Console_postponed', $autoStart = true) { |
| 24 | - if($autoStart && (defined('PHP_SESSION_ACTIVE') ? session_status() != PHP_SESSION_ACTIVE : !session_id()) && !headers_sent()) { |
|
| 25 | - session_start(); |
|
| 24 | + if($autoStart && (defined('PHP_SESSION_ACTIVE') ? session_status() != PHP_SESSION_ACTIVE : !session_id()) && !headers_sent()) { |
|
| 25 | + session_start(); |
|
| 26 | 26 | } |
| 27 | 27 | register_shutdown_function('session_write_close'); // force saving session data if session handler is overridden |
| 28 | 28 | $this->sessionKey = $sessionKey; |