Skip to content
Open
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 .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
strategy:
fail-fast: false
matrix:
php-version: [ 7.4, 7.3, 7.2, 7.1 ]
php-version: [ 7.4 ]

steps:
- uses: actions/checkout@v2
Expand Down
8 changes: 5 additions & 3 deletions .php_cs.dist → .php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<?php
$finder = PhpCsFixer\Finder::create()
->exclude('Protobuf')
->exclude('vendor')
->in(__DIR__ . '/src')
->in(__DIR__ . '/tests')
->in(__DIR__ . '/examples')
;

return PhpCsFixer\Config::create()
$config = new PhpCsFixer\Config();
$config
->setRiskyAllowed(true)
->setRules([
'array_syntax' => ['syntax' => 'short'],
'no_unused_imports' => true,
Expand All @@ -24,3 +24,5 @@
])
->setFinder($finder)
;

return $config;
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# Yoti PHP Sandbox SDK

[![Build Status](https://travis-ci.com/getyoti/yoti-php-sdk-sandbox.svg?branch=master)](https://travis-ci.com/getyoti/yoti-php-sdk-sandbox)
[![Coverage](https://sonarcloud.io/api/project_badges/measure?project=getyoti%3Aphp-sandbox&metric=coverage)](https://sonarcloud.io/dashboard?id=getyoti%3Aphp-sandbox)
[![Bugs](https://sonarcloud.io/api/project_badges/measure?project=getyoti%3Aphp-sandbox&metric=bugs)](https://sonarcloud.io/dashboard?id=getyoti%3Aphp-sandbox)
[![Code Smells](https://sonarcloud.io/api/project_badges/measure?project=getyoti%3Aphp-sandbox&metric=code_smells)](https://sonarcloud.io/dashboard?id=getyoti%3Aphp-sandbox)
[![Vulnerabilities](https://sonarcloud.io/api/project_badges/measure?project=getyoti%3Aphp-sandbox&metric=vulnerabilities)](https://sonarcloud.io/dashboard?id=getyoti%3Aphp-sandbox)
[![Build Status](https://github.com/getyoti/yoti-php-sdk-sandbox/workflows/Unit%20Tests/badge.svg?branch=master)](https://github.com/getyoti/yoti-php-sdk-sandbox/actions)
[![Coverage](https://sonarcloud.io/api/project_badges/measure?project=getyoti_yoti-php-sdk-sandbox&metric=coverage)](https://sonarcloud.io/dashboard?id=getyoti%3Aphp-sandbox)
[![Bugs](https://sonarcloud.io/api/project_badges/measure?project=getyoti_yoti-php-sdk-sandbox&metric=bugs)](https://sonarcloud.io/dashboard?id=getyoti%3Aphp-sandbox)
[![Code Smells](https://sonarcloud.io/api/project_badges/measure?project=getyoti_yoti-php-sdk-sandbox&metric=code_smells)](https://sonarcloud.io/dashboard?id=getyoti_yoti-php-sdk-sandbox)
[![Vulnerabilities](https://sonarcloud.io/api/project_badges/measure?project=getyoti_yoti-php-sdk-sandbox&metric=vulnerabilities)](https://sonarcloud.io/dashboard?id=getyoti_yoti-php-sdk-sandbox)

This repository contains the tools you need to test your Yoti integration.

Expand Down
19 changes: 14 additions & 5 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
{
"name": "yoti/yoti-php-sdk-sandbox",
"description": "Yoti PHP SDK Sandbox",
"version": "1.6.0",
"version": "1.7.0",
"keywords": [
"yoti",
"sdk"
],
"homepage": "https://yoti.com",
"license": "MIT",
"require": {
"php": "^7.1 || ^8.0",
"yoti/yoti-php-sdk": "^3.1"
"php": "^7.1 || ^8.0 || ^8.1",
"yoti/yoti-php-sdk": "^4.2"
},
"require-dev": {
"phpunit/phpunit": "^7.5 || ^8.5 || ^9.3",
"squizlabs/php_codesniffer": "^3.4",
"friendsofphp/php-cs-fixer": "^2.15",
"friendsofphp/php-cs-fixer": "^3.4",
"brainmaestro/composer-git-hooks": "^2.8",
"phpstan/phpstan-strict-rules": "^0.12.1",
"phpstan/extension-installer": "^1.0",
Expand All @@ -36,9 +36,13 @@
"test": "phpunit",
"coverage-clover": "phpunit --coverage-clover ./coverage/coverage.xml",
"coverage-html": "phpunit --coverage-html ./coverage/report",
"fix": [
"php-cs-fixer fix --config=.php-cs-fixer.dist.php -v --using-cache=no",
"phpcbf"
],
"lint": [
"phpcs",
"php-cs-fixer fix --config=.php_cs.dist -v --dry-run --using-cache=no --diff-format=udiff --ansi",
"php-cs-fixer fix --config=.php-cs-fixer.dist.php -v --dry-run --using-cache=no",
"phpstan analyse"
],
"post-install-cmd": "cghooks add --ignore-lock",
Expand All @@ -48,5 +52,10 @@
"hooks": {
"pre-commit": "composer test && composer lint"
}
},
"config": {
"allow-plugins": {
"phpstan/extension-installer": true
}
}
}
4 changes: 2 additions & 2 deletions sonar-project.properties
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
sonar.host.url = https://sonarcloud.io
sonar.organization = getyoti

sonar.projectKey = getyoti:php-sandbox
sonar.projectKey = getyoti_yoti-php-sdk-sandbox
sonar.projectName = PHP SDK Sandbox
sonar.projectVersion = 1.6.0
sonar.projectVersion = 1.7.0

sonar.language = php
sonar.sources=src
Expand Down
1 change: 0 additions & 1 deletion src/DocScan/Request/Check/Report/SandboxBreakdown.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@

class SandboxBreakdown implements \JsonSerializable
{

/**
* @var string
*/
Expand Down
1 change: 0 additions & 1 deletion src/DocScan/Request/Check/Report/SandboxCheckReport.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@

class SandboxCheckReport implements \JsonSerializable
{

/**
* @var SandboxRecommendation
*/
Expand Down
1 change: 0 additions & 1 deletion src/DocScan/Request/Check/Report/SandboxDetail.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@

class SandboxDetail implements \JsonSerializable
{

/**
* @var string
*/
Expand Down
1 change: 0 additions & 1 deletion src/DocScan/Request/Check/Report/SandboxRecommendation.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@

class SandboxRecommendation implements \JsonSerializable
{

/**
* @var string|null
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@

class SandboxRecommendationBuilder
{

/**
* @var string
*/
Expand Down
1 change: 0 additions & 1 deletion src/DocScan/Request/Check/SandboxCheck.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@

class SandboxCheck implements \JsonSerializable
{

/**
* @var SandboxCheckResult
*/
Expand Down
1 change: 0 additions & 1 deletion src/DocScan/Request/Check/SandboxCheckBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@

abstract class SandboxCheckBuilder
{

/**
* @var SandboxRecommendation
*/
Expand Down
1 change: 0 additions & 1 deletion src/DocScan/Request/Check/SandboxCheckResult.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@

class SandboxCheckResult implements \JsonSerializable
{

/**
* @var SandboxCheckReport
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,4 @@

class SandboxDocumentAuthenticityCheck extends SandboxDocumentCheck
{

}
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@

class SandboxDocumentAuthenticityCheckBuilder extends SandboxDocumentCheckBuilder
{

/**
* @return SandboxDocumentAuthenticityCheck
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,4 @@

class SandboxDocumentFaceMatchCheck extends SandboxDocumentCheck
{

}
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@

class SandboxDocumentFaceMatchCheckBuilder extends SandboxDocumentCheckBuilder
{

/**
* @return SandboxDocumentFaceMatchCheck
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@

class SandboxDocumentTextDataCheckBuilder extends SandboxDocumentCheckBuilder
{

/**
* @var array<string, mixed>|null
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@

class SandboxDocumentTextDataCheckResult extends SandboxCheckResult
{

/**
* @var array<string, mixed>|null
*/
Expand Down
18 changes: 18 additions & 0 deletions src/DocScan/Request/Check/SandboxStaticLivenessCheck.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?php

declare(strict_types=1);

namespace Yoti\Sandbox\DocScan\Request\Check;

class SandboxStaticLivenessCheck extends SandboxLivenessCheck
{
private const STATIC = 'STATIC';

/**
* @param SandboxCheckResult $result
*/
public function __construct(SandboxCheckResult $result)
{
parent::__construct($result, self::STATIC);
}
}
17 changes: 17 additions & 0 deletions src/DocScan/Request/Check/SandboxStaticLivenessCheckBuilder.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?php

declare(strict_types=1);

namespace Yoti\Sandbox\DocScan\Request\Check;

class SandboxStaticLivenessCheckBuilder extends SandboxCheckBuilder
{
/**
* @return SandboxStaticLivenessCheck
*/
public function build(): SandboxCheck
{
$result = new SandboxCheckResult($this->buildReport());
return new SandboxStaticLivenessCheck($result);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@

class SandboxSupplementaryDocumentTextDataCheckResult extends SandboxCheckResult
{

/**
* @var array<string, mixed>|null
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,4 @@

class SandboxThirdPartyIdentityCheck extends SandboxDocumentCheck
{

}
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@

class SandboxThirdPartyIdentityCheckBuilder extends SandboxDocumentCheckBuilder
{

/**
* @return SandboxThirdPartyIdentityCheck
*/
Expand Down
1 change: 0 additions & 1 deletion src/DocScan/Request/SandboxResponseConfig.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@

class SandboxResponseConfig implements \JsonSerializable
{

/**
* @var SandboxTaskResults|null
*/
Expand Down
1 change: 0 additions & 1 deletion src/DocScan/Request/SandboxResponseConfigBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@

class SandboxResponseConfigBuilder
{

/**
* @var SandboxTaskResults
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
*/
class SandboxBreakdownTest extends TestCase
{

private const SOME_SUB_CHECK = 'someSubCheck';
private const SOME_RESULT = 'someResult';

Expand Down
1 change: 0 additions & 1 deletion tests/DocScan/Request/Check/Report/SandboxDetailTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
*/
class SandboxDetailTest extends TestCase
{

private const SOME_NAME = 'someName';
private const SOME_VALUE = 'someValue';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
*/
class SandboxRecommendationTest extends TestCase
{

private const SOME_VALUE = 'someValue';
private const SOME_REASON = 'someReason';
private const SOME_RECOVERY_SUGGESTION = 'someRecoverySuggestion';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@

class SandboxDocumentAuthenticityCheckBuilderTest extends TestCase
{

/**
* @var MockObject|SandboxRecommendation
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@

class SandboxDocumentFaceMatchCheckBuilderTest extends TestCase
{

/**
* @var MockObject|SandboxRecommendation
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@

class SandboxIdDocumentComparisonCheckBuilderTest extends TestCase
{

/**
* @var MockObject|SandboxRecommendation
*/
Expand Down
Loading