Fix phpcs

This commit is contained in:
Laurent Destailleur 2019-03-16 23:17:23 +01:00
parent dabccb7967
commit 9a132d9691
8 changed files with 45 additions and 29 deletions

View File

@ -70,6 +70,7 @@ class DolConfigCollector extends ConfigCollector
/** /**
* Convert an object to array * Convert an object to array
* *
* @param mixed $obj Object
* @return array Array * @return array Array
*/ */
protected function object_to_array($obj) protected function object_to_array($obj)

View File

@ -22,8 +22,8 @@ class DolLogsCollector extends MessagesCollector
/** /**
* Constructor * Constructor
* *
* @param string $path * @param string $path Path
* @param string $name * @param string $name Name
*/ */
public function __construct($path = null, $name = 'logs') public function __construct($path = null, $name = 'logs')
{ {
@ -89,7 +89,7 @@ class DolLogsCollector extends MessagesCollector
/** /**
* Get logs * Get logs
* *
* @param string $path * @param string $path Path
* @return array * @return array
*/ */
public function getStorageLogs($path) public function getStorageLogs($path)
@ -109,8 +109,8 @@ class DolLogsCollector extends MessagesCollector
/** /**
* Get latest file lines * Get latest file lines
* *
* @param string $file * @param string $file File
* @param int $lines * @param int $lines Lines
* @return array Array * @return array Array
*/ */
protected function tailFile($file, $lines) protected function tailFile($file, $lines)

View File

@ -10,7 +10,6 @@ dol_include_once('/debugbar/class/TraceableDB.php');
/** /**
* DolQueryCollector class * DolQueryCollector class
*/ */
class DolQueryCollector extends DataCollector implements Renderable, AssetProvider class DolQueryCollector extends DataCollector implements Renderable, AssetProvider
{ {
/** /**
@ -33,6 +32,7 @@ class DolQueryCollector extends DataCollector implements Renderable, AssetProvid
/** /**
* Return collected data * Return collected data
* *
* @return array Array
*/ */
public function collect() public function collect()
{ {
@ -72,7 +72,7 @@ class DolQueryCollector extends DataCollector implements Renderable, AssetProvid
/** /**
* Return collector name * Return collector name
* *
* @param string Name * @return string Name
*/ */
public function getName() public function getName()
{ {
@ -82,7 +82,7 @@ class DolQueryCollector extends DataCollector implements Renderable, AssetProvid
/** /**
* Return widget settings * Return widget settings
* *
* @param array Array * @return array Array
*/ */
public function getWidgets() public function getWidgets()
{ {
@ -107,7 +107,7 @@ class DolQueryCollector extends DataCollector implements Renderable, AssetProvid
/** /**
* Return assets * Return assets
* *
* @param array Array * @return array Array
*/ */
public function getAssets() public function getAssets()
{ {

View File

@ -14,6 +14,7 @@ class DolibarrCollector extends DataCollector implements Renderable, AssetProvid
/** /**
* Return collector name * Return collector name
* *
* @return string Name
*/ */
public function getName() public function getName()
{ {
@ -23,6 +24,7 @@ class DolibarrCollector extends DataCollector implements Renderable, AssetProvid
/** /**
* Return collected data * Return collected data
* *
* @return array Array
*/ */
public function collect() public function collect()
{ {
@ -52,6 +54,7 @@ class DolibarrCollector extends DataCollector implements Renderable, AssetProvid
/** /**
* Return dolibarr info as an HTML string * Return dolibarr info as an HTML string
* *
* @return string HTML string
*/ */
protected function getDolibarrInfo() protected function getDolibarrInfo()
{ {
@ -71,6 +74,7 @@ class DolibarrCollector extends DataCollector implements Renderable, AssetProvid
/** /**
* Return mail info as an HTML string * Return mail info as an HTML string
* *
* @return string HTML string
*/ */
protected function getMailInfo() protected function getMailInfo()
{ {
@ -90,6 +94,7 @@ class DolibarrCollector extends DataCollector implements Renderable, AssetProvid
/** /**
* Return widget settings * Return widget settings
* *
* @return array Array
*/ */
public function getWidgets() public function getWidgets()
{ {
@ -130,6 +135,7 @@ class DolibarrCollector extends DataCollector implements Renderable, AssetProvid
/** /**
* Return collector assests * Return collector assests
* *
* @return array Array
*/ */
public function getAssets() public function getAssets()
{ {

View File

@ -145,6 +145,7 @@ class TraceableDB extends DoliDB
return $this->db->convertSQLFromMysql($line); return $this->db->convertSQLFromMysql($line);
} }
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/** /**
* Renvoie le nombre de lignes dans le resultat d'une requete INSERT, DELETE ou UPDATE * Renvoie le nombre de lignes dans le resultat d'une requete INSERT, DELETE ou UPDATE
* *
@ -154,6 +155,7 @@ class TraceableDB extends DoliDB
*/ */
public function affected_rows($resultset) public function affected_rows($resultset)
{ {
// phpcs:enable
return $this->db->affected_rows($resultset); return $this->db->affected_rows($resultset);
} }
@ -303,6 +305,8 @@ class TraceableDB extends DoliDB
/** /**
* Start query tracing * Start query tracing
*
* @return void
*/ */
protected function startTracing() protected function startTracing()
{ {
@ -315,6 +319,7 @@ class TraceableDB extends DoliDB
* *
* @param string $sql query string * @param string $sql query string
* @param string $resql query result * @param string $resql query result
* @return void
*/ */
protected function endTracing($sql, $resql) protected function endTracing($sql, $resql)
{ {
@ -393,6 +398,7 @@ class TraceableDB extends DoliDB
return $this->db->getDefaultCollationDatabase(); return $this->db->getDefaultCollationDatabase();
} }
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/** /**
* Return number of lines for result of a SELECT * Return number of lines for result of a SELECT
* *
@ -402,6 +408,7 @@ class TraceableDB extends DoliDB
*/ */
public function num_rows($resultset) public function num_rows($resultset)
{ {
// phpcs:enable
return $this->db->num_rows($resultset); return $this->db->num_rows($resultset);
} }
@ -568,6 +575,7 @@ class TraceableDB extends DoliDB
return $this->db->DDLCreateUser($dolibarr_main_db_host, $dolibarr_main_db_user, $dolibarr_main_db_pass, $dolibarr_main_db_name); return $this->db->DDLCreateUser($dolibarr_main_db_host, $dolibarr_main_db_user, $dolibarr_main_db_pass, $dolibarr_main_db_name);
} }
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/** /**
* Convert (by PHP) a PHP server TZ string date into a Timestamps date (GMT if gm=true) * Convert (by PHP) a PHP server TZ string date into a Timestamps date (GMT if gm=true)
* 19700101020000 -> 3600 with TZ+1 and gmt=0 * 19700101020000 -> 3600 with TZ+1 and gmt=0
@ -579,6 +587,7 @@ class TraceableDB extends DoliDB
*/ */
public function jdate($string, $gm = false) public function jdate($string, $gm = false)
{ {
// phpcs:enable
return $this->db->jdate($string, $gm); return $this->db->jdate($string, $gm);
} }