diff --git a/app/code/core/Mage/Api/Controller/Action.php b/app/code/core/Mage/Api/Controller/Action.php index 53a2d147ffa..715158d4be4 100644 --- a/app/code/core/Mage/Api/Controller/Action.php +++ b/app/code/core/Mage/Api/Controller/Action.php @@ -32,11 +32,14 @@ */ class Mage_Api_Controller_Action extends Mage_Core_Controller_Front_Action { + /** + * @return $this + */ public function preDispatch() { $this->getLayout()->setArea('adminhtml'); Mage::app()->setCurrentStore('admin'); - $this->setFlag('', self::FLAG_NO_START_SESSION, 1); // Do not start standart session + $this->setFlag('', self::FLAG_NO_START_SESSION, 1); // Do not start standard session parent::preDispatch(); return $this; } diff --git a/app/code/core/Mage/Api/Exception.php b/app/code/core/Mage/Api/Exception.php index 63d0618266c..1677643ed3e 100644 --- a/app/code/core/Mage/Api/Exception.php +++ b/app/code/core/Mage/Api/Exception.php @@ -35,7 +35,12 @@ class Mage_Api_Exception extends Mage_Core_Exception { protected $_customMessage = null; - public function __construct($faultCode, $customMessage=null) + /** + * Mage_Api_Exception constructor. + * @param string $faultCode + * @param string|null $customMessage + */ + public function __construct($faultCode, $customMessage = null) { parent::__construct($faultCode); $this->_customMessage = $customMessage; @@ -44,10 +49,10 @@ public function __construct($faultCode, $customMessage=null) /** * Custom error message, if error is not in api. * - * @return unknown + * @return string */ public function getCustomMessage() { return $this->_customMessage; } -} // Class Mage_Api_Model_Resource_Exception End +} diff --git a/app/code/core/Mage/Api/Helper/Data.php b/app/code/core/Mage/Api/Helper/Data.php index 416c12ce84e..60ec4482361 100644 --- a/app/code/core/Mage/Api/Helper/Data.php +++ b/app/code/core/Mage/Api/Helper/Data.php @@ -57,7 +57,6 @@ public function isComplianceWSI() * Go through a WSI args array and turns it to correct state. * * @param Object $obj - Link to Object - * @return Object */ public function wsiArrayUnpacker(&$obj) { @@ -89,8 +88,8 @@ public function wsiArrayUnpacker(&$obj) /** * Go through an object parameters and unpack associative object to array. * - * @param Object $obj - Link to Object - * @return Object + * @param Object|array $obj - Link to Object + * @return bool */ public function v2AssociativeArrayUnpacker(&$obj) { @@ -167,7 +166,7 @@ public function associativeArrayUnpack(&$mixed) * Corrects data representation. * * @param Object $obj - Link to Object - * @return Object + * @return array */ public function clearWsiFootprints(&$obj) { @@ -222,10 +221,10 @@ public function wsiArrayPacker($mixed) /** * For response to the WSI, generates an object from array. * - * @param Array $arr - Link to Object - * @return Object + * @param array $arr - Link to Object + * @return stdClass */ - public function packArrayToObject(Array $arr) + public function packArrayToObject(array $arr) { $obj = new stdClass(); $obj->complexObjectArray = $arr; diff --git a/app/code/core/Mage/Api/Helper/Object/Role.php b/app/code/core/Mage/Api/Helper/Object/Role.php new file mode 100644 index 00000000000..e0cd6491e4f --- /dev/null +++ b/app/code/core/Mage/Api/Helper/Object/Role.php @@ -0,0 +1,10 @@ +_isCleanIP(Mage::helper('core/http')->getRemoteAddr()); } + /** + * @param $ip + */ protected function _isCleanIP($ip) { // ... diff --git a/app/code/core/Mage/Api/Model/Acl/Assert/Time.php b/app/code/core/Mage/Api/Model/Acl/Assert/Time.php index 65275a74a14..b157fccc979 100644 --- a/app/code/core/Mage/Api/Model/Acl/Assert/Time.php +++ b/app/code/core/Mage/Api/Model/Acl/Assert/Time.php @@ -37,9 +37,9 @@ class Mage_Api_Model_Acl_Assert_Time implements Zend_Acl_Assert_Interface /** * Assert time * - * @param Zend_Acl $acl - * @param Zend_Acl_Role_Interface $role - * @param Zend_Acl_Resource_Interface $resource + * @param Mage_Api_Model_Acl $acl + * @param Mage_Api_Model_Acl_Role $role + * @param Mage_Api_Model_Acl_Resource $resource * @param string $privilege * @return boolean */ @@ -49,6 +49,9 @@ public function assert(Mage_Api_Model_Acl $acl, Mage_Api_Model_Acl_Role $role = return $this->_isCleanTime(time()); } + /** + * @param $time + */ protected function _isCleanTime($time) { // ... diff --git a/app/code/core/Mage/Api/Model/Acl/Role/Registry.php b/app/code/core/Mage/Api/Model/Acl/Role/Registry.php index b7713795a4b..f8ff8d000b2 100644 --- a/app/code/core/Mage/Api/Model/Acl/Role/Registry.php +++ b/app/code/core/Mage/Api/Model/Acl/Role/Registry.php @@ -39,7 +39,7 @@ class Mage_Api_Model_Acl_Role_Registry extends Zend_Acl_Role_Registry * * @param Zend_Acl_Role_Interface|string $role * @param array|Zend_Acl_Role_Interface|string $parents - * @return Mage_Auth_Model_Acl_Role_Registry + * @return $this */ function addParent($role, $parents) { diff --git a/app/code/core/Mage/Api/Model/Config.php b/app/code/core/Mage/Api/Model/Config.php index 46bae65c75b..d75a055e326 100644 --- a/app/code/core/Mage/Api/Model/Config.php +++ b/app/code/core/Mage/Api/Model/Config.php @@ -36,11 +36,9 @@ class Mage_Api_Model_Config extends Varien_Simplexml_Config const CACHE_TAG = 'config_api'; /** - * Constructor - * - * @see Varien_Simplexml_Config + * @inheritDoc */ - public function __construct($sourceData=null) + public function __construct($sourceData = null) { $this->setCacheId('config_api'); $this->setCacheTags(array(self::CACHE_TAG)); @@ -99,7 +97,7 @@ public function getAdapters() { $adapters = array(); foreach ($this->getNode('adapters')->children() as $adapterName => $adapter) { - /* @var $adapter Varien_SimpleXml_Element */ + /* @var Varien_SimpleXml_Element $adapter */ if (isset($adapter->use)) { $adapter = $this->getNode('adapters/' . (string) $adapter->use); } @@ -138,7 +136,7 @@ public function getActiveAdapters() /** * Retrieve handlers * - * @return Varien_Simplexml_Element + * @return SimpleXMLElement */ public function getHandlers() { @@ -148,7 +146,7 @@ public function getHandlers() /** * Retrieve resources * - * @return Varien_Simplexml_Element + * @return SimpleXMLElement */ public function getResources() { @@ -158,7 +156,7 @@ public function getResources() /** * Retrieve resources alias * - * @return Varien_Simplexml_Element + * @return SimpleXMLElement */ public function getResourcesAlias() { @@ -174,7 +172,7 @@ public function getResourcesAlias() * @param string $parentName * @return $this */ - public function loadAclResources(Mage_Api_Model_Acl $acl, $resource=null, $parentName=null) + public function loadAclResources(Mage_Api_Model_Acl $acl, $resource = null, $parentName = null) { $resourceName = null; if (is_null($resource)) { @@ -202,7 +200,7 @@ public function loadAclResources(Mage_Api_Model_Acl $acl, $resource=null, $paren * Get acl assert config * * @param string $name - * @return Mage_Core_Model_Config_Element|boolean + * @return bool|Mage_Core_Model_Config_Element|SimpleXMLElement */ public function getAclAssert($name='') { @@ -222,12 +220,12 @@ public function getAclAssert($name='') * Retrieve privilege set by name * * @param string $name - * @return Mage_Core_Model_Config_Element|boolean + * @return bool|Mage_Core_Model_Config_Element|SimpleXMLElement */ - public function getAclPrivilegeSet($name='') + public function getAclPrivilegeSet($name = '') { $sets = $this->getNode('acl/privilegeSets'); - if (''===$name) { + if ('' === $name) { return $sets; } @@ -238,7 +236,11 @@ public function getAclPrivilegeSet($name='') return false; } - public function getFaults($resourceName=null) + /** + * @param string|null $resourceName + * @return array + */ + public function getFaults($resourceName = null) { if (is_null($resourceName) || !isset($this->getResources()->$resourceName) @@ -247,7 +249,7 @@ public function getFaults($resourceName=null) } else { $faultsNode = $this->getResources()->$resourceName->faults; } - /* @var $faultsNode Varien_Simplexml_Element */ + /* @var Varien_Simplexml_Element $faultsNode */ $translateModule = 'api'; if (isset($faultsNode['module'])) { @@ -268,23 +270,38 @@ public function getFaults($resourceName=null) /** * Retrieve cache object * - * @return Zend_Cache_Frontend_File + * @return Zend_Cache_Core */ public function getCache() { return Mage::app()->getCache(); } + /** + * @param string $id + * @return bool|mixed + */ protected function _loadCache($id) { return Mage::app()->loadCache($id); } + /** + * @param string $data + * @param string $id + * @param array $tags + * @param bool $lifetime + * @return bool|Mage_Core_Model_App + */ protected function _saveCache($data, $id, $tags=array(), $lifetime=false) { return Mage::app()->saveCache($data, $id, $tags, $lifetime); } + /** + * @param string $id + * @return Mage_Core_Model_App + */ protected function _removeCache($id) { return Mage::app()->removeCache($id); diff --git a/app/code/core/Mage/Api/Model/Resource/Abstract.php b/app/code/core/Mage/Api/Model/Resource/Abstract.php index 4c1ce3f779c..bbc4358a5e7 100644 --- a/app/code/core/Mage/Api/Model/Resource/Abstract.php +++ b/app/code/core/Mage/Api/Model/Resource/Abstract.php @@ -97,8 +97,10 @@ protected function _getServer() * Dispatches fault * * @param string $code + * @param string|null $customMessage + * @throws Mage_Api_Exception */ - protected function _fault($code, $customMessage=null) + protected function _fault($code, $customMessage = null) { throw new Mage_Api_Exception($code, $customMessage); } diff --git a/app/code/core/Mage/Api/Model/Resource/Acl.php b/app/code/core/Mage/Api/Model/Resource/Acl.php index 68b0182ac4a..e9b8a4a8fff 100644 --- a/app/code/core/Mage/Api/Model/Resource/Acl.php +++ b/app/code/core/Mage/Api/Model/Resource/Acl.php @@ -78,13 +78,13 @@ public function loadAcl() * Load roles * * @param Mage_Api_Model_Acl $acl - * @param array $rolesArr + * @param array[] $rolesArr * @return $this */ public function loadRoles(Mage_Api_Model_Acl $acl, array $rolesArr) { foreach ($rolesArr as $role) { - $parent = $role['parent_id']>0 ? Mage_Api_Model_Acl::ROLE_TYPE_GROUP.$role['parent_id'] : null; + $parent = $role['parent_id']>0 ? Mage_Api_Model_Acl::ROLE_TYPE_GROUP.$role['parent_id'] : ''; switch ($role['role_type']) { case Mage_Api_Model_Acl::ROLE_TYPE_GROUP: $roleId = $role['role_type'].$role['role_id']; diff --git a/app/code/core/Mage/Api/Model/Resource/Acl/Role.php b/app/code/core/Mage/Api/Model/Resource/Acl/Role.php index 2219837e619..fc25e91bfda 100644 --- a/app/code/core/Mage/Api/Model/Resource/Acl/Role.php +++ b/app/code/core/Mage/Api/Model/Resource/Acl/Role.php @@ -28,6 +28,8 @@ /** * ACL role resource * + * @method $this setCreated(string $value) + * * @category Mage * @package Mage_Api * @author Magento Core Team diff --git a/app/code/core/Mage/Api/Model/Resource/Role.php b/app/code/core/Mage/Api/Model/Resource/Role.php index 85f6ac997df..aeaff60e72e 100644 --- a/app/code/core/Mage/Api/Model/Resource/Role.php +++ b/app/code/core/Mage/Api/Model/Resource/Role.php @@ -46,7 +46,7 @@ protected function _construct() /** * Action before save * - * @param Mage_Core_Model_Abstract $object + * @param Mage_Core_Model_Abstract|Mage_Api_Model_Role $object * @return $this */ protected function _beforeSave(Mage_Core_Model_Abstract $object) @@ -59,12 +59,7 @@ protected function _beforeSave(Mage_Core_Model_Abstract $object) } /** - * Load an object - * - * @param Mage_Core_Model_Abstract $object - * @param mixed $value - * @param string $field field to load by (defaults to model id) - * @return Mage_Core_Model_Resource_Db_Abstract + * @inheritDoc */ public function load(Mage_Core_Model_Abstract $object, $value, $field = null) { diff --git a/app/code/core/Mage/Api/Model/Resource/Role/Collection.php b/app/code/core/Mage/Api/Model/Resource/Role/Collection.php index 65306844697..4e5cb1d587d 100644 --- a/app/code/core/Mage/Api/Model/Resource/Role/Collection.php +++ b/app/code/core/Mage/Api/Model/Resource/Role/Collection.php @@ -46,7 +46,7 @@ protected function _construct() /** * Aet user filter * - * @param int $userId + * @param int|string $userId * @return $this */ public function setUserFilter($userId) diff --git a/app/code/core/Mage/Api/Model/Resource/Roles.php b/app/code/core/Mage/Api/Model/Resource/Roles.php index e8e4fcf0799..d5943e633b2 100644 --- a/app/code/core/Mage/Api/Model/Resource/Roles.php +++ b/app/code/core/Mage/Api/Model/Resource/Roles.php @@ -37,14 +37,14 @@ class Mage_Api_Model_Resource_Roles extends Mage_Core_Model_Resource_Db_Abstract /** * User table name * - * @var unknown + * @var string */ protected $_usersTable; /** * Rule table name * - * @var unknown + * @var string */ protected $_ruleTable; @@ -63,7 +63,7 @@ protected function _construct() /** * Action before save * - * @param Mage_Core_Model_Abstract $role + * @param Mage_Core_Model_Abstract|Mage_Api_Model_Roles $role * @return $this */ protected function _beforeSave(Mage_Core_Model_Abstract $role) @@ -77,7 +77,7 @@ protected function _beforeSave(Mage_Core_Model_Abstract $role) } if ($role->getPid() > 0) { - $row = $this->load($role->getPid()); + $row = $this->load($role->getPid(), null); } else { $row = array('tree_level' => 0); } @@ -94,8 +94,10 @@ protected function _beforeSave(Mage_Core_Model_Abstract $role) */ protected function _afterSave(Mage_Core_Model_Abstract $role) { - $this->_updateRoleUsersAcl($role); - Mage::app()->getCache()->clean(Zend_Cache::CLEANING_MODE_MATCHING_TAG); + if ($role instanceof Mage_Api_Model_Roles) { + $this->_updateRoleUsersAcl($role); + Mage::app()->getCache()->clean(Zend_Cache::CLEANING_MODE_MATCHING_TAG); + } return $this; } @@ -117,7 +119,7 @@ protected function _afterDelete(Mage_Core_Model_Abstract $role) * Get role users * * @param Mage_Api_Model_Roles $role - * @return unknown + * @return array */ public function getRoleUsers(Mage_Api_Model_Roles $role) { diff --git a/app/code/core/Mage/Api/Model/Resource/Rules.php b/app/code/core/Mage/Api/Model/Resource/Rules.php index 4e6b30fc4e4..7934328cb8c 100644 --- a/app/code/core/Mage/Api/Model/Resource/Rules.php +++ b/app/code/core/Mage/Api/Model/Resource/Rules.php @@ -50,6 +50,7 @@ protected function _construct() */ public function saveRel(Mage_Api_Model_Rules $rule) { + $permission = ''; $adapter = $this->_getWriteAdapter(); $adapter->beginTransaction(); diff --git a/app/code/core/Mage/Api/Model/Resource/Rules/Collection.php b/app/code/core/Mage/Api/Model/Resource/Rules/Collection.php index 98c34a0acc5..491657b14a4 100644 --- a/app/code/core/Mage/Api/Model/Resource/Rules/Collection.php +++ b/app/code/core/Mage/Api/Model/Resource/Rules/Collection.php @@ -46,7 +46,7 @@ protected function _construct() /** * Retrieve rules by role * - * @param int $id + * @param string $id * @return $this */ public function getByRoles($id) diff --git a/app/code/core/Mage/Api/Model/Resource/User.php b/app/code/core/Mage/Api/Model/Resource/User.php index 5592c37d106..59236ce20d0 100644 --- a/app/code/core/Mage/Api/Model/Resource/User.php +++ b/app/code/core/Mage/Api/Model/Resource/User.php @@ -193,13 +193,13 @@ public function clearBySessId($sessid) /** * Retrieve api user role data if it was assigned to role * - * @param int | Mage_Api_Model_User $user - * @return null | array + * @param int|Mage_Api_Model_User|Mage_Core_Model_Abstract $user + * @return array */ public function hasAssigned2Role($user) { $userId = null; - $result = null; + $result = array(); if (is_numeric($user)) { $userId = $user; } else if ($user instanceof Mage_Core_Model_Abstract) { @@ -219,7 +219,7 @@ public function hasAssigned2Role($user) /** * Action before save * - * @param Mage_Core_Model_Abstract $user + * @param Mage_Core_Model_Abstract|Mage_Api_Model_User $user * @return $this */ protected function _beforeSave(Mage_Core_Model_Abstract $user) @@ -259,8 +259,8 @@ public function delete(Mage_Core_Model_Abstract $user) /** * Save user roles * - * @param Mage_Core_Model_Abstract $user - * @return unknown + * @param Mage_Core_Model_Abstract|Mage_Api_Model_User $user + * @return $this|Mage_Core_Model_Abstract */ public function _saveRelations(Mage_Core_Model_Abstract $user) { @@ -335,7 +335,7 @@ public function _getRoles(Mage_Core_Model_Abstract $user) /** * Add Role * - * @param Mage_Core_Model_Abstract $user + * @param Mage_Core_Model_Abstract|Mage_Api_Model_User $user * @return $this */ public function add(Mage_Core_Model_Abstract $user) @@ -354,7 +354,7 @@ public function add(Mage_Core_Model_Abstract $user) if ($user->getId() > 0) { $role = Mage::getModel('api/role')->load($user->getRoleId()); } else { - $role = new Varien_Object(array('tree_level' => 0)); + $role = new Mage_Api_Helper_Object_Role(array('tree_level' => 0)); } $adapter->insert($this->getTable('api/role'), array( 'parent_id' => $user->getRoleId(), @@ -371,7 +371,7 @@ public function add(Mage_Core_Model_Abstract $user) /** * Delete from role * - * @param Mage_Core_Model_Abstract $user + * @param Mage_Core_Model_Abstract|Mage_Api_Model_User $user * @return $this */ public function deleteFromRole(Mage_Core_Model_Abstract $user) @@ -397,7 +397,7 @@ public function deleteFromRole(Mage_Core_Model_Abstract $user) /** * Retrieve roles which exists for user * - * @param Mage_Core_Model_Abstract $user + * @param Mage_Core_Model_Abstract|Mage_Api_Model_User $user * @return array */ public function roleUserExists(Mage_Core_Model_Abstract $user) @@ -416,7 +416,7 @@ public function roleUserExists(Mage_Core_Model_Abstract $user) /** * Check if user not unique * - * @param Mage_Core_Model_Abstract $user + * @param Mage_Core_Model_Abstract|Mage_Api_Model_User $user * @return array */ public function userExists(Mage_Core_Model_Abstract $user) diff --git a/app/code/core/Mage/Api/Model/Role.php b/app/code/core/Mage/Api/Model/Role.php index 5a1323dcbd4..4283576db5c 100644 --- a/app/code/core/Mage/Api/Model/Role.php +++ b/app/code/core/Mage/Api/Model/Role.php @@ -30,17 +30,19 @@ * @method Mage_Api_Model_Resource_Role _getResource() * @method Mage_Api_Model_Resource_Role getResource() * @method int getParentId() - * @method Mage_Api_Model_Role setParentId(int $value) + * @method $this setParentId(int $value) * @method int getTreeLevel() - * @method Mage_Api_Model_Role setTreeLevel(int $value) + * @method $this setTreeLevel(int $value) * @method int getSortOrder() - * @method Mage_Api_Model_Role setSortOrder(int $value) + * @method $this setSortOrder(int $value) * @method string getRoleType() - * @method Mage_Api_Model_Role setRoleType(string $value) + * @method $this setRoleType(string $value) * @method int getUserId() - * @method Mage_Api_Model_Role setUserId(int $value) + * @method $this setUserId(int $value) * @method string getRoleName() - * @method Mage_Api_Model_Role setRoleName(string $value) + * @method $this setRoleName(string $value) + * @method $this setCreated(string $value) + * @method $this setModified(string $value) * * @category Mage * @package Mage_Api diff --git a/app/code/core/Mage/Api/Model/Roles.php b/app/code/core/Mage/Api/Model/Roles.php index f70d62ad4cf..f4b5b240161 100644 --- a/app/code/core/Mage/Api/Model/Roles.php +++ b/app/code/core/Mage/Api/Model/Roles.php @@ -30,19 +30,20 @@ * @method Mage_Api_Model_Resource_Roles _getResource() * @method Mage_Api_Model_Resource_Roles getResource() * @method int getParentId() - * @method Mage_Api_Model_Roles setParentId(int $value) + * @method $this setParentId(int $value) * @method int getTreeLevel() - * @method Mage_Api_Model_Roles setTreeLevel(int $value) + * @method $this setTreeLevel(int $value) * @method int getSortOrder() - * @method Mage_Api_Model_Roles setSortOrder(int $value) + * @method $this setSortOrder(int $value) * @method string getRoleType() - * @method Mage_Api_Model_Roles setRoleType(string $value) + * @method $this setRoleType(string $value) * @method int getUserId() - * @method Mage_Api_Model_Roles setUserId(int $value) + * @method $this setUserId(int $value) * @method string getRoleName() - * @method Mage_Api_Model_Roles setRoleName(string $value) + * @method $this setRoleName(string $value) * @method string getName() * @method Mage_Api_Model_Role setName() setName(string $name) + * @method int getPid() * * @category Mage * @package Mage_Api @@ -63,37 +64,64 @@ protected function _construct() $this->_init('api/roles'); } + /** + * @return $this + */ public function update() { $this->getResource()->update($this); return $this; } + /** + * @return Mage_Api_Model_Resource_Roles_User_Collection + */ public function getUsersCollection() { return Mage::getResourceModel('api/roles_user_collection'); } + /** + * @return array|false|Varien_Simplexml_Element + */ public function getResourcesTree() { return $this->_buildResourcesArray(null, null, null, null, true); } + /** + * @return array|false|Varien_Simplexml_Element + */ public function getResourcesList() { return $this->_buildResourcesArray(); } + /** + * @return array|false|Varien_Simplexml_Element + */ public function getResourcesList2D() { return $this->_buildResourcesArray(null, null, null, true); } + /** + * @return array + */ public function getRoleUsers() { return $this->getResource()->getRoleUsers($this); } + /** + * @param Varien_Simplexml_Element|null $resource + * @param string|null $parentName + * @param int $level + * @param bool|null $represent2Darray + * @param bool $rawNodes + * @param string $module + * @return array|false|Varien_Simplexml_Element + */ protected function _buildResourcesArray( Varien_Simplexml_Element $resource = null, $parentName = null, $level = 0, $represent2Darray = null, $rawNodes = false, $module = 'adminhtml' @@ -172,7 +200,7 @@ public function filter() if (!$this->_filters || !$data) { return $this; } - /** @var $filter Mage_Core_Model_Input_Filter */ + /** @var Mage_Core_Model_Input_Filter $filter */ $filter = Mage::getModel('core/input_filter'); $filter->setFilters($this->_filters); $this->setData($filter->filter($data)); diff --git a/app/code/core/Mage/Api/Model/Rules.php b/app/code/core/Mage/Api/Model/Rules.php index c5ff981d07a..ea885db9339 100644 --- a/app/code/core/Mage/Api/Model/Rules.php +++ b/app/code/core/Mage/Api/Model/Rules.php @@ -53,16 +53,29 @@ protected function _construct() $this->_init('api/rules'); } - public function update() { + /** + * @return $this + */ + public function update() + { $this->getResource()->update($this); return $this; } - public function getCollection() { + /** + * @return Mage_Api_Model_Resource_Permissions_Collection + */ + public function getCollection() + { return Mage::getResourceModel('api/permissions_collection'); } - public function saveRel() { + /** + * @return $this + * @throws Mage_Core_Exception + */ + public function saveRel() + { $this->getResource()->saveRel($this); return $this; } diff --git a/app/code/core/Mage/Api/Model/Server.php b/app/code/core/Mage/Api/Model/Server.php index a9fefb4542d..c00958578d5 100644 --- a/app/code/core/Mage/Api/Model/Server.php +++ b/app/code/core/Mage/Api/Model/Server.php @@ -55,7 +55,7 @@ class Mage_Api_Model_Server */ public function getAdapterCodeByAlias($alias) { - /** @var $config Mage_Api_Model_Config */ + /** @var Mage_Api_Model_Config $config */ $config = Mage::getSingleton('api/config'); $aliases = $config->getAdapterAliases(); @@ -97,12 +97,12 @@ public function init(Mage_Api_Controller_Action $controller, $adapter = 'default */ public function initialize($adapterCode, $handler = null) { - /** @var $helper Mage_Api_Model_Config */ + /** @var Mage_Api_Model_Config $helper */ $helper = Mage::getSingleton('api/config'); $adapters = $helper->getActiveAdapters(); if (isset($adapters[$adapterCode])) { - /** @var $adapterModel Mage_Api_Model_Server_Adapter_Interface */ + /** @var Mage_Api_Model_Server_Adapter_Interface $adapterModel */ $adapterModel = Mage::getModel((string) $adapters[$adapterCode]->model); if (!($adapterModel instanceof Mage_Api_Model_Server_Adapter_Interface)) { diff --git a/app/code/core/Mage/Api/Model/Server/Adapter/Soap.php b/app/code/core/Mage/Api/Model/Server/Adapter/Soap.php index 3c1d10e4a82..9262c7f0877 100644 --- a/app/code/core/Mage/Api/Model/Server/Adapter/Soap.php +++ b/app/code/core/Mage/Api/Model/Server/Adapter/Soap.php @@ -38,7 +38,7 @@ class Mage_Api_Model_Server_Adapter_Soap /** * Wsdl config * - * @var Varien_Object + * @var Mage_Api_Helper_Object_Wsdl */ protected $wsdlConfig = null; @@ -64,7 +64,7 @@ protected function _construct() */ protected function _getWsdlConfig() { - $wsdlConfig = new Varien_Object(); + $wsdlConfig = new Mage_Api_Helper_Object_Wsdl(); $queryParams = $this->getController()->getRequest()->getQuery(); if (isset($queryParams['wsdl'])) { unset($queryParams['wsdl']); @@ -132,8 +132,8 @@ public function getController() /** * Run webservice * - * @param Mage_Api_Controller_Action $controller * @return $this + * @throws SoapFault */ public function run() { @@ -220,8 +220,10 @@ protected function _extensionLoaded() /** * Transform wsdl url if $_SERVER["PHP_AUTH_USER"] is set * - * @param array - * @return String + * @param array $params + * @param bool $withAuth + * @return string + * @throws Zend_Uri_Exception */ protected function getWsdlUrl($params = null, $withAuth = true) { diff --git a/app/code/core/Mage/Api/Model/Server/Handler/Abstract.php b/app/code/core/Mage/Api/Model/Server/Handler/Abstract.php index 2d38e8056f4..efccac0d7f2 100644 --- a/app/code/core/Mage/Api/Model/Server/Handler/Abstract.php +++ b/app/code/core/Mage/Api/Model/Server/Handler/Abstract.php @@ -41,6 +41,12 @@ public function __construct() Mage::app()->loadAreaPart(Mage_Core_Model_App_Area::AREA_ADMINHTML, Mage_Core_Model_App_Area::PART_EVENTS); } + /** + * @param int $errorCode + * @param string $errorMessage + * @param string $errorFile + * @return bool + */ public function handlePhpError($errorCode, $errorMessage, $errorFile) { Mage::log($errorMessage . $errorFile); @@ -314,7 +320,7 @@ public function call($sessionId, $apiPath, $args = array()) * @param string $sessionId * @param array $calls * @param array $options - * @return array + * @return array|void */ public function multiCall($sessionId, array $calls = array(), $options = array()) { @@ -440,7 +446,7 @@ public function multiCall($sessionId, array $calls = array(), $options = array() * List of available resources * * @param string $sessionId - * @return array + * @return array|void */ public function resources($sessionId) { @@ -505,7 +511,7 @@ public function resources($sessionId) * * @param string $sessionId * @param string $resourceName - * @return array + * @return array|void */ public function resourceFaults($sessionId, $resourceName) { @@ -575,7 +581,7 @@ public function processingMethodResult($result) * Prepare Api row data for XML exporting * Convert not allowed symbol to numeric character reference * - * @param $row + * @param mixed $row * @return mixed */ public function processingRow($row) @@ -589,4 +595,4 @@ function ($matches) { ); return $row; } -} // Class Mage_Api_Model_Server_Handler_Abstract End +} diff --git a/app/code/core/Mage/Api/Model/Server/V2/Adapter/Soap.php b/app/code/core/Mage/Api/Model/Server/V2/Adapter/Soap.php index ac64c7adeef..2590778e88e 100644 --- a/app/code/core/Mage/Api/Model/Server/V2/Adapter/Soap.php +++ b/app/code/core/Mage/Api/Model/Server/V2/Adapter/Soap.php @@ -49,8 +49,8 @@ protected function _getWsdlConfig() /** * Run webservice * - * @param Mage_Api_Controller_Action $controller * @return Mage_Api_Model_Server_Adapter_Soap + * @throws SoapFault */ public function run() { diff --git a/app/code/core/Mage/Api/Model/Server/V2/Handler.php b/app/code/core/Mage/Api/Model/Server/V2/Handler.php index 34f11838a34..78c3ee6defe 100644 --- a/app/code/core/Mage/Api/Model/Server/V2/Handler.php +++ b/app/code/core/Mage/Api/Model/Server/V2/Handler.php @@ -38,11 +38,11 @@ class Mage_Api_Model_Server_V2_Handler extends Mage_Api_Model_Server_Handler_Abs /** * Interceptor for all interfaces * - * @param sttring $function + * @param string $function * @param array $args + * @return mixed */ - - public function __call( $function, $args ) + public function __call($function, $args) { $sessionId = array_shift( $args ); $apiKey = ''; diff --git a/app/code/core/Mage/Api/Model/Server/Wsi/Adapter/Soap.php b/app/code/core/Mage/Api/Model/Server/Wsi/Adapter/Soap.php index f8d1a9ba54d..484f392821c 100644 --- a/app/code/core/Mage/Api/Model/Server/Wsi/Adapter/Soap.php +++ b/app/code/core/Mage/Api/Model/Server/Wsi/Adapter/Soap.php @@ -31,7 +31,7 @@ * @package Mage_Api * @author Magento Core Team */ -class Mage_Api_Model_Server_WSI_Adapter_Soap extends Mage_Api_Model_Server_Adapter_Soap +class Mage_Api_Model_Server_Wsi_Adapter_Soap extends Mage_Api_Model_Server_Adapter_Soap { /** * Get wsdl config @@ -49,8 +49,8 @@ protected function _getWsdlConfig() /** * Run webservice * - * @param Mage_Api_Controller_Action $controller - * @return Mage_Api_Model_Server_Adapter_Soap + * @return $this + * @throws SoapFault */ public function run() { diff --git a/app/code/core/Mage/Api/Model/Server/Wsi/Handler.php b/app/code/core/Mage/Api/Model/Server/Wsi/Handler.php index 7937be092bd..9b6b816ff0a 100644 --- a/app/code/core/Mage/Api/Model/Server/Wsi/Handler.php +++ b/app/code/core/Mage/Api/Model/Server/Wsi/Handler.php @@ -31,7 +31,7 @@ * @package Mage_Api * @author Magento Core Team */ -class Mage_Api_Model_Server_WSI_Handler extends Mage_Api_Model_Server_Handler_Abstract +class Mage_Api_Model_Server_Wsi_Handler extends Mage_Api_Model_Server_Handler_Abstract { protected $_resourceSuffix = '_v2'; @@ -40,8 +40,8 @@ class Mage_Api_Model_Server_WSI_Handler extends Mage_Api_Model_Server_Handler_Ab * * @param string $function * @param array $args + * @return stdClass */ - public function __call ($function, $args) { $args = $args[0]; @@ -107,7 +107,7 @@ public function login($username, $apiKey = null) * Return called class and method names * * @param String $apiPath - * @return Array + * @return array|void */ protected function _getResourceName($apiPath){ @@ -139,7 +139,7 @@ protected function _getResourceName($apiPath){ * * @param String $modelName * @param String $methodName - * @return Array of ReflectionParameter + * @return array of ReflectionParameter */ public function getMethodParams($modelName, $methodName) { @@ -151,15 +151,15 @@ public function getMethodParams($modelName, $methodName) { /** * Prepares arguments for the method calling. Sort in correct order, set default values for omitted parameters. * - * @param Array $params - * @param Array $args - * @return Array + * @param array $params + * @param array $args + * @return array */ public function prepareArgs($params, $args) { $callArgs = array(); - /** @var $parameter ReflectionParameter */ + /** @var ReflectionParameter $parameter */ foreach($params AS $parameter){ $pName = $parameter->getName(); if( isset( $args[$pName] ) ){ diff --git a/app/code/core/Mage/Api/Model/Session.php b/app/code/core/Mage/Api/Model/Session.php index 39131d2deb6..7df0f5bc264 100644 --- a/app/code/core/Mage/Api/Model/Session.php +++ b/app/code/core/Mage/Api/Model/Session.php @@ -27,6 +27,11 @@ /** * Webservice api session * + * @method Mage_Api_Model_User getUser() + * @method $this setUser(Mage_Api_Model_User $user) + * @method Mage_Api_Model_Acl getAcl() + * @method $this setAcl(Mage_Api_Model_Acl $loadAcl) + * * @category Mage * @package Mage_Api * @author Magento Core Team @@ -36,7 +41,11 @@ class Mage_Api_Model_Session extends Mage_Core_Model_Session_Abstract public $sessionIds = array(); protected $_currentSessId = null; - public function start($sessionName=null) + /** + * @param string|null $sessionName + * @return $this + */ + public function start($sessionName = null) { // parent::start($sessionName=null); $this->_currentSessId = md5(time() . uniqid('', true) . $sessionName); @@ -44,7 +53,12 @@ public function start($sessionName=null) return $this; } - public function init($namespace, $sessionName=null) + /** + * @param string $namespace + * @param string|null $sessionName + * @return $this + */ + public function init($namespace, $sessionName = null) { if (is_null($this->_currentSessId)) { $this->start(); @@ -52,11 +66,18 @@ public function init($namespace, $sessionName=null) return $this; } + /** + * @return string + */ public function getSessionId() { return $this->_currentSessId; } + /** + * @param string|null $sessId + * @return $this + */ public function setSessionId($sessId = null) { if (!is_null($sessId)) { @@ -65,12 +86,19 @@ public function setSessionId($sessId = null) return $this; } + /** + * @return void + */ public function revalidateCookie() { // In api we don't use cookies } - public function clear() { + /** + * @return bool + */ + public function clear() + { if ($sessId = $this->getSessionId()) { try { Mage::getModel('api/user')->logoutBySessId($sessId); @@ -81,13 +109,19 @@ public function clear() { return true; } + /** + * @param string $username + * @param string $apiKey + * @return mixed + * @throws Mage_Core_Exception + */ public function login($username, $apiKey) { $user = Mage::getModel('api/user') ->setSessid($this->getSessionId()) ->login($username, $apiKey); - if ( $user->getId() && $user->getIsActive() != '1' ) { + if ($user->getId() && $user->getIsActive() != '1') { Mage::throwException(Mage::helper('api')->__('Your account has been deactivated.')); } elseif (!Mage::getModel('api/user')->hasAssigned2Role($user->getId())) { Mage::throwException(Mage::helper('api')->__('Access denied.')); @@ -103,7 +137,11 @@ public function login($username, $apiKey) return $user; } - public function refreshAcl($user=null) + /** + * @param Mage_Api_Model_User|null $user + * @return $this + */ + public function refreshAcl($user = null) { if (is_null($user)) { $user = $this->getUser(); @@ -153,18 +191,24 @@ public function isAllowed($resource, $privilege=null) /** * Check session expiration * - * @return boolean + * @param Mage_Api_Model_User $user + * @return boolean */ - public function isSessionExpired ($user) + public function isSessionExpired($user) { if (!$user->getId()) { return true; } - $timeout = strtotime( now() ) - strtotime( $user->getLogdate() ); + $timeout = strtotime(now()) - strtotime($user->getLogdate()); return $timeout > Mage::getStoreConfig('api/config/session_timeout'); } + /** + * @param string|false $sessId + * @return bool + * @throws Mage_Core_Exception + */ public function isLoggedIn($sessId = false) { $userExists = $this->getUser() && $this->getUser()->getId(); @@ -203,5 +247,4 @@ protected function _renewBySessId ($sessId) } return false; } - -} // Class Mage_Api_Model_Session End +} diff --git a/app/code/core/Mage/Api/Model/User.php b/app/code/core/Mage/Api/Model/User.php index f06182f7b06..fd898dcdbf7 100644 --- a/app/code/core/Mage/Api/Model/User.php +++ b/app/code/core/Mage/Api/Model/User.php @@ -30,25 +30,33 @@ * @method Mage_Api_Model_Resource_User _getResource() * @method Mage_Api_Model_Resource_User getResource() * @method string getFirstname() - * @method Mage_Api_Model_User setFirstname(string $value) + * @method $this setFirstname(string $value) * @method string getLastname() - * @method Mage_Api_Model_User setLastname(string $value) + * @method $this setLastname(string $value) * @method string getEmail() - * @method Mage_Api_Model_User setEmail(string $value) + * @method $this setEmail(string $value) * @method string getUsername() - * @method Mage_Api_Model_User setUsername(string $value) + * @method $this setUsername(string $value) * @method string getApiKey() - * @method Mage_Api_Model_User setApiKey(string $value) + * @method $this setApiKey(string $value) * @method string getCreated() - * @method Mage_Api_Model_User setCreated(string $value) + * @method $this setCreated(string $value) * @method string getModified() - * @method Mage_Api_Model_User setModified(string $value) + * @method $this setModified(string $value) * @method int getLognum() - * @method Mage_Api_Model_User setLognum(int $value) + * @method $this setLognum(int $value) * @method int getReloadAclFlag() - * @method Mage_Api_Model_User setReloadAclFlag(int $value) + * @method $this setReloadAclFlag(int $value) * @method int getIsActive() - * @method Mage_Api_Model_User setIsActive(int $value) + * @method $this setIsActive(int $value) + * @method string getSessid() + * @method $this setSessid($sessId) + * @method string getNewApiKey() + * @method string getUserId() + * @method string getLogdate() + * @method int getRoleId() + * @method array getRoleIds() + * @method $this setLogdate(string $value) * * @category Mage * @package Mage_Api @@ -227,7 +235,7 @@ public function getId() */ public function getAclRole() { - return 'U'.$this->getUserId(); + return 'U' . $this->getUserId(); } /** @@ -327,7 +335,7 @@ public function logoutBySessId($sessid) * Check if user is assigned to role * * @param int|Mage_Core_Model_Abstract $user - * @return array|null + * @return array */ public function hasAssigned2Role($user) { diff --git a/app/code/core/Mage/Api/Model/Wsdl/Config.php b/app/code/core/Mage/Api/Model/Wsdl/Config.php index b1bdd3f5865..d4e83c9a59d 100644 --- a/app/code/core/Mage/Api/Model/Wsdl/Config.php +++ b/app/code/core/Mage/Api/Model/Wsdl/Config.php @@ -35,6 +35,9 @@ class Mage_Api_Model_Wsdl_Config extends Mage_Api_Model_Wsdl_Config_Base { protected static $_namespacesPrefix = null; + /** + * @inheritDoc + */ public function __construct($sourceData=null) { $this->setCacheId(Mage::helper('api')->getCacheId()); @@ -68,26 +71,47 @@ public static function getNamespacesPrefix() return self::$_namespacesPrefix; } + /** + * @return Varien_Simplexml_Config_Cache_Abstract|Zend_Cache_Core + */ public function getCache() { return Mage::app()->getCache(); } + /** + * @param string $id + * @return bool|mixed + */ protected function _loadCache($id) { return Mage::app()->loadCache($id); } - protected function _saveCache($data, $id, $tags=array(), $lifetime=false) + /** + * @param string $data + * @param string $id + * @param array $tags + * @param int|bool $lifetime + * @return bool|Mage_Core_Model_App + */ + protected function _saveCache($data, $id, $tags = array(), $lifetime = false) { return Mage::app()->saveCache($data, $id, $tags, $lifetime); } + /** + * @param string $id + * @return Mage_Core_Model_App + */ protected function _removeCache($id) { return Mage::app()->removeCache($id); } + /** + * @return $this + */ public function init() { $this->setCacheChecksum(null); diff --git a/app/code/core/Mage/Api/Model/Wsdl/Config/Base.php b/app/code/core/Mage/Api/Model/Wsdl/Config/Base.php index ab61a719561..0f619bc649b 100644 --- a/app/code/core/Mage/Api/Model/Wsdl/Config/Base.php +++ b/app/code/core/Mage/Api/Model/Wsdl/Config/Base.php @@ -36,13 +36,16 @@ class Mage_Api_Model_Wsdl_Config_Base extends Varien_Simplexml_Config protected $_handler = ''; /** - * @var Varien_Object + * @var Mage_Api_Helper_Object_Wsdl */ protected $_wsdlVariables = null; protected $_loadedFiles = array(); - public function __construct($sourceData=null) + /** + * @inheritDoc + */ + public function __construct($sourceData = null) { $this->_elementClass = 'Mage_Api_Model_Wsdl_Config_Element'; @@ -51,7 +54,7 @@ public function __construct($sourceData=null) unset($queryParams['wsdl']); // set up default WSDL template variables - $this->_wsdlVariables = new Varien_Object( + $this->_wsdlVariables = new Mage_Api_Helper_Object_Wsdl( array( 'name' => 'Magento', 'url' => Mage::helper('api')->getServiceUrl('*/*/*', array('_query' => $queryParams), true) @@ -90,7 +93,7 @@ public function getHandler() */ public function processFileData($text) { - /** @var $template Mage_Core_Model_Email_Template_Filter */ + /** @var Mage_Core_Model_Email_Template_Filter $template */ $template = Mage::getModel('core/email_template_filter'); $this->_wsdlVariables->setHandler($this->getHandler()); @@ -100,6 +103,10 @@ public function processFileData($text) return $template->filter($text); } + /** + * @param string $file + * @return $this + */ public function addLoadedFile($file) { if (!in_array($file, $this->_loadedFiles)) { @@ -108,6 +115,10 @@ public function addLoadedFile($file) return $this; } + /** + * @param string $file + * @return $this|false + */ public function loadFile($file) { if (in_array($file, $this->_loadedFiles)) { diff --git a/app/code/core/Mage/Api/Model/Wsdl/Config/Element.php b/app/code/core/Mage/Api/Model/Wsdl/Config/Element.php index c9f4eb3d533..ede25dcf138 100644 --- a/app/code/core/Mage/Api/Model/Wsdl/Config/Element.php +++ b/app/code/core/Mage/Api/Model/Wsdl/Config/Element.php @@ -33,7 +33,12 @@ */ class Mage_Api_Model_Wsdl_Config_Element extends Varien_Simplexml_Element { - public function extend($source, $overwrite=false) + /** + * @param Varien_Simplexml_Element $source + * @param bool $overwrite + * @return $this|Varien_Simplexml_Element + */ + public function extend($source, $overwrite = false) { if (!$source instanceof Varien_Simplexml_Element) { return $this; @@ -53,9 +58,10 @@ public function extend($source, $overwrite=false) * * @param Varien_Simplexml_Element $source * @param boolean $overwrite + * @param string $elmNamespace * @return Varien_Simplexml_Element */ - public function extendChild($source, $overwrite=false, $elmNamespace = '') + public function extendChild($source, $overwrite = false, $elmNamespace = '') { // this will be our new target node $targetChild = null; @@ -144,6 +150,7 @@ public function extendChild($source, $overwrite=false, $elmNamespace = '') * ) * * @param Varien_Simplexml_Element $source + * @param null|string $namespace * @return array */ public function getAttributes($source, $namespace = null) @@ -168,6 +175,7 @@ public function getAttributes($source, $namespace = null) * Return children of all namespaces * * @param Varien_Simplexml_Element $source + * @return array */ public function getChildren($source) { @@ -210,8 +218,8 @@ public function hasChildren() * Return element by tag name, and checking attributes with namespaces * * @param Varien_Simplexml_Element $source - * @param string $namespace - * @return null|Varien_Simplexml_Element + * @param string $elmNamespace + * @return SimpleXMLElement|Varien_Simplexml_Element|null */ public function getElementByName($source, $elmNamespace = '') { @@ -255,6 +263,8 @@ public function getElementByName($source, $elmNamespace = '') /** * Returns attribute value by attribute name * + * @param string $name + * @param string $namespace * @return string */ public function getAttribute($name, $namespace = ''){ diff --git a/app/code/core/Mage/Api/controllers/IndexController.php b/app/code/core/Mage/Api/controllers/IndexController.php index d0a74fc7aa4..5284736902d 100644 --- a/app/code/core/Mage/Api/controllers/IndexController.php +++ b/app/code/core/Mage/Api/controllers/IndexController.php @@ -35,8 +35,8 @@ class Mage_Api_IndexController extends Mage_Api_Controller_Action { public function indexAction() { - /* @var $server Mage_Api_Model_Server */ + /* @var Mage_Api_Model_Server $server */ $this->_getServer()->init($this) ->run(); } -} // Class Mage_Api_IndexController End +} diff --git a/app/code/core/Mage/Api/controllers/SoapController.php b/app/code/core/Mage/Api/controllers/SoapController.php index 3067f886ec9..ec61f201936 100644 --- a/app/code/core/Mage/Api/controllers/SoapController.php +++ b/app/code/core/Mage/Api/controllers/SoapController.php @@ -35,8 +35,8 @@ class Mage_Api_SoapController extends Mage_Api_Controller_Action { public function indexAction() { - /* @var $server Mage_Api_Model_Server */ + /* @var Mage_Api_Model_Server $server */ $this->_getServer()->init($this, 'soap') ->run(); } -} // Class Mage_Api_IndexController End +} diff --git a/app/code/core/Mage/Api/controllers/V2/SoapController.php b/app/code/core/Mage/Api/controllers/V2/SoapController.php index fa6ddd09663..9b5c697eb09 100644 --- a/app/code/core/Mage/Api/controllers/V2/SoapController.php +++ b/app/code/core/Mage/Api/controllers/V2/SoapController.php @@ -41,8 +41,8 @@ public function indexAction() $handler_name = 'soap_v2'; } - /* @var $server Mage_Api_Model_Server */ + /* @var Mage_Api_Model_Server $server */ $this->_getServer()->init($this, $handler_name, $handler_name) ->run(); } -} // Class Mage_Api_IndexController End +} diff --git a/app/code/core/Mage/Api/controllers/XmlrpcController.php b/app/code/core/Mage/Api/controllers/XmlrpcController.php index 33079af00b7..0c977048db0 100644 --- a/app/code/core/Mage/Api/controllers/XmlrpcController.php +++ b/app/code/core/Mage/Api/controllers/XmlrpcController.php @@ -38,4 +38,4 @@ public function indexAction() $this->_getServer()->init($this, 'xmlrpc') ->run(); } -} // Class Mage_Api_XmlrpcController End +} \ No newline at end of file diff --git a/app/code/core/Mage/Api/sql/api_setup/install-1.6.0.0.php b/app/code/core/Mage/Api/sql/api_setup/install-1.6.0.0.php index 87ddb2075fb..dc3de84219b 100644 --- a/app/code/core/Mage/Api/sql/api_setup/install-1.6.0.0.php +++ b/app/code/core/Mage/Api/sql/api_setup/install-1.6.0.0.php @@ -32,7 +32,7 @@ * @author Magento Core Team */ $installer = $this; -/* @var $installer Mage_Core_Model_Resource_Setup */ +/* @var Mage_Core_Model_Resource_Setup $installer */ $installer->startSetup(); diff --git a/app/code/core/Mage/Api/sql/api_setup/mysql4-install-0.7.0.php b/app/code/core/Mage/Api/sql/api_setup/mysql4-install-0.7.0.php index 56d5e4daf57..351cf1c10be 100644 --- a/app/code/core/Mage/Api/sql/api_setup/mysql4-install-0.7.0.php +++ b/app/code/core/Mage/Api/sql/api_setup/mysql4-install-0.7.0.php @@ -25,7 +25,7 @@ */ $installer = $this; -/* @var $installer Mage_Core_Model_Resource_Setup */ +/* @var Mage_Core_Model_Resource_Setup $installer */ $installer->startSetup(); diff --git a/app/code/core/Mage/Api/sql/api_setup/mysql4-upgrade-0.7.0-0.7.1.php b/app/code/core/Mage/Api/sql/api_setup/mysql4-upgrade-0.7.0-0.7.1.php index aeb8861abe7..6cff2cc380c 100644 --- a/app/code/core/Mage/Api/sql/api_setup/mysql4-upgrade-0.7.0-0.7.1.php +++ b/app/code/core/Mage/Api/sql/api_setup/mysql4-upgrade-0.7.0-0.7.1.php @@ -33,7 +33,7 @@ */ $installer = $this; -/* @var $installer Mage_Core_Model_Resource_Setup */ +/* @var Mage_Core_Model_Resource_Setup $installer */ $installer->startSetup(); $installer->run("ALTER TABLE {$this->getTable('api_user')} ADD `sessid` VARCHAR(40) NOT NULL AFTER `lognum`;"); diff --git a/app/code/core/Mage/Api/sql/api_setup/mysql4-upgrade-0.8.0-0.8.1.php b/app/code/core/Mage/Api/sql/api_setup/mysql4-upgrade-0.8.0-0.8.1.php index 2c9842ff371..7a53e2050d1 100644 --- a/app/code/core/Mage/Api/sql/api_setup/mysql4-upgrade-0.8.0-0.8.1.php +++ b/app/code/core/Mage/Api/sql/api_setup/mysql4-upgrade-0.8.0-0.8.1.php @@ -31,7 +31,7 @@ * @author Magento Core Team */ -/* @var $installer Mage_Core_Model_Resource_Setup */ +/* @var Mage_Core_Model_Resource_Setup $installer */ $installer = $this; $installer->startSetup(); diff --git a/app/code/core/Mage/Api/sql/api_setup/mysql4-upgrade-1.5.9.9-1.6.0.0.php b/app/code/core/Mage/Api/sql/api_setup/mysql4-upgrade-1.5.9.9-1.6.0.0.php index a5b0610da06..5ae66888b1b 100644 --- a/app/code/core/Mage/Api/sql/api_setup/mysql4-upgrade-1.5.9.9-1.6.0.0.php +++ b/app/code/core/Mage/Api/sql/api_setup/mysql4-upgrade-1.5.9.9-1.6.0.0.php @@ -24,7 +24,7 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/* @var $installer Mage_Core_Model_Resource_Setup */ +/* @var Mage_Core_Model_Resource_Setup $installer */ $installer = $this; $installer->startSetup(); diff --git a/app/code/core/Mage/Api/sql/api_setup/mysql4-upgrade-1.6.0.0-1.6.0.1.php b/app/code/core/Mage/Api/sql/api_setup/mysql4-upgrade-1.6.0.0-1.6.0.1.php index c756fd70537..bb0ef3ce98a 100644 --- a/app/code/core/Mage/Api/sql/api_setup/mysql4-upgrade-1.6.0.0-1.6.0.1.php +++ b/app/code/core/Mage/Api/sql/api_setup/mysql4-upgrade-1.6.0.0-1.6.0.1.php @@ -24,7 +24,7 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/* @var $this Mage_Core_Model_Resource_Setup */ +/* @var Mage_Core_Model_Resource_Setup $this */ $this->startSetup(); $this->getConnection()->changeColumn(