protected function validate(array &$data)
    {
        $messages = [];
        if (isset($data['inserts']) && !empty($data['inserts'])) {
            array_push($messages, ['warning', sprintf('Found %s new files. New, not original files may increase the risk of instability.', count($data['inserts']))]);
        }
        if (isset($data['deletes']) && !empty($data['deletes'])) {
            array_push($messages, ['warning', sprintf('%s files has been deleted. Deleting system files may increase the risk of instability.', count($data['deletes']))]);
        }
        if (isset($data['updates']) && !empty($data['updates'])) {
            array_push($messages, ['warning', sprintf('%s files has been changed. File modifications are unacceptable and can increase the risk of instability.', count($data['updates']))]);
        }
        $data = array_merge($data, ['messages' => $messages]);
        return $data;
    }
protected function validate(array &$data)
    {
        $messages = [];
        if (isset($data['inserts']) && !empty($data['inserts'])) {
            array_push($messages, ['warning', sprintf('Found %s new files. New, not original files may increase the risk of instability.', count($data['inserts']))]);
        }
        if (isset($data['deletes']) && !empty($data['deletes'])) {
            array_push($messages, ['warning', sprintf('%s files has been deleted. Deleting system files may increase the risk of instability.', count($data['deletes']))]);
        }
        if (isset($data['updates']) && !empty($data['updates'])) {
            array_push($messages, ['warning', sprintf('%s files has been changed. File modifications are unacceptable and can increase the risk of instability.', count($data['updates']))]);
        }
        $data = array_merge($data, ['messages' => $messages]);
        return $data;
    }
protected function validate ( array & $ data ) { $ messages = [ ] ; if ( isset ( $ data [ 'inserts' ] ) && ! empty ( $ data [ 'inserts' ] ) ) { array_push ( $ messages , [ 'warning' , sprintf ( 'Found %s new files. New, not original files may increase the risk of instability.' , count ( $ data [ 'inserts' ] ) ) ] ) ; } if ( isset ( $ data [ 'deletes' ] ) && ! empty ( $ data [ 'deletes' ] ) ) { array_push ( $ messages , [ 'warning' , sprintf ( '%s files has been deleted. Deleting system files may increase the risk of instability.' , count ( $ data [ 'deletes' ] ) ) ] ) ; } if ( isset ( $ data [ 'updates' ] ) && ! empty ( $ data [ 'updates' ] ) ) { array_push ( $ messages , [ 'warning' , sprintf ( '%s files has been changed. File modifications are unacceptable and can increase the risk of instability.' , count ( $ data [ 'updates' ] ) ) ] ) ; } $ data = array_merge ( $ data , [ 'messages' => $ messages ] ) ; return $ data ; }
validate checksum verification

@param array $data
@return array
validate checksum verification