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 - How to synchronize the Three.js and HTML/SVG coordinate systems (especially w.r.t. the y-axis)? -

javascript - How do I find how many occurences are there of a highlighted string, and which occurence is it? -

java - Reading data from multiple zip files and combining them to one -