Skip to content

Commit cada379

Browse files
committed
fix: apply sreichel's suggestions
1 parent 21c5319 commit cada379

File tree

27 files changed

+297
-81
lines changed

27 files changed

+297
-81
lines changed

app/code/core/Mage/Api2/Model/Auth/Adapter/Oauth2.php

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<?php
2+
23
/**
34
* OpenMage
45
*
@@ -17,18 +18,19 @@
1718
* @category Mage
1819
* @package Mage_Api2
1920
*/
21+
22+
declare(strict_types=1);
23+
2024
class Mage_Api2_Model_Auth_Adapter_Oauth2 extends Mage_Api2_Model_Auth_Adapter_Abstract
2125
{
2226
/**
2327
* Process request and figure out an API user type and its identifier
2428
*
25-
* Returns stdClass object with two properties: type and id
26-
*
27-
* @return stdClass
29+
* Returns Varien_Object with two properties: type and id
2830
*/
29-
public function getUserParams(Mage_Api2_Model_Request $request)
31+
public function getUserParams(Mage_Api2_Model_Request $request): Varien_Object
3032
{
31-
$userParamsObj = (object) ['type' => null, 'id' => null];
33+
$userParamsObj = new Varien_Object(['type' => null, 'id' => null]);
3234

3335
try {
3436
$token = $this->_validateToken($request);

app/code/core/Mage/Oauth2/Block/Adminhtml/Client.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414
* @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
1515
*/
1616

17+
declare(strict_types=1);
18+
1719
/**
1820
* OAuth2 Client Admin Grid Container
1921
*/

app/code/core/Mage/Oauth2/Block/Adminhtml/Client/Edit.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414
* @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
1515
*/
1616

17+
declare(strict_types=1);
18+
1719
class Mage_Oauth2_Block_Adminhtml_Client_Edit extends Mage_Adminhtml_Block_Widget_Form_Container
1820
{
1921
protected $_model;
@@ -81,7 +83,7 @@ protected function _isAllowedAction($action)
8183
/**
8284
* Retrieves the model object from the registry if it is not already set.
8385
*
84-
* @return mixed The model object from the registry.
86+
* @return Mage_Oauth2_Model_Client The model object from the registry.
8587
*/
8688
protected function getModel()
8789
{

app/code/core/Mage/Oauth2/Block/Adminhtml/Client/Edit/Form.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414
* @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
1515
*/
1616

17+
declare(strict_types=1);
18+
1719
class Mage_Oauth2_Block_Adminhtml_Client_Edit_Form extends Mage_Adminhtml_Block_Widget_Form
1820
{
1921
protected $_model;
@@ -88,7 +90,7 @@ protected function _prepareForm()
8890
/**
8991
* Retrieves the model object from the registry if it is not already set.
9092
*
91-
* @return mixed The model object from the registry.
93+
* @return Mage_Oauth2_Model_Client The model object from the registry.
9294
*/
9395
protected function getModel()
9496
{

app/code/core/Mage/Oauth2/Block/Adminhtml/Client/Grid.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414
* @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
1515
*/
1616

17+
declare(strict_types=1);
18+
1719
/**
1820
* OAuth2 Client Grid Block
1921
*/

app/code/core/Mage/Oauth2/Block/Adminhtml/Text.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414
* @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
1515
*/
1616

17+
declare(strict_types=1);
18+
1719
/**
1820
* Custom Text Form Element for OAuth2
1921
*/

app/code/core/Mage/Oauth2/Block/Authorize.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414
* @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
1515
*/
1616

17+
declare(strict_types=1);
18+
1719
/**
1820
* OAuth2 Authorization Block
1921
*/

app/code/core/Mage/Oauth2/Block/Device/Verify.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414
* @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
1515
*/
1616

17+
declare(strict_types=1);
18+
1719
/**
1820
* OAuth2 Device Verification Block
1921
*/

app/code/core/Mage/Oauth2/Controller/BaseController.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,16 @@
1414
* @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
1515
*/
1616

17+
declare(strict_types=1);
18+
1719
class Mage_Oauth2_Controller_BaseController extends Mage_Core_Controller_Front_Action
1820
{
1921
/**
2022
* Send JSON response
2123
*
2224
* @param int $code HTTP status code
2325
* @param string $message Response message
24-
* @param mixed|null $data Additional data (optional)
26+
* @param array|null $data Additional data (optional)
2527
* @return void
2628
*/
2729
protected function _sendResponse($code, $message, $data = null)

app/code/core/Mage/Oauth2/Helper/Data.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414
* @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
1515
*/
1616

17+
declare(strict_types=1);
18+
1719
class Mage_Oauth2_Helper_Data extends Mage_Core_Helper_Abstract
1820
{
1921
/**

0 commit comments

Comments
 (0)