php - PHPDoc for PDO Wrapper -


while writing lightweight wrapper pdo noticed pdo::query method seems have 4 different signatures available use per documentation:

http://php.net/manual/en/pdo.query.php

method overloading not allowed in php , seems phpdoc doesn't scenario, @ least while using phpstorm 8.x , following code (i provided 2 signature example):

<?php  /**  * @method \pdostatement query(string $statement)  * @method \pdostatement query(string $statement, int $pdo::fetch_column, int $colno)  */ class database {      private $pdo;      public function __construct($dsn, $user = null, $pass = null, $options = null)     {         $this->pdo = new \pdo($dsn, $user, $pass, $options);     }      public function __call($method, $arguments)     {         return call_user_func_array(array(&$this->pdo, $method), $arguments);     } } 

of course second @method statement highlighted in red in phpstorm following error:

"method same name defined in class"

does has suggestion on how fix this?


Comments

Popular posts from this blog

javascript - ScrollTo Effect (href to div) -

javascript - ng-class not responding to change in model in Angular? -

javascript - document.registerElement extending HTMLInputElement prototype while using custom tag name to avoid implicit browser style -