Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/Finance/AddressVerificationService/AVSHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class AVSHelper
{
public static function getAvs($code)
{
$code = trim(strtoupper($code));
$code = trim(strtoupper((string)$code));
switch($code)
{
case 'X':
Expand Down
4 changes: 2 additions & 2 deletions src/Finance/AddressVerificationService/AVSResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ class AVSResponse implements AVSInterface

public function __construct($code, $description)
{
$this->_code = strtoupper($code);
$this->_description = trim($description);
$this->_code = strtoupper((string)$code);
$this->_description = trim((string)$description);
}

public function getCode()
Expand Down
2 changes: 1 addition & 1 deletion src/Finance/CardVerificationValue/CVVHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class CVVHelper
{
public static function getCvv($code)
{
$code = trim(strtoupper($code));
$code = trim(strtoupper((string)$code));
switch($code)
{
case 'M':
Expand Down
4 changes: 2 additions & 2 deletions src/Finance/CardVerificationValue/CVVResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ class CVVResponse implements CVVInterface

public function __construct($code, $description)
{
$this->_code = strtoupper($code);
$this->_description = trim($description);
$this->_code = strtoupper((string)$code);
$this->_description = trim((string)$description);
}

public function getCode()
Expand Down
2 changes: 1 addition & 1 deletion src/Language/LanguageHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ public static function returnLanguages($returnType, array $codes)
public static function getLanguage($code, $default = null)
{
$code = $code ?: $default;
$code = str_replace(' ', '', ucwords(strtolower(str_replace('-', ' ', $code))));
$code = str_replace(' ', '', ucwords(strtolower(str_replace('-', ' ', (string)$code))));
$className = sprintf('\Packaged\Rwd\Language\Languages\%sLanguage', $code);
if(class_exists($className))
{
Expand Down
2 changes: 1 addition & 1 deletion src/Person/AbstractPerson.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ protected function _isCompoundFragment($word)
{
foreach($this->_compoundFragments as $fragment)
{
if(strtolower($word) == strtolower($fragment))
if(strtolower((string)$word) == strtolower((string)$fragment))
{
return true;
}
Expand Down
6 changes: 5 additions & 1 deletion src/Person/Person.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,10 @@ public function getLastName($withCompound = true)

private function _smartUcWords($string)
{
if($string === null)
{
return '';
}
// if whole string is uppercase, lowercase first
if($string == strtoupper($string))
{
Expand Down Expand Up @@ -129,7 +133,7 @@ public function __construct($name)
$name = preg_replace('/[^a-zA-Z]/', ' ', $name);
}

$this->_rawInput = $name;
$this->_rawInput = (string)$name;
$this->_parse();
}

Expand Down