Code Duplication    Length = 5-5 lines in 2 locations

lib/Cake/Model/Model.php 2 locations

@@ 2369-2373 (lines=5) @@
2366
			$validates = $Model->create(null) !== null;
2367
			$saved = false;
2368
			if ($validates) {
2369
				if ($options['deep']) {
2370
					$saved = $Model->saveAssociated($values, array_merge($options, array('atomic' => false)));
2371
				} else {
2372
					$saved = $Model->save($values, array_merge($options, array('atomic' => false)));
2373
				}
2374
				$validates = ($saved === true || (is_array($saved) && !in_array(false, $saved, true)));
2375
			}
2376
@@ 2425-2429 (lines=5) @@
2422
2423
					if ($validates) {
2424
						$options = $Model->_addToWhiteList($key, $options);
2425
						if ($options['deep']) {
2426
							$saved = $Model->saveAssociated($values, array_merge($options, array('atomic' => false)));
2427
						} else {
2428
							$saved = $Model->save($values, $options);
2429
						}
2430
					}
2431
2432
					$validates = ($validates && ($saved === true || (is_array($saved) && !in_array(false, $saved, true))));