Ver Fonte

Fix phpstan

Laurent Destailleur há 1 ano atrás
pai
commit
d190f54c75

+ 23 - 1
htdocs/product/canvas/product/actions_card_product.class.php

@@ -28,10 +28,22 @@ include_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php';
  */
 class ActionsCardProduct
 {
+	/**
+	 * @var DoliDB Database handler.
+	 */
+	public $db;
+
+	public $dirmodule;
 	public $targetmodule;
 	public $canvas;
 	public $card;
 
+	public $name;
+	public $definition;
+	public $fieldListName;
+	public $next_prev_filter;
+
+	//! Object container
 	public $object;
 
 	//! Template container
@@ -40,6 +52,16 @@ class ActionsCardProduct
 	// List of fiels for action=list
 	public $field_list = array();
 
+	/**
+	 * @var string Error code (or message)
+	 */
+	public $error = '';
+
+	/**
+	 * @var string[] Error codes (or messages)
+	 */
+	public $errors = array();
+
 
 	/**
 	 *    Constructor
@@ -59,7 +81,7 @@ class ActionsCardProduct
 		$this->card             = $card;
 
 		$this->name = "product";
-		$this->definition = "Product canvas (défaut)";
+		$this->definition = "Product canvas (default)";
 		$this->fieldListName    = "product_default";
 		$this->next_prev_filter = "canvas='product'";
 	}

+ 29 - 3
htdocs/product/canvas/service/actions_card_service.class.php

@@ -28,10 +28,24 @@ include_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php';
  */
 class ActionsCardService
 {
+	/**
+	 * @var DoliDB Database handler.
+	 */
+	public $db;
+
+	public $dirmodule;
 	public $targetmodule;
 	public $canvas;
 	public $card;
 
+	public $name;
+	public $definition;
+	public $fieldListName;
+	public $next_prev_filter;
+
+	//! Object container
+	public $object;
+
 	//! Template container
 	public $tpl = array();
 
@@ -45,18 +59,30 @@ class ActionsCardService
 	public $price;
 	public $price_min;
 
+	/**
+	 * @var string Error code (or message)
+	 */
+	public $error = '';
+
+	/**
+	 * @var string[] Error codes (or messages)
+	 */
+	public $errors = array();
+
 
 	/**
 	 *    Constructor
 	 *
-	 *    @param   DoliDB	$db             Handler acces base de donnees
-	 *    @param   string	$targetmodule   Name of directory of module where canvas is stored
+	 *    @param	DoliDB	$db             Database handler
+	 *    @param	string	$dirmodule		Name of directory of module
+	 *    @param	string	$targetmodule	Name of directory where canvas is stored
 	 *    @param   string	$canvas         Name of canvas
 	 *    @param   string	$card           Name of tab (sub-canvas)
 	 */
-	public function __construct($db, $targetmodule, $canvas, $card)
+	public function __construct($db, $dirmodule, $targetmodule, $canvas, $card)
 	{
 		$this->db = $db;
+		$this->dirmodule = $dirmodule;
 		$this->targetmodule = $targetmodule;
 		$this->canvas           = $canvas;
 		$this->card             = $card;

+ 1 - 1
htdocs/societe/canvas/actions_card_common.class.php

@@ -39,6 +39,7 @@ abstract class ActionsCardCommon
 
 	//! Template container
 	public $tpl = array();
+
 	//! Object container
 	public $object;
 
@@ -47,7 +48,6 @@ abstract class ActionsCardCommon
 	 */
 	public $error = '';
 
-
 	/**
 	 * @var string[] Error codes (or messages)
 	 */