private function safeArrayAssignment($input) { if (is_array($input) && empty($input)) { throw new InvalidArgumentException("Not empty array required!"); } return $input; }