return comment

This commit is contained in:
Frédéric FRANCE 2018-08-14 13:14:55 +02:00
parent a0a6afc224
commit d25fa61998
No known key found for this signature in database
GPG Key ID: 06809324E4B2ABC1
4 changed files with 25 additions and 11 deletions

View File

@ -185,6 +185,7 @@ class AccountancyExport
* Function who chose which export to use with the default config * Function who chose which export to use with the default config
* *
* @param unknown $TData data * @param unknown $TData data
* @return void
*/ */
public function export(&$TData) { public function export(&$TData) {
global $conf, $langs; global $conf, $langs;
@ -602,6 +603,7 @@ class AccountancyExport
* *
* @param unknown $str data * @param unknown $str data
* @param integer $size data * @param integer $size data
* @return string
*/ */
public static function trunc($str, $size) { public static function trunc($str, $size) {
return dol_trunc($str, $size, 'right', 'UTF-8', 1); return dol_trunc($str, $size, 'right', 'UTF-8', 1);

View File

@ -943,6 +943,7 @@ class Account extends CommonObject
* Existing categories are left untouch. * Existing categories are left untouch.
* *
* @param int[]|int $categories Category or categories IDs * @param int[]|int $categories Category or categories IDs
* @return void
*/ */
public function setCategories($categories) { public function setCategories($categories) {
// Handle single category // Handle single category
@ -2282,4 +2283,3 @@ class AccountLine extends CommonObject
} }
} }

View File

@ -1,6 +1,6 @@
<?php <?php
/* EXPERIMENTAL /* EXPERIMENTAL
* *
* Copyright (C) 2016 ATM Consulting <support@atm-consulting.fr> * Copyright (C) 2016 ATM Consulting <support@atm-consulting.fr>
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
@ -22,7 +22,7 @@
* \ingroup core * \ingroup core
* \brief File of class to manage all object. Might be replace or merge into commonobject * \brief File of class to manage all object. Might be replace or merge into commonobject
*/ */
require_once DOL_DOCUMENT_ROOT.'/core/class/commonobject.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/commonobject.class.php';
class CoreObject extends CommonObject class CoreObject extends CommonObject
@ -54,7 +54,7 @@ class CoreObject extends CommonObject
$this->id = 0; $this->id = 0;
$this->datec = 0; $this->datec = 0;
$this->tms = 0; $this->tms = 0;
if (!empty($this->fields)) if (!empty($this->fields))
{ {
foreach ($this->fields as $field=>$info) foreach ($this->fields as $field=>$info)
@ -68,14 +68,14 @@ class CoreObject extends CommonObject
$this->to_delete=false; $this->to_delete=false;
$this->is_clone=false; $this->is_clone=false;
return true; return true;
} }
else else
{ {
return false; return false;
} }
} }
/** /**
@ -110,7 +110,7 @@ class CoreObject extends CommonObject
if($res>0) { if($res>0) {
if ($loadChild) $this->fetchChild(); if ($loadChild) $this->fetchChild();
} }
return $res; return $res;
} }
@ -133,14 +133,14 @@ class CoreObject extends CommonObject
if($object->{$key} === $id) return $k; if($object->{$key} === $id) return $k;
} }
} }
$k = count($this->{$tabName}); $k = count($this->{$tabName});
$className = ucfirst($tabName); $className = ucfirst($tabName);
$this->{$tabName}[$k] = new $className($this->db); $this->{$tabName}[$k] = new $className($this->db);
if($id>0 && $key==='id' && $try_to_load) if($id>0 && $key==='id' && $try_to_load)
{ {
$this->{$tabName}[$k]->fetch($id); $this->{$tabName}[$k]->fetch($id);
} }
return $k; return $k;
@ -171,6 +171,8 @@ class CoreObject extends CommonObject
/** /**
* Function to fetch children objects * Function to fetch children objects
*
* @return void
*/ */
public function fetchChild() public function fetchChild()
{ {
@ -207,6 +209,7 @@ class CoreObject extends CommonObject
* Function to update children data * Function to update children data
* *
* @param User $user user object * @param User $user user object
* @return void
*/ */
public function saveChild(User &$user) public function saveChild(User &$user)
{ {
@ -220,7 +223,7 @@ class CoreObject extends CommonObject
foreach($this->{$className} as $i => &$object) foreach($this->{$className} as $i => &$object)
{ {
$object->{$this->fk_element} = $this->id; $object->{$this->fk_element} = $this->id;
$object->update($user); $object->update($user);
if($this->unsetChildDeleted && isset($object->to_delete) && $object->to_delete==true) unset($this->{$className}[$i]); if($this->unsetChildDeleted && isset($object->to_delete) && $object->to_delete==true) unset($this->{$className}[$i]);
} }

View File

@ -579,6 +579,7 @@ class ActionsTicket
* *
* @param User $user User for action * @param User $user User for action
* @param string $action Action string * @param string $action Action string
* @return int
*/ */
private function newMessage($user, &$action) private function newMessage($user, &$action)
{ {
@ -792,6 +793,7 @@ class ActionsTicket
* *
* @param User $user User for action * @param User $user User for action
* @param string $action Action string * @param string $action Action string
* @return void
*/ */
private function newMessagePublic($user, &$action) private function newMessagePublic($user, &$action)
{ {
@ -962,6 +964,7 @@ class ActionsTicket
* Get ticket info * Get ticket info
* *
* @param int $id Object id * @param int $id Object id
* @return void
*/ */
public function getInfo($id) public function getInfo($id)
{ {
@ -976,6 +979,7 @@ class ActionsTicket
* Get action title * Get action title
* *
* @param string $action Type of action * @param string $action Type of action
* @return string
*/ */
public function getTitle($action = '') public function getTitle($action = '')
{ {
@ -998,6 +1002,7 @@ class ActionsTicket
* View html list of logs * View html list of logs
* *
* @param boolean $show_user Show user who make action * @param boolean $show_user Show user who make action
* @return void
*/ */
public function viewTicketLogs($show_user = true) public function viewTicketLogs($show_user = true)
{ {
@ -1058,6 +1063,7 @@ class ActionsTicket
* *
* @param boolean $show_user Show user who make action * @param boolean $show_user Show user who make action
* @param Ticket $object Object * @param Ticket $object Object
* @return void
*/ */
public function viewTimelineTicketLogs($show_user = true, $object = true) public function viewTimelineTicketLogs($show_user = true, $object = true)
{ {
@ -1165,6 +1171,7 @@ class ActionsTicket
* *
* @param boolean $show_private Show private messages * @param boolean $show_private Show private messages
* @param boolean $show_user Show user who make action * @param boolean $show_user Show user who make action
* @return void
*/ */
public function viewTicketMessages($show_private, $show_user = true) public function viewTicketMessages($show_private, $show_user = true)
{ {
@ -1237,6 +1244,7 @@ class ActionsTicket
* @param boolean $show_private Show private messages * @param boolean $show_private Show private messages
* @param boolean $show_user Show user who make action * @param boolean $show_user Show user who make action
* @param Ticket $object Object ticket * @param Ticket $object Object ticket
* @return void
*/ */
public function viewTicketTimelineMessages($show_private, $show_user, Ticket $object) public function viewTicketTimelineMessages($show_private, $show_user, Ticket $object)
{ {
@ -1308,6 +1316,7 @@ class ActionsTicket
* @param string $message Email message * @param string $message Email message
* @param int $send_internal_cc Receive a copy on internal email ($conf->global->TICKET_NOTIFICATION_EMAIL_FROM) * @param int $send_internal_cc Receive a copy on internal email ($conf->global->TICKET_NOTIFICATION_EMAIL_FROM)
* @param array $array_receiver Array of receiver. exemple array('name' => 'John Doe', 'email' => 'john@doe.com', etc...) * @param array $array_receiver Array of receiver. exemple array('name' => 'John Doe', 'email' => 'john@doe.com', etc...)
* @return void
*/ */
public function sendTicketMessageByEmail($subject, $message, $send_internal_cc = 0, $array_receiver = array()) public function sendTicketMessageByEmail($subject, $message, $send_internal_cc = 0, $array_receiver = array())
{ {