Test Failed
Push — 135-map-multiple-wordpress-obj... ( 3634c2...bb35fb )
by Jonathan
12:00
created

MassEmailMessage::setWhatIds()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 1
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
/*
3
 * Copyright (c) 2007, salesforce.com, inc.
4
 * All rights reserved.
5
 *
6
 * Redistribution and use in source and binary forms, with or without modification, are permitted provided
7
 * that the following conditions are met:
8
 *
9
 *    Redistributions of source code must retain the above copyright notice, this list of conditions and the
10
 *    following disclaimer.
11
 *
12
 *    Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
13
 *    the following disclaimer in the documentation and/or other materials provided with the distribution.
14
 *
15
 *    Neither the name of salesforce.com, inc. nor the names of its contributors may be used to endorse or
16
 *    promote products derived from this software without specific prior written permission.
17
 *
18
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED
19
 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
20
 * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
21
 * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
22
 * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23
 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
24
 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
25
 * POSSIBILITY OF SUCH DAMAGE.
26
 */
27
define ("EMAIL_PRIORITY_HIGHEST", 'Highest');
0 ignored issues
show
Coding Style introduced by
Space before opening parenthesis of function call prohibited
Loading history...
Coding Style Comprehensibility introduced by
The string literal EMAIL_PRIORITY_HIGHEST does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
28
define ("EMAIL_PRIORITY_HIGH", 'High');
0 ignored issues
show
Coding Style introduced by
Space before opening parenthesis of function call prohibited
Loading history...
Coding Style Comprehensibility introduced by
The string literal EMAIL_PRIORITY_HIGH does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
29
define ("EMAIL_PRIORITY_NORMAL", 'Normal');
0 ignored issues
show
Coding Style introduced by
Space before opening parenthesis of function call prohibited
Loading history...
Coding Style Comprehensibility introduced by
The string literal EMAIL_PRIORITY_NORMAL does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
30
define ("EMAIL_PRIORITY_LOW", 'Low');
0 ignored issues
show
Coding Style introduced by
Space before opening parenthesis of function call prohibited
Loading history...
Coding Style Comprehensibility introduced by
The string literal EMAIL_PRIORITY_LOW does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
31
define ("EMAIL_PRIORITY_LOWEST", 'Lowest');
0 ignored issues
show
Coding Style introduced by
Space before opening parenthesis of function call prohibited
Loading history...
Coding Style Comprehensibility introduced by
The string literal EMAIL_PRIORITY_LOWEST does not require double quotes, as per coding-style, please use single quotes.

PHP provides two ways to mark string literals. Either with single quotes 'literal' or with double quotes "literal". The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.

