diff --git a/.github/workflows/static-analysis.yaml b/.github/workflows/static-analysis.yaml new file mode 100644 index 0000000..f763077 --- /dev/null +++ b/.github/workflows/static-analysis.yaml @@ -0,0 +1,14 @@ +name: static analysis + +on: + push: + branches: + - main + pull_request: + +permissions: + contents: read + +jobs: + tests: + uses: laravel/.github/.github/workflows/static-analysis.yml@main diff --git a/src/Api/Session.php b/src/Api/Session.php index e8ed17e..9c67e43 100644 --- a/src/Api/Session.php +++ b/src/Api/Session.php @@ -18,7 +18,7 @@ public function customer(): Customer { return $this->getObjectMapper()->hydrateObject( Customer::class, - $this->post('/getCustomerDetails'), + $this->post('/getCustomerDetails')['customerInfo'], ); } diff --git a/src/Entity/Customer.php b/src/Entity/Customer.php index 78ef80e..124f688 100644 --- a/src/Entity/Customer.php +++ b/src/Entity/Customer.php @@ -10,7 +10,7 @@ 'jobTitle' => 'job', 'feeAcctNo' => 'accountNumber', ])] -readonly class Info +readonly class Customer { /** * @internal @@ -23,16 +23,3 @@ public function __construct( ) { } } - -readonly class Customer -{ - /** - * @internal - */ - public function __construct( - public string $userName, - #[MapFrom('customerInfo')] - public Info $info, - ) { - } -}