Commit 9965fdb5 authored by Laurent's avatar Laurent

refactoring : remove custom array_diff not needed

parent d423e0de
Pipeline #10835 passed with stage
in 23 seconds
......@@ -618,7 +618,7 @@ abstract class Storm_Model_Abstract {
$has_many_attributes = (array)$this->_has_many_attributes[$field];
$has_many_attributes_in_db = (array)$this->_has_many_attributes_in_db[$field];
$dependents_to_delete = $this->_array_diff(
$dependents_to_delete = array_diff(
$has_many_attributes_in_db,
$has_many_attributes
);
......@@ -635,25 +635,6 @@ abstract class Storm_Model_Abstract {
return $this;
}
/**
* @param array $array1
* @param array $array2
* @return array
* @todo why not using real array_diff ??
*/
protected function _array_diff(Array &$array1, Array &$array2) {
$diff = array();
foreach($array1 as $element) {
if (! in_array($element, $array2, true)) {
$diff []= $element;
}
}
return $diff;
}
/**
* Main purpose is to setup generic getters and setters:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment