Fix phpcs
This commit is contained in:
parent
4d101c7d9a
commit
95c1275efc
@ -1,5 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
/*
|
/* Copyright (C) 2019 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@ -120,6 +120,7 @@ class modDebugBar extends DolibarrModules
|
|||||||
/**
|
/**
|
||||||
* Function called after module configuration.
|
* Function called after module configuration.
|
||||||
*
|
*
|
||||||
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function loadSettings()
|
public function loadSettings()
|
||||||
{
|
{
|
||||||
|
|||||||
@ -11,6 +11,7 @@ class DolExceptionsCollector extends ExceptionsCollector
|
|||||||
/**
|
/**
|
||||||
* Return widget settings
|
* Return widget settings
|
||||||
*
|
*
|
||||||
|
* @return array Array
|
||||||
*/
|
*/
|
||||||
public function getWidgets()
|
public function getWidgets()
|
||||||
{
|
{
|
||||||
|
|||||||
@ -76,7 +76,7 @@ class DolLogsCollector extends MessagesCollector
|
|||||||
/**
|
/**
|
||||||
* Get the path to the logs file
|
* Get the path to the logs file
|
||||||
*
|
*
|
||||||
* @return string
|
* @return string Path of log file
|
||||||
*/
|
*/
|
||||||
public function getLogsFile()
|
public function getLogsFile()
|
||||||
{
|
{
|
||||||
@ -111,7 +111,7 @@ class DolLogsCollector extends MessagesCollector
|
|||||||
*
|
*
|
||||||
* @param string $file
|
* @param string $file
|
||||||
* @param int $lines
|
* @param int $lines
|
||||||
* @return array
|
* @return array Array
|
||||||
*/
|
*/
|
||||||
protected function tailFile($file, $lines)
|
protected function tailFile($file, $lines)
|
||||||
{
|
{
|
||||||
@ -146,8 +146,8 @@ class DolLogsCollector extends MessagesCollector
|
|||||||
/**
|
/**
|
||||||
* Search a string for log entries
|
* Search a string for log entries
|
||||||
*
|
*
|
||||||
* @param $file
|
* @param string $file File
|
||||||
* @return array
|
* @return array Lines of logs
|
||||||
*/
|
*/
|
||||||
public function getLogs($file)
|
public function getLogs($file)
|
||||||
{
|
{
|
||||||
@ -171,7 +171,7 @@ class DolLogsCollector extends MessagesCollector
|
|||||||
/**
|
/**
|
||||||
* Get the log levels from psr/log.
|
* Get the log levels from psr/log.
|
||||||
*
|
*
|
||||||
* @return array
|
* @return array Array of log level
|
||||||
*/
|
*/
|
||||||
public function getLevels()
|
public function getLevels()
|
||||||
{
|
{
|
||||||
|
|||||||
@ -2,10 +2,10 @@
|
|||||||
|
|
||||||
use \DebugBar\DataCollector\TimeDataCollector;
|
use \DebugBar\DataCollector\TimeDataCollector;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* DolTimeDataCollector class
|
* DolTimeDataCollector class
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class DolTimeDataCollector extends TimeDataCollector
|
class DolTimeDataCollector extends TimeDataCollector
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -47,6 +47,7 @@ class DolibarrDebugBar extends DebugBar
|
|||||||
/**
|
/**
|
||||||
* Returns a JavascriptRenderer for this instance
|
* Returns a JavascriptRenderer for this instance
|
||||||
*
|
*
|
||||||
|
* @return string String content
|
||||||
*/
|
*/
|
||||||
public function getRenderer()
|
public function getRenderer()
|
||||||
{
|
{
|
||||||
|
|||||||
@ -150,7 +150,7 @@ class TraceableDB extends DoliDB
|
|||||||
*
|
*
|
||||||
* @param resource $resultset Curseur de la requete voulue
|
* @param resource $resultset Curseur de la requete voulue
|
||||||
* @return int Nombre de lignes
|
* @return int Nombre de lignes
|
||||||
* @see num_rows
|
* @see num_rows()
|
||||||
*/
|
*/
|
||||||
public function affected_rows($resultset)
|
public function affected_rows($resultset)
|
||||||
{
|
{
|
||||||
@ -212,6 +212,7 @@ class TraceableDB extends DoliDB
|
|||||||
return $this->db->decrypt($value);
|
return $this->db->decrypt($value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||||
/**
|
/**
|
||||||
* Return datas as an array
|
* Return datas as an array
|
||||||
*
|
*
|
||||||
@ -220,6 +221,7 @@ class TraceableDB extends DoliDB
|
|||||||
*/
|
*/
|
||||||
public function fetch_array($resultset)
|
public function fetch_array($resultset)
|
||||||
{
|
{
|
||||||
|
// phpcs:enable
|
||||||
return $this->db->fetch_array($resultset);
|
return $this->db->fetch_array($resultset);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -244,6 +246,7 @@ class TraceableDB extends DoliDB
|
|||||||
return $this->db->escape($stringtoencode);
|
return $this->db->escape($stringtoencode);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||||
/**
|
/**
|
||||||
* Get last ID after an insert INSERT
|
* Get last ID after an insert INSERT
|
||||||
*
|
*
|
||||||
@ -253,6 +256,7 @@ class TraceableDB extends DoliDB
|
|||||||
*/
|
*/
|
||||||
public function last_insert_id($tab, $fieldid = 'rowid')
|
public function last_insert_id($tab, $fieldid = 'rowid')
|
||||||
{
|
{
|
||||||
|
// phpcs:enable
|
||||||
return $this->db->last_insert_id($tab, $fieldid);
|
return $this->db->last_insert_id($tab, $fieldid);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -309,8 +313,8 @@ class TraceableDB extends DoliDB
|
|||||||
/**
|
/**
|
||||||
* End query tracing
|
* End query tracing
|
||||||
*
|
*
|
||||||
* @param $sql query string
|
* @param string $sql query string
|
||||||
* @param $resql query result
|
* @param string $resql query result
|
||||||
*/
|
*/
|
||||||
protected function endTracing($sql, $resql)
|
protected function endTracing($sql, $resql)
|
||||||
{
|
{
|
||||||
@ -338,7 +342,7 @@ class TraceableDB extends DoliDB
|
|||||||
* @param string $name name of database (not used for mysql, used for pgsql)
|
* @param string $name name of database (not used for mysql, used for pgsql)
|
||||||
* @param int $port Port of database server
|
* @param int $port Port of database server
|
||||||
* @return resource Database access handler
|
* @return resource Database access handler
|
||||||
* @see close
|
* @see close()
|
||||||
*/
|
*/
|
||||||
public function connect($host, $login, $passwd, $name, $port = 0)
|
public function connect($host, $login, $passwd, $name, $port = 0)
|
||||||
{
|
{
|
||||||
@ -394,7 +398,7 @@ class TraceableDB extends DoliDB
|
|||||||
*
|
*
|
||||||
* @param resource $resultset Resulset of requests
|
* @param resource $resultset Resulset of requests
|
||||||
* @return int Nb of lines
|
* @return int Nb of lines
|
||||||
* @see affected_rows
|
* @see affected_rows()
|
||||||
*/
|
*/
|
||||||
public function num_rows($resultset)
|
public function num_rows($resultset)
|
||||||
{
|
{
|
||||||
@ -628,7 +632,7 @@ class TraceableDB extends DoliDB
|
|||||||
* Close database connexion
|
* Close database connexion
|
||||||
*
|
*
|
||||||
* @return boolean True if disconnect successfull, false otherwise
|
* @return boolean True if disconnect successfull, false otherwise
|
||||||
* @see connect
|
* @see connect()
|
||||||
*/
|
*/
|
||||||
public function close()
|
public function close()
|
||||||
{
|
{
|
||||||
@ -655,6 +659,7 @@ class TraceableDB extends DoliDB
|
|||||||
return $this->db->DDLGetConnectId();
|
return $this->db->DDLGetConnectId();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||||
/**
|
/**
|
||||||
* Renvoie la ligne courante (comme un objet) pour le curseur resultset
|
* Renvoie la ligne courante (comme un objet) pour le curseur resultset
|
||||||
*
|
*
|
||||||
@ -663,9 +668,11 @@ class TraceableDB extends DoliDB
|
|||||||
*/
|
*/
|
||||||
public function fetch_object($resultset)
|
public function fetch_object($resultset)
|
||||||
{
|
{
|
||||||
|
// phpcs:enable
|
||||||
return $this->db->fetch_object($resultset);
|
return $this->db->fetch_object($resultset);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||||
/**
|
/**
|
||||||
* Select a database
|
* Select a database
|
||||||
*
|
*
|
||||||
@ -674,6 +681,7 @@ class TraceableDB extends DoliDB
|
|||||||
*/
|
*/
|
||||||
public function select_db($database)
|
public function select_db($database)
|
||||||
{
|
{
|
||||||
|
// phpcs:enable
|
||||||
return $this->db->select_db($database);
|
return $this->db->select_db($database);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -9,6 +9,7 @@ class ActionsDebugBar
|
|||||||
/**
|
/**
|
||||||
* Load Debug bar
|
* Load Debug bar
|
||||||
*
|
*
|
||||||
|
* @return void
|
||||||
*/
|
*/
|
||||||
protected function loadDebugBar()
|
protected function loadDebugBar()
|
||||||
{
|
{
|
||||||
@ -23,9 +24,9 @@ class ActionsDebugBar
|
|||||||
/**
|
/**
|
||||||
* Overloading the afterLogin function
|
* Overloading the afterLogin function
|
||||||
*
|
*
|
||||||
* @param array() $parameters Hook metadatas (context, etc...)
|
* @param array $parameters Hook metadatas (context, etc...)
|
||||||
* @param CommonObject &$object The object to process (an invoice if you are in invoice module, a propale in propale's module, etc...)
|
* @param CommonObject $object The object to process (an invoice if you are in invoice module, a propale in propale's module, etc...)
|
||||||
* @param string &$action Current action (if set). Generally create or edit or null
|
* @param string $action Current action (if set). Generally create or edit or null
|
||||||
* @param HookManager $hookmanager Hook manager propagated to allow calling another hook
|
* @param HookManager $hookmanager Hook manager propagated to allow calling another hook
|
||||||
* @return int < 0 on error, 0 on success, 1 to replace standard code
|
* @return int < 0 on error, 0 on success, 1 to replace standard code
|
||||||
*/
|
*/
|
||||||
@ -51,9 +52,9 @@ class ActionsDebugBar
|
|||||||
/**
|
/**
|
||||||
* Overloading the updateSession function
|
* Overloading the updateSession function
|
||||||
*
|
*
|
||||||
* @param array() $parameters Hook metadatas (context, etc...)
|
* @param array $parameters Hook metadatas (context, etc...)
|
||||||
* @param CommonObject &$object The object to process (an invoice if you are in invoice module, a propale in propale's module, etc...)
|
* @param CommonObject $object The object to process (an invoice if you are in invoice module, a propale in propale's module, etc...)
|
||||||
* @param string &$action Current action (if set). Generally create or edit or null
|
* @param string $action Current action (if set). Generally create or edit or null
|
||||||
* @param HookManager $hookmanager Hook manager propagated to allow calling another hook
|
* @param HookManager $hookmanager Hook manager propagated to allow calling another hook
|
||||||
* @return int < 0 on error, 0 on success, 1 to replace standard code
|
* @return int < 0 on error, 0 on success, 1 to replace standard code
|
||||||
*/
|
*/
|
||||||
@ -79,9 +80,9 @@ class ActionsDebugBar
|
|||||||
/**
|
/**
|
||||||
* Overloading the printCommonFooter function
|
* Overloading the printCommonFooter function
|
||||||
*
|
*
|
||||||
* @param array() $parameters Hook metadatas (context, etc...)
|
* @param array $parameters Hook metadatas (context, etc...)
|
||||||
* @param CommonObject &$object The object to process (an invoice if you are in invoice module, a propale in propale's module, etc...)
|
* @param CommonObject $object The object to process (an invoice if you are in invoice module, a propale in propale's module, etc...)
|
||||||
* @param string &$action Current action (if set). Generally create or edit or null
|
* @param string $action Current action (if set). Generally create or edit or null
|
||||||
* @param HookManager $hookmanager Hook manager propagated to allow calling another hook
|
* @param HookManager $hookmanager Hook manager propagated to allow calling another hook
|
||||||
* @return int <0 on error, 0 on success, 1 to replace standard code
|
* @return int <0 on error, 0 on success, 1 to replace standard code
|
||||||
*/
|
*/
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user