mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-02-20 13:46:52 +01:00
remove rule exception
This commit is contained in:
parent
1247ca9e02
commit
82aea0be9a
|
|
@ -104,9 +104,9 @@
|
|||
</rule>
|
||||
-->
|
||||
<!-- We want to allow 'if () { ...small code... }' on same line for better code compacity and readability -->
|
||||
<rule ref="Generic.Formatting.DisallowMultipleStatements">
|
||||
<!-- <rule ref="Generic.Formatting.DisallowMultipleStatements">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
</rule> -->
|
||||
|
||||
|
||||
<!-- Check assignement have the = align on each line. Have 20 chars padding maximum and always show as errors -->
|
||||
|
|
|
|||
|
|
@ -16,11 +16,12 @@ $object->bbb = 'bbb';
|
|||
$object->thirdparty = new stdClass();
|
||||
$tmp = new Societe($db);
|
||||
$tmp->name = 'MyBigCompany';
|
||||
foreach ($tmp as $key=>$value)
|
||||
{
|
||||
foreach ($tmp as $key => $value) {
|
||||
if (!in_array($key, array(
|
||||
'name', 'name_alias', 'ref_ext', 'address', 'zip', 'town', 'state_code', 'country_code'
|
||||
))) continue; // Discard if not into a dedicated list
|
||||
))) {
|
||||
continue; // Discard if not into a dedicated list
|
||||
}
|
||||
if (!is_object($value)) $object->thirdparty->{$key} = $value;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user