Skip to content

Commit 7e046af

Browse files
modifications.
modifications.
1 parent 1214c3c commit 7e046af

40 files changed

+448
-377
lines changed

Api/GigyaAccountRepositoryInterface.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,13 @@ interface GigyaAccountRepositoryInterface
2222
* @throws GSApiException If error encountered on service call or functional error returned by service.
2323
* Check error code to identify the case.
2424
*/
25-
public function update($gigyaAccount);
25+
public function update(GigyaUser $gigyaAccount);
2626

2727
/**
2828
* Get a Gigya customer account.
2929
*
3030
* @param string $uid
3131
* @return GigyaUser
3232
*/
33-
public function get($uid);
33+
public function get(string $uid): GigyaUser;
3434
}

Api/GigyaAccountServiceInterface.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,15 +33,15 @@ interface GigyaAccountServiceInterface
3333
* @throws GSApiException If error encountered on service call or functional error returned by service.
3434
* Check error code to identify the case.
3535
*/
36-
public function update($gigyaAccount);
36+
public function update(GigyaUser $gigyaAccount);
3737

3838
/**
3939
* Get a Gigya customer account.
4040
*
4141
* @param string $uid
4242
* @return GigyaUser
4343
*/
44-
public function get($uid);
44+
public function get(string $uid);
4545

4646
/**
4747
* Update the Gigya service with the latest successfully updated version of an account.
@@ -51,5 +51,5 @@ public function get($uid);
5151
* @param $uid string
5252
* @return GigyaUser null if the rollback failed or if the given uid has not been updated so far (thus nothing to roll back)
5353
*/
54-
public function rollback($uid);
54+
public function rollback(string $uid);
5555
}

