Skip to content

Commit

Permalink
Update PHP-Cs-Fixer
Browse files Browse the repository at this point in the history
  • Loading branch information
PowerKiKi committed Aug 25, 2023
1 parent 1e3de01 commit 67d03bc
Show file tree
Hide file tree
Showing 368 changed files with 1,068 additions and 901 deletions.
470 changes: 212 additions & 258 deletions composer.lock

Large diffs are not rendered by default.

19 changes: 3 additions & 16 deletions library/Zend/Acl.php
Original file line number Diff line number Diff line change
Expand Up @@ -506,7 +506,6 @@ public function removeAll()
* @param array|string|Zend_Acl_Role_Interface $roles
* @param array|string|Zend_Acl_Resource_Interface $resources
* @param array|string $privileges
* @param Zend_Acl_Assert_Interface $assert
*
* @uses Zend_Acl::setRule()
*
Expand All @@ -523,7 +522,6 @@ public function allow($roles = null, $resources = null, $privileges = null, ?Zen
* @param array|string|Zend_Acl_Role_Interface $roles
* @param array|string|Zend_Acl_Resource_Interface $resources
* @param array|string $privileges
* @param Zend_Acl_Assert_Interface $assert
*
* @uses Zend_Acl::setRule()
*
Expand Down Expand Up @@ -612,7 +610,6 @@ public function removeDeny($roles = null, $resources = null, $privileges = null)
* @param array|string|Zend_Acl_Role_Interface $roles
* @param array|string|Zend_Acl_Resource_Interface $resources
* @param array|string $privileges
* @param Zend_Acl_Assert_Interface $assert
*
* @uses Zend_Acl_Role_Registry::get()
* @uses Zend_Acl::get()
Expand Down Expand Up @@ -681,7 +678,6 @@ public function setRule($operation, $type, $roles = null, $resources = null, $pr
}

switch ($operation) {

// add to the rules
case self::OP_ADD:
if ($resources !== null) {
Expand Down Expand Up @@ -721,7 +717,7 @@ public function setRule($operation, $type, $roles = null, $resources = null, $pr

break;

// remove from the rules
// remove from the rules
case self::OP_REMOVE:
if ($resources !== null) {
// this block will iterate the provided resources
Expand Down Expand Up @@ -940,8 +936,6 @@ protected function _getRoleRegistry()
* This method returns true if a rule is found and allows access. If a rule exists and denies access,
* then this method returns false. If no applicable rule is found, then this method returns null.
*
* @param Zend_Acl_Resource_Interface $resource
*
* @return null|bool
*/
protected function _roleDFSAllPrivileges(Zend_Acl_Role_Interface $role, ?Zend_Acl_Resource_Interface $resource = null)
Expand Down Expand Up @@ -974,7 +968,6 @@ protected function _roleDFSAllPrivileges(Zend_Acl_Role_Interface $role, ?Zend_Ac
*
* This method is used by the internal depth-first search algorithm and may modify the DFS data structure.
*
* @param Zend_Acl_Resource_Interface $resource
* @param array $dfs
*
* @return null|bool
Expand Down Expand Up @@ -1017,7 +1010,6 @@ protected function _roleDFSVisitAllPrivileges(Zend_Acl_Role_Interface $role, ?Ze
* This method returns true if a rule is found and allows access. If a rule exists and denies access,
* then this method returns false. If no applicable rule is found, then this method returns null.
*
* @param Zend_Acl_Resource_Interface $resource
* @param string $privilege
*
* @return null|bool
Expand Down Expand Up @@ -1062,7 +1054,6 @@ protected function _roleDFSOnePrivilege(Zend_Acl_Role_Interface $role, ?Zend_Acl
*
* This method is used by the internal depth-first search algorithm and may modify the DFS data structure.
*
* @param Zend_Acl_Resource_Interface $resource
* @param string $privilege
* @param array $dfs
*
Expand Down Expand Up @@ -1120,8 +1111,6 @@ protected function _roleDFSVisitOnePrivilege(Zend_Acl_Role_Interface $role, ?Zen
* If all three parameters are null, then the default ACL rule type is returned,
* based on whether its assertion method passes.
*
* @param Zend_Acl_Resource_Interface $resource
* @param Zend_Acl_Role_Interface $role
* @param string $privilege
*
* @return null|string
Expand Down Expand Up @@ -1156,7 +1145,7 @@ protected function _getRuleType(?Zend_Acl_Resource_Interface $resource = null, ?
($this->_isAllowedRole instanceof Zend_Acl_Role_Interface) ? $this->_isAllowedRole : $role,
($this->_isAllowedResource instanceof Zend_Acl_Resource_Interface) ? $this->_isAllowedResource : $resource,
$this->_isAllowedPrivilege
);
);
}

if (null === $rule['assert'] || $assertionValue) {
Expand All @@ -1180,14 +1169,12 @@ protected function _getRuleType(?Zend_Acl_Resource_Interface $resource = null, ?
*
* If the $create parameter is true, then a rule set is first created and then returned to the caller.
*
* @param Zend_Acl_Resource_Interface $resource
* @param Zend_Acl_Role_Interface $role
* @param bool $create
*
* @return null|array
*/
protected function &_getRules(?Zend_Acl_Resource_Interface $resource = null, ?Zend_Acl_Role_Interface $role = null,
$create = false)
$create = false)
{
// create a reference to null
$null = null;
Expand Down
2 changes: 0 additions & 2 deletions library/Zend/Acl/Assert/Interface.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,6 @@ interface Zend_Acl_Assert_Interface
* $role, $resource, or $privilege parameters are null, it means that the query applies to all Roles, Resources, or
* privileges, respectively.
*
* @param Zend_Acl_Role_Interface $role
* @param Zend_Acl_Resource_Interface $resource
* @param string $privilege
*
* @return bool
Expand Down
2 changes: 1 addition & 1 deletion library/Zend/Application/Bootstrap/BootstrapAbstract.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
*/
abstract class Zend_Application_Bootstrap_BootstrapAbstract implements
Zend_Application_Bootstrap_Bootstrapper,
Zend_Application_Bootstrap_ResourceBootstrapper
Zend_Application_Bootstrap_ResourceBootstrapper
{
/**
* @var Zend_Application|Zend_Application_Bootstrap_Bootstrapper
Expand Down
20 changes: 10 additions & 10 deletions library/Zend/Cache/Backend/File.php
Original file line number Diff line number Diff line change
Expand Up @@ -913,16 +913,16 @@ protected function _expireTime($lifetime)
protected function _hash($data, $controlType)
{
switch ($controlType) {
case 'md5':
return md5($data);
case 'crc32':
return crc32($data);
case 'strlen':
return strlen($data);
case 'adler32':
return hash('adler32', $data);
default:
Zend_Cache::throwException("Incorrect hash function : $controlType");
case 'md5':
return md5($data);
case 'crc32':
return crc32($data);
case 'strlen':
return strlen($data);
case 'adler32':
return hash('adler32', $data);
default:
Zend_Cache::throwException("Incorrect hash function : $controlType");
}
}

Expand Down
50 changes: 25 additions & 25 deletions library/Zend/Cache/Frontend/Page.php
Original file line number Diff line number Diff line change
Expand Up @@ -357,36 +357,36 @@ protected function _makeId()
protected function _makePartialId($arrayName, $bool1, $bool2)
{
switch ($arrayName) {
case 'Get':
$var = $_GET;
case 'Get':
$var = $_GET;

break;
case 'Post':
$var = $_POST;
break;
case 'Post':
$var = $_POST;

break;
case 'Session':
if (isset($_SESSION)) {
$var = $_SESSION;
} else {
$var = null;
}
break;
case 'Session':
if (isset($_SESSION)) {
$var = $_SESSION;
} else {
$var = null;
}

break;
case 'Cookie':
if (isset($_COOKIE)) {
$var = $_COOKIE;
} else {
$var = null;
}
break;
case 'Cookie':
if (isset($_COOKIE)) {
$var = $_COOKIE;
} else {
$var = null;
}

break;
case 'Files':
$var = $_FILES;
break;
case 'Files':
$var = $_FILES;

break;
default:
return false;
break;
default:
return false;
}
if ($bool1) {
if ($bool2) {
Expand Down
1 change: 0 additions & 1 deletion library/Zend/Captcha/Adapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ public function generate();
/**
* Display the captcha.
*
* @param Zend_View_Interface $view
* @param mixed $element
*
* @return string
Expand Down
1 change: 0 additions & 1 deletion library/Zend/Captcha/Dumb.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ public function getLabel()
/**
* Render the captcha.
*
* @param Zend_View_Interface $view
* @param mixed $element
*
* @return string
Expand Down
1 change: 0 additions & 1 deletion library/Zend/Captcha/Figlet.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ public function generate()
/**
* Display the captcha.
*
* @param Zend_View_Interface $view
* @param mixed $element
*
* @return string
Expand Down
1 change: 0 additions & 1 deletion library/Zend/Captcha/Image.php
Original file line number Diff line number Diff line change
Expand Up @@ -646,7 +646,6 @@ protected function _gc()
/**
* Display the captcha.
*
* @param Zend_View_Interface $view
* @param mixed $element
*
* @return string
Expand Down
8 changes: 4 additions & 4 deletions library/Zend/Console/Getopt.php
Original file line number Diff line number Diff line change
Expand Up @@ -237,8 +237,8 @@ public function __construct($rules, $argv = null, $getoptConfig = [])
}

throw new Zend_Console_Getopt_Exception(
'$_SERVER["argv"] is not set, but Zend_Console_Getopt cannot work without this information.'
);
'$_SERVER["argv"] is not set, but Zend_Console_Getopt cannot work without this information.'
);
}

$this->_progname = $_SERVER['argv'][0];
Expand Down Expand Up @@ -636,8 +636,8 @@ public function getUsageMessage()
}
foreach ($lines as $linepart) {
$usage .= sprintf("%s %s\n",
str_pad($linepart['name'], $maxLen),
$linepart['help']);
str_pad($linepart['name'], $maxLen),
$linepart['help']);
}

return $usage;
Expand Down
2 changes: 0 additions & 2 deletions library/Zend/Controller/Action.php
Original file line number Diff line number Diff line change
Expand Up @@ -716,7 +716,6 @@ public function getAllParams()
* @param string $action
* @param string $controller
* @param string $module
* @param array $params
*
* @deprecated Deprecated as of Zend Framework 1.7. Use
* forward() instead.
Expand Down Expand Up @@ -749,7 +748,6 @@ final protected function _forward($action, $controller = null, $module = null, ?
* @param string $action
* @param string $controller
* @param string $module
* @param array $params
*/
final public function forward($action, $controller = null, $module = null, ?array $params = null)
{
Expand Down
2 changes: 0 additions & 2 deletions library/Zend/Controller/Action/Helper/Abstract.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,6 @@ abstract class Zend_Controller_Action_Helper_Abstract
/**
* setActionController().
*
* @param Zend_Controller_Action $actionController
*
* @return Zend_Controller_Action_Helper_Abstract Provides a fluent interface
*/
public function setActionController(?Zend_Controller_Action $actionController = null)
Expand Down
2 changes: 0 additions & 2 deletions library/Zend/Controller/Action/Helper/Url.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ class Zend_Controller_Action_Helper_Url extends Zend_Controller_Action_Helper_Ab
* @param string $action
* @param string $controller
* @param string $module
* @param array $params
*
* @return string
*/
Expand Down Expand Up @@ -104,7 +103,6 @@ public function url($urlOptions = [], $name = null, $reset = false, $encode = tr
* @param string $action
* @param string $controller
* @param string $module
* @param array $params
*
* @return string
*/
Expand Down
2 changes: 0 additions & 2 deletions library/Zend/Controller/Action/Helper/ViewRenderer.php
Original file line number Diff line number Diff line change
Expand Up @@ -183,8 +183,6 @@ class Zend_Controller_Action_Helper_ViewRenderer extends Zend_Controller_Action_
* Constructor.
*
* Optionally set view object and options.
*
* @param Zend_View_Interface $view
*/
public function __construct(?Zend_View_Interface $view = null, array $options = [])
{
Expand Down
Loading

0 comments on commit 67d03bc

Please sign in to comment.