remove rule exception
This commit is contained in:
parent
1247ca9e02
commit
82aea0be9a
@ -104,9 +104,9 @@
|
|||||||
</rule>
|
</rule>
|
||||||
-->
|
-->
|
||||||
<!-- We want to allow 'if () { ...small code... }' on same line for better code compacity and readability -->
|
<!-- 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>
|
<severity>0</severity>
|
||||||
</rule>
|
</rule> -->
|
||||||
|
|
||||||
|
|
||||||
<!-- Check assignement have the = align on each line. Have 20 chars padding maximum and always show as errors -->
|
<!-- 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();
|
$object->thirdparty = new stdClass();
|
||||||
$tmp = new Societe($db);
|
$tmp = new Societe($db);
|
||||||
$tmp->name = 'MyBigCompany';
|
$tmp->name = 'MyBigCompany';
|
||||||
foreach ($tmp as $key=>$value)
|
foreach ($tmp as $key => $value) {
|
||||||
{
|
|
||||||
if (!in_array($key, array(
|
if (!in_array($key, array(
|
||||||
'name', 'name_alias', 'ref_ext', 'address', 'zip', 'town', 'state_code', 'country_code'
|
'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;
|
if (!is_object($value)) $object->thirdparty->{$key} = $value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user