Skip to content

Commit 19e38fc

Browse files
authoredOct 2, 2017
Merge pull request dekalee#11 from pzaj2/master
Fix construction of exception messages in static methods.
2 parents f49973d + b33ee0a commit 19e38fc

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed
 

‎src/AutopilotException.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ public static function invalidContactType()
233233
*/
234234
public static function contactsBulkSaveFailed($message = null)
235235
{
236-
return new static('contacts bulk upload failed' . is_null($message) ? '' : ': ' . $message);
236+
return new static('contacts bulk upload failed' . (is_null($message) ? '' : ': ' . $message));
237237
}
238238

239239
/**
@@ -245,7 +245,7 @@ public static function contactsBulkSaveFailed($message = null)
245245
*/
246246
public static function invalidAutopilotType($type = null)
247247
{
248-
return new static(is_null($type) ? 'Invalid data type.' : '"' . $type . '" is not a valid Autopilot data type');
248+
return new static((is_null($type) ? 'Invalid data type.' : '"' . $type . '" is not a valid Autopilot data type'));
249249
}
250250

251251
/**
@@ -258,7 +258,7 @@ public static function invalidAutopilotType($type = null)
258258
*/
259259
public static function typeMismatch($expected, $type = null)
260260
{
261-
return new static('Type value mismatch! Expected: ' . $expected . is_null($type) ? '' : ', got: '. $type);
261+
return new static('Type value mismatch! Expected: ' . $expected . (is_null($type) ? '' : ', got: '. $type));
262262
}
263263

264264
}

0 commit comments

Comments
 (0)