Skip to content

Commit

Permalink
Merge pull request #306 from sreichel/fix/fluent
Browse files Browse the repository at this point in the history
Use $this for fluent interface
  • Loading branch information
Shardj authored Jan 16, 2023
2 parents 504e75d + b7f0d9f commit 3fb038f
Show file tree
Hide file tree
Showing 166 changed files with 734 additions and 743 deletions.
24 changes: 12 additions & 12 deletions library/Zend/Acl.php
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ class Zend_Acl
* @param Zend_Acl_Role_Interface|string $role
* @param Zend_Acl_Role_Interface|string|array $parents
* @uses Zend_Acl_Role_Registry::add()
* @return Zend_Acl Provides a fluent interface
* @return $this
*/
public function addRole($role, $parents = null)
{
Expand Down Expand Up @@ -217,7 +217,7 @@ public function inheritsRole($role, $inherit, $onlyParents = false)
*
* @param Zend_Acl_Role_Interface|string $role
* @uses Zend_Acl_Role_Registry::remove()
* @return Zend_Acl Provides a fluent interface
* @return $this
*/
public function removeRole($role)
{
Expand Down Expand Up @@ -251,7 +251,7 @@ public function removeRole($role)
* Removes all Roles from the registry
*
* @uses Zend_Acl_Role_Registry::removeAll()
* @return Zend_Acl Provides a fluent interface
* @return $this
*/
public function removeRoleAll()
{
Expand All @@ -278,7 +278,7 @@ public function removeRoleAll()
* @param Zend_Acl_Resource_Interface|string $resource
* @param Zend_Acl_Resource_Interface|string $parent
* @throws Zend_Acl_Exception
* @return Zend_Acl Provides a fluent interface
* @return $this
*/
public function addResource($resource, $parent = null)
{
Expand Down Expand Up @@ -336,7 +336,7 @@ public function addResource($resource, $parent = null)
* @param Zend_Acl_Resource_Interface $resource
* @param Zend_Acl_Resource_Interface|string $parent
* @throws Zend_Acl_Exception
* @return Zend_Acl Provides a fluent interface
* @return $this
*/
public function add(Zend_Acl_Resource_Interface $resource, $parent = null)
{
Expand Down Expand Up @@ -440,7 +440,7 @@ public function inherits($resource, $inherit, $onlyParent = false)
*
* @param Zend_Acl_Resource_Interface|string $resource
* @throws Zend_Acl_Exception
* @return Zend_Acl Provides a fluent interface
* @return $this
*/
public function remove($resource)
{
Expand Down Expand Up @@ -476,7 +476,7 @@ public function remove($resource)
/**
* Removes all Resources
*
* @return Zend_Acl Provides a fluent interface
* @return $this
*/
public function removeAll()
{
Expand All @@ -497,7 +497,7 @@ public function removeAll()
* @param string|array $privileges
* @param Zend_Acl_Assert_Interface $assert
* @uses Zend_Acl::setRule()
* @return Zend_Acl Provides a fluent interface
* @return $this
*/
public function allow($roles = null, $resources = null, $privileges = null, Zend_Acl_Assert_Interface $assert = null)
{
Expand All @@ -512,7 +512,7 @@ public function allow($roles = null, $resources = null, $privileges = null, Zend
* @param string|array $privileges
* @param Zend_Acl_Assert_Interface $assert
* @uses Zend_Acl::setRule()
* @return Zend_Acl Provides a fluent interface
* @return $this
*/
public function deny($roles = null, $resources = null, $privileges = null, Zend_Acl_Assert_Interface $assert = null)
{
Expand All @@ -526,7 +526,7 @@ public function deny($roles = null, $resources = null, $privileges = null, Zend_
* @param Zend_Acl_Resource_Interface|string|array $resources
* @param string|array $privileges
* @uses Zend_Acl::setRule()
* @return Zend_Acl Provides a fluent interface
* @return $this
*/
public function removeAllow($roles = null, $resources = null, $privileges = null)
{
Expand All @@ -540,7 +540,7 @@ public function removeAllow($roles = null, $resources = null, $privileges = null
* @param Zend_Acl_Resource_Interface|string|array $resources
* @param string|array $privileges
* @uses Zend_Acl::setRule()
* @return Zend_Acl Provides a fluent interface
* @return $this
*/
public function removeDeny($roles = null, $resources = null, $privileges = null)
{
Expand Down Expand Up @@ -597,7 +597,7 @@ public function removeDeny($roles = null, $resources = null, $privileges = null)
* @throws Zend_Acl_Exception
* @uses Zend_Acl_Role_Registry::get()
* @uses Zend_Acl::get()
* @return Zend_Acl Provides a fluent interface
* @return $this
*/
public function setRule($operation, $type, $roles = null, $resources = null, $privileges = null,
Zend_Acl_Assert_Interface $assert = null)
Expand Down
6 changes: 3 additions & 3 deletions library/Zend/Acl/Role/Registry.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ class Zend_Acl_Role_Registry
* @param Zend_Acl_Role_Interface $role
* @param Zend_Acl_Role_Interface|string|array $parents
* @throws Zend_Acl_Role_Registry_Exception
* @return Zend_Acl_Role_Registry Provides a fluent interface
* @return $this
*/
public function add(Zend_Acl_Role_Interface $role, $parents = null)
{
Expand Down Expand Up @@ -225,7 +225,7 @@ public function inherits($role, $inherit, $onlyParents = false)
*
* @param Zend_Acl_Role_Interface|string $role
* @throws Zend_Acl_Role_Registry_Exception
* @return Zend_Acl_Role_Registry Provides a fluent interface
* @return $this
*/
public function remove($role)
{
Expand Down Expand Up @@ -254,7 +254,7 @@ public function remove($role)
/**
* Removes all Roles from the registry
*
* @return Zend_Acl_Role_Registry Provides a fluent interface
* @return $this
*/
public function removeAll()
{
Expand Down
4 changes: 2 additions & 2 deletions library/Zend/Auth.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ protected function __clone()
*
* Singleton pattern implementation
*
* @return Zend_Auth Provides a fluent interface
* @return $this
*/
public static function getInstance()
{
Expand Down Expand Up @@ -98,7 +98,7 @@ public function getStorage()
* Sets the persistent storage handler
*
* @param Zend_Auth_Storage_Interface $storage
* @return Zend_Auth Provides a fluent interface
* @return $this
*/
public function setStorage(Zend_Auth_Storage_Interface $storage)
{
Expand Down
12 changes: 6 additions & 6 deletions library/Zend/Auth/Adapter/DbTable.php
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ protected function _setDbAdapter(Zend_Db_Adapter_Abstract $zendDb = null)
* setTableName() - set the table name to be used in the select query
*
* @param string $tableName
* @return Zend_Auth_Adapter_DbTable Provides a fluent interface
* @return $this
*/
public function setTableName($tableName)
{
Expand All @@ -197,7 +197,7 @@ public function setTableName($tableName)
* setIdentityColumn() - set the column name to be used as the identity column
*
* @param string $identityColumn
* @return Zend_Auth_Adapter_DbTable Provides a fluent interface
* @return $this
*/
public function setIdentityColumn($identityColumn)
{
Expand All @@ -209,7 +209,7 @@ public function setIdentityColumn($identityColumn)
* setCredentialColumn() - set the column name to be used as the credential column
*
* @param string $credentialColumn
* @return Zend_Auth_Adapter_DbTable Provides a fluent interface
* @return $this
*/
public function setCredentialColumn($credentialColumn)
{
Expand All @@ -232,7 +232,7 @@ public function setCredentialColumn($credentialColumn)
* 'MD5(?)'
*
* @param string $treatment
* @return Zend_Auth_Adapter_DbTable Provides a fluent interface
* @return $this
*/
public function setCredentialTreatment($treatment)
{
Expand All @@ -244,7 +244,7 @@ public function setCredentialTreatment($treatment)
* setIdentity() - set the value to be used as the identity
*
* @param string $value
* @return Zend_Auth_Adapter_DbTable Provides a fluent interface
* @return $this
*/
public function setIdentity($value)
{
Expand All @@ -257,7 +257,7 @@ public function setIdentity($value)
* to be used, should be supplied in parameterized form, such as 'MD5(?)' or 'PASSWORD(?)'
*
* @param string $credential
* @return Zend_Auth_Adapter_DbTable Provides a fluent interface
* @return $this
*/
public function setCredential($credential)
{
Expand Down
8 changes: 4 additions & 4 deletions library/Zend/Auth/Adapter/Digest.php
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ public function getFilename()
* Sets the filename option value
*
* @param mixed $filename
* @return Zend_Auth_Adapter_Digest Provides a fluent interface
* @return $this
*/
public function setFilename($filename)
{
Expand All @@ -119,7 +119,7 @@ public function getRealm()
* Sets the realm option value
*
* @param mixed $realm
* @return Zend_Auth_Adapter_Digest Provides a fluent interface
* @return $this
*/
public function setRealm($realm)
{
Expand All @@ -141,7 +141,7 @@ public function getUsername()
* Sets the username option value
*
* @param mixed $username
* @return Zend_Auth_Adapter_Digest Provides a fluent interface
* @return $this
*/
public function setUsername($username)
{
Expand All @@ -163,7 +163,7 @@ public function getPassword()
* Sets the password option value
*
* @param mixed $password
* @return Zend_Auth_Adapter_Digest Provides a fluent interface
* @return $this
*/
public function setPassword($password)
{
Expand Down
8 changes: 4 additions & 4 deletions library/Zend/Auth/Adapter/Http.php
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ public function __construct(array $config)
* Setter for the _basicResolver property
*
* @param Zend_Auth_Adapter_Http_Resolver_Interface $resolver
* @return Zend_Auth_Adapter_Http Provides a fluent interface
* @return $this
*/
public function setBasicResolver(Zend_Auth_Adapter_Http_Resolver_Interface $resolver)
{
Expand All @@ -289,7 +289,7 @@ public function getBasicResolver()
* Setter for the _digestResolver property
*
* @param Zend_Auth_Adapter_Http_Resolver_Interface $resolver
* @return Zend_Auth_Adapter_Http Provides a fluent interface
* @return $this
*/
public function setDigestResolver(Zend_Auth_Adapter_Http_Resolver_Interface $resolver)
{
Expand All @@ -312,7 +312,7 @@ public function getDigestResolver()
* Setter for the Request object
*
* @param Zend_Controller_Request_Http $request
* @return Zend_Auth_Adapter_Http Provides a fluent interface
* @return $this
*/
public function setRequest(Zend_Controller_Request_Http $request)
{
Expand All @@ -335,7 +335,7 @@ public function getRequest()
* Setter for the Response object
*
* @param Zend_Controller_Response_Http $response
* @return Zend_Auth_Adapter_Http Provides a fluent interface
* @return $this
*/
public function setResponse(Zend_Controller_Response_Http $response)
{
Expand Down
2 changes: 1 addition & 1 deletion library/Zend/Auth/Adapter/Http/Resolver/File.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public function __construct($path = '')
*
* @param string $path
* @throws Zend_Auth_Adapter_Http_Resolver_Exception
* @return Zend_Auth_Adapter_Http_Resolver_File Provides a fluent interface
* @return $this
*/
public function setFile($path)
{
Expand Down
12 changes: 6 additions & 6 deletions library/Zend/Auth/Adapter/Ldap.php
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ public function getOptions()
* this adapter.
*
* @param array $options The array of arrays of Zend_Ldap options
* @return Zend_Auth_Adapter_Ldap Provides a fluent interface
* @return $this
*/
public function setOptions($options)
{
Expand All @@ -126,7 +126,7 @@ public function getUsername()
* Sets the username for binding
*
* @param string $username The username for binding
* @return Zend_Auth_Adapter_Ldap Provides a fluent interface
* @return $this
*/
public function setUsername($username)
{
Expand All @@ -149,7 +149,7 @@ public function getPassword()
* Sets the passwort for the account
*
* @param string $password The password of the account being authenticated
* @return Zend_Auth_Adapter_Ldap Provides a fluent interface
* @return $this
*/
public function setPassword($password)
{
Expand All @@ -165,7 +165,7 @@ public function setPassword($password)
* Closes ZF-6813
*
* @param string $identity
* @return Zend_Auth_Adapter_Ldap Provides a fluent interface
* @return $this
*/
public function setIdentity($identity)
{
Expand All @@ -180,7 +180,7 @@ public function setIdentity($identity)
* Closes ZF-6813
*
* @param string $credential
* @return Zend_Auth_Adapter_Ldap Provides a fluent interface
* @return $this
*/
public function setCredential($credential)
{
Expand Down Expand Up @@ -209,7 +209,7 @@ public function getLdap()
* Set an Ldap connection
*
* @param Zend_Ldap $ldap An existing Ldap object
* @return Zend_Auth_Adapter_Ldap Provides a fluent interface
* @return $this
*/
public function setLdap(Zend_Ldap $ldap)
{
Expand Down
Loading

0 comments on commit 3fb038f

Please sign in to comment.