@@ -26,58 +26,58 @@ discard block |
||
| 26 | 26 | */ |
| 27 | 27 | class InterfaceMailOnIncident extends DolibarrTriggers |
| 28 | 28 | { |
| 29 | - /** |
|
| 30 | - * @var DoliDB Database handler |
|
| 31 | - */ |
|
| 32 | - protected $db; |
|
| 33 | - |
|
| 34 | - /** |
|
| 35 | - * Constructor |
|
| 36 | - * |
|
| 37 | - * @param DoliDB $db Database handler |
|
| 38 | - */ |
|
| 39 | - public function __construct($db) |
|
| 40 | - { |
|
| 41 | - $this->db = $db; |
|
| 42 | - |
|
| 43 | - $this->name = preg_replace('/^Interface/i', '', get_class($this)); |
|
| 44 | - $this->family = "Belgian balloon club"; |
|
| 45 | - $this->description = "Trigger that send an e-mail on flight incident."; |
|
| 46 | - $this->version = '1.0'; |
|
| 47 | - $this->picto = 'flightlog@flightlog'; |
|
| 48 | - } |
|
| 49 | - |
|
| 50 | - /** |
|
| 51 | - * Trigger name |
|
| 52 | - * |
|
| 53 | - * @return string Name of trigger file |
|
| 54 | - */ |
|
| 55 | - public function getName() |
|
| 56 | - { |
|
| 57 | - return $this->name; |
|
| 58 | - } |
|
| 59 | - |
|
| 60 | - /** |
|
| 61 | - * Trigger description |
|
| 62 | - * |
|
| 63 | - * @return string Description of trigger file |
|
| 64 | - */ |
|
| 65 | - public function getDesc() |
|
| 66 | - { |
|
| 67 | - return $this->description; |
|
| 68 | - } |
|
| 69 | - |
|
| 70 | - |
|
| 71 | - /** |
|
| 72 | - * @param string $action Event action code |
|
| 73 | - * @param Bbcvols $object Object |
|
| 74 | - * @param User $user Object user |
|
| 75 | - * @param Translate $langs Object langs |
|
| 76 | - * @param Conf $conf Object conf |
|
| 77 | - * @return int <0 if KO, 0 if no triggered ran, >0 if OK |
|
| 78 | - */ |
|
| 79 | - public function runTrigger($action, $object, User $user, Translate $langs, Conf $conf) |
|
| 80 | - { |
|
| 29 | + /** |
|
| 30 | + * @var DoliDB Database handler |
|
| 31 | + */ |
|
| 32 | + protected $db; |
|
| 33 | + |
|
| 34 | + /** |
|
| 35 | + * Constructor |
|
| 36 | + * |
|
| 37 | + * @param DoliDB $db Database handler |
|
| 38 | + */ |
|
| 39 | + public function __construct($db) |
|
| 40 | + { |
|
| 41 | + $this->db = $db; |
|
| 42 | + |
|
| 43 | + $this->name = preg_replace('/^Interface/i', '', get_class($this)); |
|
| 44 | + $this->family = "Belgian balloon club"; |
|
| 45 | + $this->description = "Trigger that send an e-mail on flight incident."; |
|
| 46 | + $this->version = '1.0'; |
|
| 47 | + $this->picto = 'flightlog@flightlog'; |
|
| 48 | + } |
|
| 49 | + |
|
| 50 | + /** |
|
| 51 | + * Trigger name |
|
| 52 | + * |
|
| 53 | + * @return string Name of trigger file |
|
| 54 | + */ |
|
| 55 | + public function getName() |
|
| 56 | + { |
|
| 57 | + return $this->name; |
|
| 58 | + } |
|
| 59 | + |
|
| 60 | + /** |
|
| 61 | + * Trigger description |
|
| 62 | + * |
|
| 63 | + * @return string Description of trigger file |
|
| 64 | + */ |
|
| 65 | + public function getDesc() |
|
| 66 | + { |
|
| 67 | + return $this->description; |
|
| 68 | + } |
|
| 69 | + |
|
| 70 | + |
|
| 71 | + /** |
|
| 72 | + * @param string $action Event action code |
|
| 73 | + * @param Bbcvols $object Object |
|
| 74 | + * @param User $user Object user |
|
| 75 | + * @param Translate $langs Object langs |
|
| 76 | + * @param Conf $conf Object conf |
|
| 77 | + * @return int <0 if KO, 0 if no triggered ran, >0 if OK |
|
| 78 | + */ |
|
| 79 | + public function runTrigger($action, $object, User $user, Translate $langs, Conf $conf) |
|
| 80 | + { |
|
| 81 | 81 | if (empty($conf->flightlog->enabled) || empty($conf->workflow->enabled)){ |
| 82 | 82 | return 0; |
| 83 | 83 | } |
@@ -132,6 +132,6 @@ discard block |
||
| 132 | 132 | dol_syslog("Error while sending mail in flight log module : incident", LOG_ERR); |
| 133 | 133 | } |
| 134 | 134 | |
| 135 | - return 0; |
|
| 136 | - } |
|
| 135 | + return 0; |
|
| 136 | + } |
|
| 137 | 137 | } |
@@ -132,12 +132,12 @@ discard block |
||
| 132 | 132 | //'t.justif_kilometers' => array('label' => $langs->trans("Fieldjustif_kilometers"), 'checked' => 1), |
| 133 | 133 | //'t.entity'=>array('label'=>$langs->trans("Entity"), 'checked'=>1, 'enabled'=>(! empty($conf->multicompany->enabled) && empty($conf->multicompany->transverse_mode))), |
| 134 | 134 | 't.datec' => array('label' => $langs->trans("DateCreationShort"), |
| 135 | - 'checked' => 0, |
|
| 136 | - 'position' => 500 |
|
| 135 | + 'checked' => 0, |
|
| 136 | + 'position' => 500 |
|
| 137 | 137 | ), |
| 138 | 138 | 't.tms' => array('label' => $langs->trans("DateModificationShort"), |
| 139 | - 'checked' => 0, |
|
| 140 | - 'position' => 500 |
|
| 139 | + 'checked' => 0, |
|
| 140 | + 'position' => 500 |
|
| 141 | 141 | ), |
| 142 | 142 | //'t.statut'=>array('label'=>$langs->trans("Status"), 'checked'=>1, 'position'=>1000), |
| 143 | 143 | ); |
@@ -145,9 +145,9 @@ discard block |
||
| 145 | 145 | if (is_array($extrafields->attribute_label) && count($extrafields->attribute_label)) { |
| 146 | 146 | foreach ($extrafields->attribute_label as $key => $val) { |
| 147 | 147 | $arrayfields["ef." . $key] = array('label' => $extrafields->attribute_label[$key], |
| 148 | - 'checked' => $extrafields->attribute_list[$key], |
|
| 149 | - 'position' => $extrafields->attribute_pos[$key], |
|
| 150 | - 'enabled' => $extrafields->attribute_perms[$key] |
|
| 148 | + 'checked' => $extrafields->attribute_list[$key], |
|
| 149 | + 'position' => $extrafields->attribute_pos[$key], |
|
| 150 | + 'enabled' => $extrafields->attribute_perms[$key] |
|
| 151 | 151 | ); |
| 152 | 152 | } |
| 153 | 153 | } |
@@ -108,7 +108,7 @@ |
||
| 108 | 108 | } |
| 109 | 109 | |
| 110 | 110 | /** |
| 111 | - * @param null $year |
|
| 111 | + * @param integer $year |
|
| 112 | 112 | * @param null $pilotId |
| 113 | 113 | * @param null $quarter |
| 114 | 114 | * @param bool $groupBy |
@@ -645,7 +645,7 @@ |
||
| 645 | 645 | } |
| 646 | 646 | |
| 647 | 647 | /** |
| 648 | - * @return array|BbctypesLine[] |
|
| 648 | + * @return BbctypesLine[] |
|
| 649 | 649 | */ |
| 650 | 650 | public function getLines() |
| 651 | 651 | { |
@@ -95,6 +95,7 @@ discard block |
||
| 95 | 95 | |
| 96 | 96 | /** |
| 97 | 97 | * @inheritDoc |
| 98 | + * @param string $fieldName |
|
| 98 | 99 | */ |
| 99 | 100 | public function remove($fieldName) |
| 100 | 101 | { |
@@ -142,7 +143,7 @@ discard block |
||
| 142 | 143 | } |
| 143 | 144 | |
| 144 | 145 | /** |
| 145 | - * @param null|\ValidatorInterface $validator |
|
| 146 | + * @param ValidatorInterface $validator |
|
| 146 | 147 | * |
| 147 | 148 | * @return Form |
| 148 | 149 | */ |
@@ -111,7 +111,7 @@ |
||
| 111 | 111 | |
| 112 | 112 | /** |
| 113 | 113 | * @param Product $flightProduct |
| 114 | - * @param float|int $pricePerPax |
|
| 114 | + * @param integer $pricePerPax |
|
| 115 | 115 | * |
| 116 | 116 | * @return float|int |
| 117 | 117 | */ |
@@ -32,7 +32,7 @@ |
||
| 32 | 32 | } |
| 33 | 33 | |
| 34 | 34 | /** |
| 35 | - * @return CreateDamageCommand|\stdClass|null |
|
| 35 | + * @return CreateDamageCommand |
|
| 36 | 36 | */ |
| 37 | 37 | public function getObject() |
| 38 | 38 | { |
@@ -27,6 +27,9 @@ |
||
| 27 | 27 | */ |
| 28 | 28 | private $billId; |
| 29 | 29 | |
| 30 | + /** |
|
| 31 | + * @param integer $authorId |
|
| 32 | + */ |
|
| 30 | 33 | public function __construct($authorId) |
| 31 | 34 | { |
| 32 | 35 | $this->authorId = $authorId; |
@@ -61,7 +61,6 @@ |
||
| 61 | 61 | } |
| 62 | 62 | |
| 63 | 63 | /** |
| 64 | - * @param string $action |
|
| 65 | 64 | * |
| 66 | 65 | * @return bool |
| 67 | 66 | */ |