Block/Account/Dashboard/GigyaInfo.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,15 +49,15 @@ public function __construct(
4949
/**
5050
* @return string
5151
*/
52-
public function getProfileDesktopScreensetId()
52+
public function getProfileDesktopScreensetId(): string
5353
{
5454
return $this->configModel->getProfileDesktopScreensetId();
5555
}
5656

5757
/**
5858
* @return string
5959
*/
60-
public function getProfileMobileScreensetId()
60+
public function getProfileMobileScreensetId(): string
6161
{
6262
return $this->configModel->getProfileMobileScreensetId();
6363
}

Block/Adminhtml/Customer/Edit/Tab/View/GigyaUID.php

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,18 @@
22

33
namespace Gigya\GigyaIM\Block\Adminhtml\Customer\Edit\Tab\View;
44

5+
use Magento\Backend\Block\Template;
6+
use Magento\Customer\Api\Data\CustomerInterface;
57
use Magento\Customer\Block\Adminhtml\Edit\Tab\View\PersonalInfo;
68

7-
class GigyaUID extends \Magento\Backend\Block\Template
9+
class GigyaUID extends Template
810
{
911
/**
1012
* Extract the Gigya ID from the customer present in the parent block.
1113
*
1214
* @return bool|string
1315
*/
14-
public function getGUIDFromParentBlock()
16+
public function getGUIDFromParentBlock(): bool|string
1517
{
1618
$customer = $this->getCustomerFromParentBlock();
1719
if ($customer) {
@@ -27,9 +29,9 @@ public function getGUIDFromParentBlock()
2729
/**
2830
* Extract the current customer from the parent block.
2931
*
30-
* @return bool|\Magento\Customer\Api\Data\CustomerInterface
32+
* @return bool|CustomerInterface
3133
*/
32-
protected function getCustomerFromParentBlock()
34+
protected function getCustomerFromParentBlock(): bool|CustomerInterface
3335
{
3436
$parentBlock = $this->getParentBlock();
3537
if ($parentBlock && $parentBlock instanceof PersonalInfo) {

Block/Adminhtml/Form/AdditionalScreenSet.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
class AdditionalScreenSet extends AbstractFieldArray
1010
{
11-
private $_checkboxRenderer;
11+
private Checkbox $_checkboxRenderer;
1212

1313
public function __construct(Context $context, Checkbox $checkboxRenderer)
1414
{
@@ -20,7 +20,7 @@ public function __construct(Context $context, Checkbox $checkboxRenderer)
2020
/**
2121
* {@inheritdoc}
2222
*/
23-
protected function _prepareToRender()
23+
protected function _prepareToRender(): void
2424
{
2525
$this->addColumn('desktop_screen', ['label' => __('Screen-Set ID'), 'class' => 'required-entry', 'renderer' => false]);
2626
$this->addColumn('mobile_screen', ['label' => __('Mobile Screen-Set ID'), 'renderer' => false]);

Block/Adminhtml/Form/EmptyTextarea.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
class EmptyTextarea extends Field
99
{
10-
protected function _getElementHtml(AbstractElement $element)
10+
protected function _getElementHtml(AbstractElement $element): string
1111
{
1212
$value = $element->getEscapedValue();
1313
$label = $element->getLabel() ?? 'Value';

Block/Adminhtml/System/Config/View/Checkbox.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
class Checkbox extends AbstractBlock
88
{
9-
protected function _toHtml()
9+
protected function _toHtml(): string
1010
{
1111
$elementId = $this->getInputId();
1212
$elementName = $this->getInputName();

Block/Form/GigyaAuthenticationPopup.php

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
namespace Gigya\GigyaIM\Block\Form;
77

88
use \Magento\Customer\Block\Account\AuthenticationPopup;
9+
use Magento\Framework\Exception\LocalizedException;
910
use \Magento\Framework\View\Element\Template\Context;
1011
use \Magento\Framework\Serialize\Serializer\Json;
1112
use \Gigya\GigyaIM\Model\Config;
@@ -20,7 +21,7 @@ class GigyaAuthenticationPopup extends AuthenticationPopup
2021
/**
2122
* @var Config
2223
*/
23-
protected $config;
24+
protected Config $config;
2425

2526
/**
2627
* GigyaAuthenticationPopup constructor.
@@ -43,23 +44,24 @@ public function __construct(
4344
/**
4445
* @return string
4546
*/
46-
public function getLoginDesktopScreensetId()
47+
public function getLoginDesktopScreensetId(): string
4748
{
4849
return $this->config->getLoginDesktopScreensetId();
4950
}
5051

5152
/**
5253
* @return string
5354
*/
54-
public function getLoginMobileScreensetId()
55+
public function getLoginMobileScreensetId(): string
5556
{
5657
return $this->config->getLoginMobileScreensetId();
5758
}
5859

5960
/**
6061
* @return string
62+
* @throws LocalizedException
6163
*/
62-
public function _toHtml()
64+
public function _toHtml(): string
6365
{
6466

6567
if ($this->config->isGigyaEnabled()) {

Block/Form/GigyaLogin.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ class GigyaLogin extends Login
2222
/**
2323
* @var Config
2424
*/
25-
protected $configModel;
25+
protected Config $configModel;
2626

2727
/**
2828
* Login constructor.
@@ -47,25 +47,25 @@ public function __construct(
4747
/**
4848
* @return string
4949
*/
50-
public function getLoginDesktopScreensetId()
50+
public function getLoginDesktopScreensetId(): string
5151
{
52-
return $this->configModel->getLoginDesktopScreensetId();
52+
return (string)$this->configModel->getLoginDesktopScreensetId();
5353
}
5454

5555
/**
5656
* @return string
5757
*/
58-
public function getLoginMobileScreensetId()
58+
public function getLoginMobileScreensetId(): string
5959
{
60-
return $this->configModel->getLoginMobileScreensetId();
60+
return (string)$this->configModel->getLoginMobileScreensetId();
6161
}
6262

6363
/**
6464
* @return string
6565
*
6666
* @throws LocalizedException
6767
*/
68-
public function _toHtml()
68+
public function _toHtml(): string
6969
{
7070
if ($this->configModel->isGigyaEnabled()) {
7171
$this->getLayout()->unsetElement('customer.login.container');

Block/Form/GigyaRegister.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ class GigyaRegister extends Register
2727
/**
2828
* @var GigyaConfig
2929
*/
30-
protected $configModel;
30+
protected GigyaConfig $configModel;
3131

3232
/**
3333
* Register constructor.
@@ -75,15 +75,15 @@ public function __construct(
7575
/**
7676
* @return string
7777
*/
78-
public function getLoginDesktopScreensetId()
78+
public function getLoginDesktopScreensetId(): string
7979
{
8080
return $this->configModel->getLoginDesktopScreensetId();
8181
}
8282

8383
/**
8484
* @return string
8585
*/
86-
public function getLoginMobileScreensetId()
86+
public function getLoginMobileScreensetId(): string
8787
{
8888
return $this->configModel->getLoginMobileScreensetId();
8989
}

0 commit comments

Comments
 (0)