test phpcs v3

This commit is contained in:
Frédéric FRANCE 2018-08-09 11:03:50 +02:00
parent 9786743795
commit b00164ca39
No known key found for this signature in database
GPG Key ID: 06809324E4B2ABC1
4 changed files with 99 additions and 101 deletions

View File

@ -293,7 +293,6 @@ script:
# Ensure we catch errors
set -e
# Exclusions are defined in the ruleset.xml file
phpcs --version
#phpcs -s -n -p -d memory_limit=-1 --colors --tab-width=4 --standard=dev/setup/codesniffer/ruleset.xml --encoding=utf-8 .
phpcs -s -p -d memory_limit=-1 --colors --tab-width=4 --standard=dev/setup/codesniffer/ruleset.xml --encoding=utf-8 --runtime-set ignore_warnings_on_exit true .
set +e

View File

@ -777,8 +777,8 @@ class MouvementStock extends CommonObject
* Create or update batch record (update table llx_product_batch). No check is done here, done by parent.
*
* @param array|int $dluo Could be either
* - int if row id of product_batch table
* - or complete array('fk_product_stock'=>, 'batchnumber'=>)
* - int if row id of product_batch table
* - or complete array('fk_product_stock'=>, 'batchnumber'=>)
* @param int $qty Quantity of product with batch number. May be a negative amount.
* @return int <0 if KO, else return productbatch id
*/
@ -1059,7 +1059,7 @@ class MouvementStock extends CommonObject
public function generateDocument($modele, $outputlangs='',$hidedetails=0,$hidedesc=0,$hideref=0)
{
global $conf,$user,$langs;
$langs->load("stocks");
if (! dol_strlen($modele)) {

View File

@ -199,72 +199,72 @@ if ($resql)
'</td>'.
'<td class="liste_titre" align="right">';
$searchpicto=$form->showFilterAndCheckAddButtons(0);
print $searchpicto;
'</td>'.
'</tr>';
print $searchpicto;
print '</td>';
print '</tr>';
print '<tr class="liste_titre">';
print_liste_field_titre(
'Ref',
$_SERVER['PHP_SELF'],
'cf.ref',
'',
$param,
'',
$sortfield,
$sortorder
);
print_liste_field_titre(
'Company',
$_SERVER['PHP_SELF'],
's.nom',
'',
$param,
'',
$sortfield,
$sortorder
);
print_liste_field_titre(
'Author',
$_SERVER['PHP_SELF'],
'u.login',
'',
'',
'',
$sortfield,
$sortorder
);
print_liste_field_titre(
'AmountTTC',
$_SERVER['PHP_SELF'],
'cf.total_ttc',
'',
$param,
'',
$sortfield,
$sortorder
);
print_liste_field_titre(
'OrderCreation',
$_SERVER['PHP_SELF'],
'cf.date_creation',
'',
$param,
'',
$sortfield,
$sortorder
);
print_liste_field_titre(
'Status',
$_SERVER['PHP_SELF'],
'cf.fk_statut',
'',
$param,
'align="right"',
$sortfield,
$sortorder
);
print '</tr>';
print '<tr class="liste_titre">';
print_liste_field_titre(
'Ref',
$_SERVER['PHP_SELF'],
'cf.ref',
'',
$param,
'',
$sortfield,
$sortorder
);
print_liste_field_titre(
'Company',
$_SERVER['PHP_SELF'],
's.nom',
'',
$param,
'',
$sortfield,
$sortorder
);
print_liste_field_titre(
'Author',
$_SERVER['PHP_SELF'],
'u.login',
'',
'',
'',
$sortfield,
$sortorder
);
print_liste_field_titre(
'AmountTTC',
$_SERVER['PHP_SELF'],
'cf.total_ttc',
'',
$param,
'',
$sortfield,
$sortorder
);
print_liste_field_titre(
'OrderCreation',
$_SERVER['PHP_SELF'],
'cf.date_creation',
'',
$param,
'',
$sortfield,
$sortorder
);
print_liste_field_titre(
'Status',
$_SERVER['PHP_SELF'],
'cf.fk_statut',
'',
$param,
'align="right"',
$sortfield,
$sortorder
);
print '</tr>';
$userstatic = new User($db);
@ -324,8 +324,8 @@ if ($resql)
}
$i++;
}
print '</table>'.
'</form>';
print '</table>';
print '</form>';
$db->free($resql);
@ -337,5 +337,4 @@ else
}
llxFooter();
$db->close();

View File

@ -92,7 +92,7 @@ $server->wsdl->addComplexType(
/*
* Les catégories filles, sous tableau dez la catégorie
*/
$server->wsdl->addComplexType(
$server->wsdl->addComplexType(
'FillesArray',
'complexType',
'array',
@ -108,38 +108,38 @@ $server->wsdl->addComplexType(
/*
* Image of product
*/
$server->wsdl->addComplexType(
'PhotosArray',
'complexType',
'array',
'sequence',
'',
array(
'image' => array(
'name' => 'image',
'type' => 'tns:image',
'minOccurs' => '0',
'maxOccurs' => 'unbounded'
)
)
);
$server->wsdl->addComplexType(
'PhotosArray',
'complexType',
'array',
'sequence',
'',
array(
'image' => array(
'name' => 'image',
'type' => 'tns:image',
'minOccurs' => '0',
'maxOccurs' => 'unbounded'
)
)
);
/*
* An image
*/
$server->wsdl->addComplexType(
'image',
'complexType',
'struct',
'all',
'',
array(
'photo' => array('name'=>'photo','type'=>'xsd:string'),
'photo_vignette' => array('name'=>'photo_vignette','type'=>'xsd:string'),
'imgWidth' => array('name'=>'imgWidth','type'=>'xsd:string'),
'imgHeight' => array('name'=>'imgHeight','type'=>'xsd:string')
)
);
$server->wsdl->addComplexType(
'image',
'complexType',
'struct',
'all',
'',
array(
'photo' => array('name'=>'photo','type'=>'xsd:string'),
'photo_vignette' => array('name'=>'photo_vignette','type'=>'xsd:string'),
'imgWidth' => array('name'=>'imgWidth','type'=>'xsd:string'),
'imgHeight' => array('name'=>'imgHeight','type'=>'xsd:string')
)
);
/*
* Retour