Skip to content

Commit 32fc551

Browse files
committed
SDK-874: PSR-2 coding standard
1 parent 4a26ee0 commit 32fc551

33 files changed

+128
-133
lines changed

src/Yoti/ActivityDetails.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,8 @@ private function setTimestamp()
8585
try {
8686
$timestamp = $this->receipt->getTimestamp();
8787
$this->timestamp = AttributeConverter::convertTimestampToDate($timestamp);
88-
} catch(\Exception $e) {
89-
$this->timestamp = NULL;
88+
} catch (\Exception $e) {
89+
$this->timestamp = null;
9090
error_log("Warning: {$e->getMessage()}", 0);
9191
}
9292
}
@@ -184,4 +184,4 @@ public function getParentRememberMeId()
184184
{
185185
return $this->parentRememberMeId;
186186
}
187-
}
187+
}

src/Yoti/Entity/AgeVerification.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,4 +71,4 @@ public function getAttribute()
7171
{
7272
return $this->derivedAttribute;
7373
}
74-
}
74+
}

src/Yoti/Entity/AmlAddress.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ class AmlAddress
2222
* @param \Yoti\Entity\Country $country
2323
* @param null|string $postcode
2424
*/
25-
public function __construct(Country $country, $postcode = NULL)
25+
public function __construct(Country $country, $postcode = null)
2626
{
2727
$this->country = $country;
2828
$this->postcode = $postcode;
@@ -80,4 +80,4 @@ public function __toString()
8080
{
8181
return json_encode($this->getData());
8282
}
83-
}
83+
}

src/Yoti/Entity/AmlProfile.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ class AmlProfile
4444
* @param \Yoti\Entity\AmlAddress $amlAddress
4545
* @param null|string $ssn
4646
*/
47-
public function __construct($givenNames, $familyName, AmlAddress $amlAddress, $ssn = NULL)
47+
public function __construct($givenNames, $familyName, AmlAddress $amlAddress, $ssn = null)
4848
{
4949
$this->givenNames = $givenNames;
5050
$this->familyName = $familyName;
@@ -138,4 +138,4 @@ public function __toString()
138138
{
139139
return json_encode($this->getData());
140140
}
141-
}
141+
}

src/Yoti/Entity/Anchor.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,8 @@ public function getSignedTimeStamp()
8383
/**
8484
* @return array of X509 certs
8585
*/
86-
public function getOriginServerCerts() {
86+
public function getOriginServerCerts()
87+
{
8788
return $this->originServerCerts;
8889
}
89-
}
90+
}

src/Yoti/Entity/ApplicationProfile.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,4 @@ public function getApplicationReceiptBgColor()
3333
{
3434
return $this->getProfileAttribute(self::ATTR_APPLICATION_RECEIPT_BG_COLOR);
3535
}
36-
}
36+
}

src/Yoti/Entity/Attribute.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ private function setAnchors(array $anchorsMap)
113113
{
114114
// Remove Oids from the anchorsMap
115115
$anchors = [];
116-
array_walk($anchorsMap, function($val) use(&$anchors) {
116+
array_walk($anchorsMap, function ($val) use (&$anchors) {
117117
$anchors = array_merge($anchors, array_values($val));
118118
});
119119
$this->anchors = $anchors;
@@ -127,4 +127,4 @@ private function getAnchorType($anchorsMap, $anchorType)
127127
{
128128
return isset($anchorsMap[$anchorType]) ? $anchorsMap[$anchorType] : [];
129129
}
130-
}
130+
}

src/Yoti/Entity/BaseProfile.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@ public function getProfileAttribute($attributeName)
2525
{
2626
if (isset($this->profileData[$attributeName])) {
2727
$attributeObj = $this->profileData[$attributeName];
28-
return $attributeObj instanceof Attribute ? $attributeObj : NULL;
28+
return $attributeObj instanceof Attribute ? $attributeObj : null;
2929
}
30-
return NULL;
30+
return null;
3131
}
3232

3333
public function getAttributes()
@@ -37,4 +37,4 @@ public function getAttributes()
3737
unset($attributesMap[Profile::ATTR_AGE_VERIFICATIONS]);
3838
return $attributesMap;
3939
}
40-
}
40+
}

src/Yoti/Entity/Country.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,4 @@ public function getCode()
3030
{
3131
return $this->code;
3232
}
33-
}
33+
}

src/Yoti/Entity/DocumentDetails.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ private function setDocumentNumber(array $parsedValues)
142142
*/
143143
private function setExpirationDate(array $parsedValues)
144144
{
145-
$expirationDate = NULL;
145+
$expirationDate = null;
146146
if (isset($parsedValues[self::EXPIRATION_INDEX])) {
147147
$dateStr = $parsedValues[self::EXPIRATION_INDEX];
148148

@@ -160,7 +160,7 @@ private function setExpirationDate(array $parsedValues)
160160

161161
private function setIssuingAuthority(array $parsedValues)
162162
{
163-
$value = isset($parsedValues[self::AUTHORITY_INDEX]) ? $parsedValues[self::AUTHORITY_INDEX] : NULL;
163+
$value = isset($parsedValues[self::AUTHORITY_INDEX]) ? $parsedValues[self::AUTHORITY_INDEX] : null;
164164
$this->issuingAuthority = $value;
165165
}
166166

@@ -175,4 +175,4 @@ private function validateValue($value)
175175
throw new AttributeException('Invalid value for DocumentDetails');
176176
}
177177
}
178-
}
178+
}

0 commit comments

Comments
 (0)