PSR2.Methods.FunctionCallSignature.SpaceBeforeOpenBracket

This commit is contained in:
Frédéric FRANCE 2019-02-24 20:06:55 +01:00
parent f83f746123
commit 894123fb06
No known key found for this signature in database
GPG Key ID: 06809324E4B2ABC1
27 changed files with 169 additions and 166 deletions

View File

@ -429,4 +429,5 @@
<rule ref="PSR2.Methods.FunctionClosingBrace" /> <rule ref="PSR2.Methods.FunctionClosingBrace" />
<rule ref="PSR2.Files.EndFileNewline.TooMany" /> <rule ref="PSR2.Files.EndFileNewline.TooMany" />
<rule ref="PSR2.Files.EndFileNewline.NoneFound" /> <rule ref="PSR2.Files.EndFileNewline.NoneFound" />
<rule ref="PSR2.Methods.FunctionCallSignature.SpaceBeforeOpenBracket" />
</ruleset> </ruleset>

View File

@ -175,8 +175,7 @@ $sql.= $db->plimit($limit+1, $offset);
dol_syslog("/accountancy/bookkeeping/thirdparty_lettrage_supplier.php", LOG_DEBUG); dol_syslog("/accountancy/bookkeeping/thirdparty_lettrage_supplier.php", LOG_DEBUG);
$resql = $db->query($sql); $resql = $db->query($sql);
if (! $resql) if (! $resql) {
{
dol_print_error($db); dol_print_error($db);
exit; exit;
} }

View File

@ -1472,8 +1472,7 @@ class Categorie extends CommonObject
// We want to reverse lookup // We want to reverse lookup
$map_type = array_flip($this->MAP_ID); $map_type = array_flip($this->MAP_ID);
$type = $map_type[$type]; $type = $map_type[$type];
dol_syslog( get_class($this) . "::rechercher(): numeric types are deprecated, please use string instead", dol_syslog(get_class($this) . "::rechercher(): numeric types are deprecated, please use string instead", LOG_WARNING);
LOG_WARNING );
} }
// Generation requete recherche // Generation requete recherche

View File

@ -423,12 +423,15 @@ class AdvanceTargetingMailing extends CommonObject
$this->db->begin(); $this->db->begin();
dol_syslog(get_class($this)."::update sql=".$sql, LOG_DEBUG); dol_syslog(get_class($this)."::update sql=".$sql, LOG_DEBUG);
$resql = $this->db->query($sql); $resql = $this->db->query($sql);
if (! $resql) { $error++; $this->errors[]="Error ".$this->db->lasterror(); } if (! $resql) {
$error++;
$this->errors[]="Error ".$this->db->lasterror();
}
if (! $error) //if (! $error)
{ //{
if (! $notrigger) // if (! $notrigger)
{ // {
// Uncomment this and change MYOBJECT to your own tag if you // Uncomment this and change MYOBJECT to your own tag if you
// want this action calls a trigger. // want this action calls a trigger.
@ -438,8 +441,8 @@ class AdvanceTargetingMailing extends CommonObject
//$result=$interface->run_triggers('MYOBJECT_MODIFY',$this,$user,$langs,$conf); //$result=$interface->run_triggers('MYOBJECT_MODIFY',$this,$user,$langs,$conf);
//if ($result < 0) { $error++; $this->errors=$interface->errors; } //if ($result < 0) { $error++; $this->errors=$interface->errors; }
//// End call triggers //// End call triggers
} // }
} //}
// Commit or rollback // Commit or rollback
if ($error) if ($error)

View File

@ -1,5 +1,6 @@
<?php <?php
/* Copyright (C) 2014 Florian Henry <florian.henry@open-concept.pro> /* Copyright (C) 2014 Florian Henry <florian.henry@open-concept.pro>
* Copyright (C) 2019 Frédéric France <frederic.france@netlogic.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
* 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

View File

@ -6610,9 +6610,9 @@ function dol_sort_array(&$array, $index, $order = 'asc', $natsort = 0, $case_sen
$temp = array(); $temp = array();
foreach(array_keys($array) as $key) $temp[$key]=$array[$key][$index]; foreach(array_keys($array) as $key) $temp[$key]=$array[$key][$index];
if (!$natsort) ($order=='asc') ? asort($temp) : arsort($temp); if (! $natsort) {
else ($order=='asc') ? asort($temp) : arsort($temp);
{ } else {
($case_sensitive) ? natsort($temp) : natcasesort($temp); ($case_sensitive) ? natsort($temp) : natcasesort($temp);
if($order!='asc') $temp=array_reverse($temp, true); if($order!='asc') $temp=array_reverse($temp, true);
} }

View File

@ -784,8 +784,7 @@ if (empty($reshook))
$stockLocation="entl".$detail_entrepot->line_id; $stockLocation="entl".$detail_entrepot->line_id;
$qty = "qtyl".$detail_entrepot->line_id; $qty = "qtyl".$detail_entrepot->line_id;
$warehouse = GETPOST($stockLocation, 'int'); $warehouse = GETPOST($stockLocation, 'int');
if (!empty ($warehouse)) if (!empty($warehouse)) {
{
$line->id = $detail_entrepot->line_id; $line->id = $detail_entrepot->line_id;
$line->entrepot_id = $warehouse; $line->entrepot_id = $warehouse;
$line->qty = GETPOST($qty, 'int'); $line->qty = GETPOST($qty, 'int');
@ -800,8 +799,9 @@ if (empty($reshook))
} }
} }
} }
else // Product no predefined else
{ {
// Product no predefined
$qty = "qtyl".$line_id; $qty = "qtyl".$line_id;
$line->id = $line_id; $line->id = $line_id;
$line->qty = GETPOST($qty, 'int'); $line->qty = GETPOST($qty, 'int');

View File

@ -269,8 +269,7 @@ class SupplierOrders extends DolibarrApi
throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login); throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login);
} }
if( $this->order->delete(DolibarrApiAccess::$user) < 0) if ( $this->order->delete(DolibarrApiAccess::$user) < 0) {
{
throw new RestException(500); throw new RestException(500);
} }

View File

@ -484,7 +484,8 @@ for ($i = 0; $i < $nbrejourmois + $premierjourmois; $i++) {
//bouton vert //bouton vert
if (($numerojour >= $jourAJ && $_SESSION["mois"] == $moisAJ && $_SESSION["annee"] == $anneeAJ) || ($_SESSION["mois"] > $moisAJ && $_SESSION["annee"] == $anneeAJ) || $_SESSION["annee"] > $anneeAJ) { if (($numerojour >= $jourAJ && $_SESSION["mois"] == $moisAJ && $_SESSION["annee"] == $anneeAJ) || ($_SESSION["mois"] > $moisAJ && $_SESSION["annee"] == $anneeAJ) || $_SESSION["annee"] > $anneeAJ) {
print '<td align="center" class="libre"><input type="submit" class="bouton ON" name="choixjourajout[]" value="'.$numerojour.'"></td>'."\n"; print '<td align="center" class="libre"><input type="submit" class="bouton ON" name="choixjourajout[]" value="'.$numerojour.'"></td>'."\n";
} else { //bouton gris } else {
//bouton gris
print '<td align="center" class="avant">'.$numerojour.'</td>'."\n"; print '<td align="center" class="avant">'.$numerojour.'</td>'."\n";
} }
} }