String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (\') and the backslash (\\). Every other character is displayed as is.

Double quoted string literals may contain other variables or more complex escape sequences.

<?php

$singleQuoted = 'Value';
$doubleQuoted = "\tSingle is $singleQuoted";

print $doubleQuoted;

will print an indented: Single is Value

If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.

For more information on PHP string literals and available escape sequences see the PHP core documentation.

Loading history...
32
33
class Email {
34
  public function setBccSender($bccSender) {
0 ignored issues
show
Coding Style introduced by
The function name setBccSender is in camel caps, but expected set_bcc_sender instead as per the coding standard.
Loading history...
35
    $this->bccSender = $bccSender;
36
  }
37
38
  public function setEmailPriority($priority) {
0 ignored issues
show
Coding Style introduced by
The function name setEmailPriority is in camel caps, but expected set_email_priority instead as per the coding standard.
Loading history...
39
    $this->emailPriority = $priority;
40
  }
41
   
42
  public function setSubject($subject) {
0 ignored issues
show
Coding Style introduced by
The function name setSubject is in camel caps, but expected set_subject instead as per the coding standard.
Loading history...
43
    $this->subject = $subject;
44
  }
45
46
  public function setSaveAsActivity($saveAsActivity) {
0 ignored issues
show
Coding Style introduced by
The function name setSaveAsActivity is in camel caps, but expected set_save_as_activity instead as per the coding standard.
Loading history...
47
    $this->saveAsActivity = $saveAsActivity;
48
  }
49
50
  public function setReplyTo($replyTo) {
0 ignored issues
show
Coding Style introduced by
The function name setReplyTo is in camel caps, but expected set_reply_to instead as per the coding standard.
Loading history...
51
    $this->replyTo = $replyTo;
52
  }
53
54
  public function setUseSignature($useSignature) {
0 ignored issues
show
Coding Style introduced by
The function name setUseSignature is in camel caps, but expected set_use_signature instead as per the coding standard.
Loading history...
55
    $this->useSignature = $useSignature;
56
  }
57
  
58
  public function setSenderDisplayName($name) {
0 ignored issues
show
Coding Style introduced by
The function name setSenderDisplayName is in camel caps, but expected set_sender_display_name instead as per the coding standard.
Loading history...
59
    $this->senderDisplayName = $name;
60
  }
61
}
62
63
class SingleEmailMessage extends Email {
64
  public function __construct() {}
65
66
67
  public function setBccAddresses($addresses) {
0 ignored issues
show
Coding Style introduced by
The function name setBccAddresses is in camel caps, but expected set_bcc_addresses instead as per the coding standard.
Loading history...
68
    $this->bccAddresses = $addresses;
69
  }
70
  public $ccAddresses;
71
72
  public function setCcAddresses($addresses) {
0 ignored issues
show
Coding Style introduced by
The function name setCcAddresses is in camel caps, but expected set_cc_addresses instead as per the coding standard.
Loading history...
73
    $this->ccAddresses = $addresses;
74
  }
75
76
  public function setCharset($charset) {
0 ignored issues
show
Coding Style introduced by
The function name setCharset is in camel caps, but expected set_charset instead as per the coding standard.
Loading history...
77
    $this->charset = $charset;
78
  }
79
80
  public function setHtmlBody($htmlBody) {
0 ignored issues
show
Coding Style introduced by
The function name setHtmlBody is in camel caps, but expected set_html_body instead as per the coding standard.
Loading history...
81
    $this->htmlBody = $htmlBody;
82
  }
83
84
  public function setOrgWideEmailAddressId($orgWideEmailAddressId) {
0 ignored issues
show
Coding Style introduced by
The function name setOrgWideEmailAddressId is in camel caps, but expected set_org_wide_email_address_id instead as per the coding standard.
Loading history...
85
    $this->orgWideEmailAddressId = $orgWideEmailAddressId;
86
  }
87
88
  public function setPlainTextBody($plainTextBody) {
0 ignored issues
show
Coding Style introduced by
The function name setPlainTextBody is in camel caps, but expected set_plain_text_body instead as per the coding standard.
Loading history...
89
    $this->plainTextBody = $plainTextBody;
90
  }
91
92
  public function setTargetObjectId($targetObjectId) {
0 ignored issues
show
Coding Style introduced by
The function name setTargetObjectId is in camel caps, but expected set_target_object_id instead as per the coding standard.
Loading history...
93
    $this->targetObjectId = $targetObjectId;
94
  }
95
96
  public function setTemplateId($templateId) {
0 ignored issues
show
Coding Style introduced by
The function name setTemplateId is in camel caps, but expected set_template_id instead as per the coding standard.
Loading history...
97
    $this->templateId = $templateId;
98
  }
99
100
  public function setToAddresses($array) {
0 ignored issues
show
Coding Style introduced by
The function name setToAddresses is in camel caps, but expected set_to_addresses instead as per the coding standard.
Loading history...
101
    $this->toAddresses = $array;
102
  }
103
104
  public function setWhatId($whatId) {
0 ignored issues
show
Coding Style introduced by
The function name setWhatId is in camel caps, but expected set_what_id instead as per the coding standard.
Loading history...
105
    $this->whatId = $whatId;
106
  }
107
108
  public function setFileAttachments($array) {
0 ignored issues
show
Coding Style introduced by
The function name setFileAttachments is in camel caps, but expected set_file_attachments instead as per the coding standard.
Loading history...
109
    $this->fileAttachments = $array;
110
  }
111
112
  public function setDocumentAttachments($array) {
0 ignored issues
show
Coding Style introduced by
The function name setDocumentAttachments is in camel caps, but expected set_document_attachments instead as per the coding standard.
Loading history...
113
    $this->documentAttachments = $array;
114
  }
115
}
116
117
class MassEmailMessage extends Email {
118
  public function setTemplateId($templateId) {
0 ignored issues
show
Coding Style introduced by
The function name setTemplateId is in camel caps, but expected set_template_id instead as per the coding standard.
Loading history...
119
    $this->templateId = $templateId;
120
  }
121
122
  public function setWhatIds($array) {
0 ignored issues
show
Coding Style introduced by
The function name setWhatIds is in camel caps, but expected set_what_ids instead as per the coding standard.
Loading history...
123
    $this->whatIds = $array;
124
  }
125
126
  public function setTargetObjectIds($array) {
0 ignored issues
show
Coding Style introduced by
The function name setTargetObjectIds is in camel caps, but expected set_target_object_ids instead as per the coding standard.
Loading history...
127
    $this->targetObjectIds = $array;
128
  }
129
}
130
?>