From 82aea0be9aa642fbd0e13e49a7327bf6ae2d3663 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Mon, 1 Mar 2021 11:26:00 +0100 Subject: [PATCH] remove rule exception --- dev/setup/codesniffer/ruleset.xml | 4 ++-- test/other/test_serialize.php | 7 ++++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/dev/setup/codesniffer/ruleset.xml b/dev/setup/codesniffer/ruleset.xml index 8a7f4b03c59..21186cfbe5c 100644 --- a/dev/setup/codesniffer/ruleset.xml +++ b/dev/setup/codesniffer/ruleset.xml @@ -104,9 +104,9 @@ --> - + diff --git a/test/other/test_serialize.php b/test/other/test_serialize.php index 873698e95c2..2fdfffaef3e 100644 --- a/test/other/test_serialize.php +++ b/test/other/test_serialize.php @@ -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; }