private function createFailure($userMessage, $model = null){
        $typeIdentifier = is_null($model) ? 'unknown type' : $model->getTypeIdentifier();
        $message = 'The portable element cannot be registered "'.$typeIdentifier.'", reason: '.$userMessage;
        \common_Logger::w($message);
        return Report::createFailure($message);
    }
private function createFailure($userMessage, $model = null){
        $typeIdentifier = is_null($model) ? 'unknown type' : $model->getTypeIdentifier();
        $message = 'The portable element cannot be registered "'.$typeIdentifier.'", reason: '.$userMessage;
        \common_Logger::w($message);
        return Report::createFailure($message);
    }
private function createFailure ( $ userMessage , $ model = null ) { $ typeIdentifier = is_null ( $ model ) ? 'unknown type' : $ model -> getTypeIdentifier ( ) ; $ message = 'The portable element cannot be registered "' . $ typeIdentifier . '", reason: ' . $ userMessage ; \ common_Logger :: w ( $ message ) ; return Report :: createFailure ( $ message ) ; }
Create a formatted failure report and log a warning

@param $userMessage
@param null $model
@return Report
Create a formatted failure report and log a warning