Code Duplication    Length = 7-7 lines in 2 locations

src/Yandex/Common/Model.php 1 location

@@ 144-150 (lines=7) @@
141
                    $propNameMap = $this->propNameMap[$key];
142
                }
143
144
                if (is_object($value) && method_exists($value, "getAll")) {
145
                    $result[$propNameMap] = $this->toArrayRecursive($value->getAll());
146
                } else {
147
                    if ($value !== null) {
148
                        $result[$propNameMap] = $this->toArrayRecursive($value);
149
                    }
150
                }
151
            }
152
            return $result;
153
        }

src/Yandex/Market/Partner/Models/MarketModel.php 1 location

@@ 95-101 (lines=7) @@
92
                if ($key === "mappingClasses") {
93
                    continue;
94
                }
95
                if (is_object($value) && method_exists($value, "getAll")) {
96
                    $result[$key] = $this->toArrayRecursive($value->getAll());
97
                } else {
98
                    if ($value !== null) {
99
                        $result[$key] = $this->toArrayRecursive($value);
100
                    }
101
                }
102
            }
103
            return $result;
104
        }