Skip to content

Commit f3fcaf3

Browse files
committed
SDK-848: PSR-2 Coding Standards
1 parent 9e7c83b commit f3fcaf3

20 files changed

+40
-34
lines changed

tests/ActivityDetailsTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,4 +156,4 @@ public function testGetReceipt()
156156
$receiptId = '9HNJDX5bEIN5TqBm0OGzVIc1LaAmbzfx6eIrwNdwpHvKeQmgPujyogC+r7hJCVPl';
157157
$this->assertEquals($receiptId, $this->activityDetails->getReceiptId());
158158
}
159-
}
159+
}

tests/Entity/AnchorTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,4 +55,4 @@ public function testYotiAnchorEndpoints()
5555
$sourceAnchor->getOriginServerCerts()[0]
5656
);
5757
}
58-
}
58+
}

tests/Entity/ApplicationProfileTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@ class ApplicationProfileTest extends TestCase
1919
public function setup()
2020
{
2121
$dummyData = [
22-
'application_name' => new Attribute('application_name','Test PHP SDK',[]),
22+
'application_name' => new Attribute('application_name', 'Test PHP SDK', []),
2323
'application_url' => new Attribute('application_url', 'https://localhost', []),
2424
'application_receipt_bgcolor' => new Attribute('application_receipt_bgcolor', '#F5F5F5', []),
25-
'application_logo' => new Attribute('application_logo', new Image('dummyImageData','png'), []),
25+
'application_logo' => new Attribute('application_logo', new Image('dummyImageData', 'png'), []),
2626
];
2727
$this->dummyProfile = new ApplicationProfile($dummyData);
2828
}
@@ -83,4 +83,4 @@ public function testGetApplicationLogoImageType()
8383
$this->dummyProfile->getApplicationLogo()->getValue()->getMimeType()
8484
);
8585
}
86-
}
86+
}

tests/Entity/AttributeTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,4 +114,4 @@ public function convertToProtobufAnchor($anchorString)
114114
$anchor->mergeFromString(base64_decode($anchorString));
115115
return $anchor;
116116
}
117-
}
117+
}

tests/Entity/DocumentDetailsTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,4 +132,4 @@ public function testShouldIgnoreTheSixthOptionalAttribute()
132132
$this->assertEquals('2016-05-01', $document->getExpirationDate()->format('Y-m-d'));
133133
$this->assertEquals('DVLA', $document->getIssuingAuthority());
134134
}
135-
}
135+
}

tests/Entity/ImageTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,4 +52,4 @@ public function testShouldThrowExceptionForUnsupportedExtension()
5252
$this->expectException("\Yoti\Exception\AttributeException");
5353
$image = new Image('dummyImageData', 'bmp');
5454
}
55-
}
55+
}

tests/Entity/ReceiptTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,4 +110,4 @@ public function testShouldParseProfileContent()
110110
$this->assertEquals('Node SDK Test', $applicationProfile->getApplicationName()->getValue());
111111
$this->assertEquals('#ffffff', $applicationProfile->getApplicationReceiptBgColor()->getValue());
112112
}
113-
}
113+
}

tests/Http/AmlResultTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ class AmlResultTest extends TestCase
1717

1818
public function setup()
1919
{
20-
$resultArr = json_decode(file_get_contents(AML_CHECK_RESULT_JSON), TRUE);
20+
$resultArr = json_decode(file_get_contents(AML_CHECK_RESULT_JSON), true);
2121
$this->amlResult = new AmlResult($resultArr);
2222
}
2323

@@ -44,4 +44,4 @@ public function testIsOnWatchList()
4444
{
4545
$this->assertFalse($this->amlResult->isOnWatchList());
4646
}
47-
}
47+
}

tests/Http/CurlRequestHandlerTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,4 +118,4 @@ public function testSendRequest()
118118
);
119119
$this->assertEquals(json_encode($expectedResult), json_encode($result));
120120
}
121-
}
121+
}

tests/Http/PayloadTest.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,10 @@ public function setup()
3535
$this->payload = new Payload($amlProfile->getData());
3636

3737
// Expected test data
38-
$this->payloadJSON = '{"given_names":"Edward Richard George","family_name":"Heath","ssn":null,"address":{"post_code":null,"country":"GBR"}}';
39-
$this->base64Payload = 'eyJnaXZlbl9uYW1lcyI6IkVkd2FyZCBSaWNoYXJkIEdlb3JnZSIsImZhbWlseV9uYW1lIjoiSGVhdGgiLCJzc24iOm51bGwsImFkZHJlc3MiOnsicG9zdF9jb2RlIjpudWxsLCJjb3VudHJ5IjoiR0JSIn19';
38+
$this->payloadJSON = '{"given_names":"Edward Richard George","family_name":"Heath",' .
39+
'"ssn":null,"address":{"post_code":null,"country":"GBR"}}';
40+
$this->base64Payload = 'eyJnaXZlbl9uYW1lcyI6IkVkd2FyZCBSaWNoYXJkIEdlb3JnZSIsImZhbWls' .
41+
'eV9uYW1lIjoiSGVhdGgiLCJzc24iOm51bGwsImFkZHJlc3MiOnsicG9zdF9jb2RlIjpudWxsLCJjb3VudHJ5IjoiR0JSIn19';
4042
}
4143

4244
/**
@@ -77,4 +79,4 @@ public function testPassingAStringAsPayloadData()
7779
$payload = new Payload($payloadData);
7880
$this->assertEquals(json_encode($payloadData), $payload->getPayloadJSON());
7981
}
80-
}
82+
}

0 commit comments

Comments
 (0)