소스 검색

Fix scrutinizer

Laurent Destailleur 2 년 전
부모
커밋
547dee7b41
2개의 변경된 파일5개의 추가작업 그리고 7개의 파일을 삭제
  1. 1 2
      .scrutinizer.yml
  2. 4 5
      htdocs/expensereport/class/expensereport.class.php

+ 1 - 2
.scrutinizer.yml

@@ -8,10 +8,9 @@ build:
                 override:
                     - command: php-scrutinizer-run
                       idle_timeout: 8000
-                    - php-scrutinizer-run --sub-project-dir=htdocs/admin
+                    #- php-scrutinizer-run --sub-project-dir=htdocs/admin
 
 imports:
-    - javascript
     - php
 
 filter:

+ 4 - 5
htdocs/expensereport/class/expensereport.class.php

@@ -2572,14 +2572,13 @@ class ExpenseReport extends CommonObject
 	 *  \brief Compute the cost of the kilometers expense based on the number of kilometers and the vehicule category
 	 *
 	 *  @param     int		$fk_cat           Category of the vehicule used
-	 *  @param     real		$qty              Number of kilometers
-	 *  @param     real		$tva              VAT rate
+	 *  @param     float	$qty              Number of kilometers
+	 *  @param     float	$tva              VAT rate
 	 *  @return    int              		  <0 if KO, total ttc if OK
 	 */
 	public function computeTotalKm($fk_cat, $qty, $tva)
 	{
-		global $langs,$user,$db,$conf;
-
+		global $langs, $db, $conf;
 
 		$cumulYearQty = 0;
 		$ranges = array();
@@ -2828,7 +2827,7 @@ class ExpenseReportLine extends CommonObjectLine
 	 */
 	public function insert($notrigger = 0, $fromaddline = false)
 	{
-		global $langs, $user, $conf;
+		global $user, $conf;
 
 		$error = 0;