Skip to content

Commit

Permalink
Fix(php-cs-fixer) Fix php-cs-fixer warnings, according to new checks
Browse files Browse the repository at this point in the history
  • Loading branch information
thePanz committed Nov 17, 2023
1 parent 1ac3374 commit 7826e99
Show file tree
Hide file tree
Showing 411 changed files with 454 additions and 1,852 deletions.
8 changes: 1 addition & 7 deletions data/bin/check_configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,6 @@ function is_cli()

/**
* Checks a configuration.
*
* @param mixed $boolean
* @param mixed $message
* @param mixed $help
* @param mixed $fatal
*/
function check($boolean, $message, $help = '', $fatal = false)
{
Expand Down Expand Up @@ -84,8 +79,7 @@ function get_ini_path()
$accelerator =
(function_exists('apc_store') && ini_get('apc.enabled'))
|| function_exists('eaccelerator_put') && ini_get('eaccelerator.enable')
|| function_exists('xcache_set')
;
|| function_exists('xcache_set');
check($accelerator, 'A PHP accelerator is installed', 'Install a PHP accelerator like APC (highly recommended)', false);

check(!ini_get('short_open_tag'), 'php.ini has short_open_tag set to off', 'Set it to off in php.ini', false);
Expand Down
10 changes: 2 additions & 8 deletions lib/action/sfAction.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,18 +46,14 @@ public function initialize($context, $moduleName, $actionName)
*
* By default, this method is empty.
*/
public function preExecute()
{
}
public function preExecute() {}

/**
* Execute an application defined process immediately after execution of this sfAction object.
*
* By default, this method is empty.
*/
public function postExecute()
{
}
public function postExecute() {}

/**
* Forwards current action to the default 404 error action.
Expand Down Expand Up @@ -385,8 +381,6 @@ public function setSecurityConfiguration($security)
*
* @param string $name The name of the value to pull from security.yml
* @param mixed $default The default value to return if none is found in security.yml
*
* @return mixed
*/
public function getSecurityValue($name, $default = null)
{
Expand Down
2 changes: 0 additions & 2 deletions lib/action/sfComponents.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@ abstract class sfComponents extends sfComponent
/**
* @param sfRequest $request
*
* @return mixed
*
* @throws sfInitializationException
*
* @see sfComponent
Expand Down
13 changes: 2 additions & 11 deletions lib/addon/sfPager.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -155,8 +155,6 @@ public function setCursor($pos)
* Returns an object by cursor position.
*
* @param int $pos
*
* @return mixed
*/
public function getObjectByCursor($pos)
{
Expand All @@ -167,8 +165,6 @@ public function getObjectByCursor($pos)

/**
* Returns the current object.
*
* @return mixed
*/
public function getCurrent()
{
Expand Down Expand Up @@ -396,10 +392,8 @@ public function getParameterHolder()
/**
* Returns a parameter.
*
* @param string $name
* @param mixed $default
*
* @return mixed
* @param string $name
* @param mixed|null $default
*/
public function getParameter($name, $default = null)
{
Expand All @@ -422,7 +416,6 @@ public function hasParameter($name)
* Sets a parameter.
*
* @param string $name
* @param mixed $value
*/
public function setParameter($name, $value)
{
Expand Down Expand Up @@ -525,8 +518,6 @@ public function count()
* Used internally by {@link getCurrent()}.
*
* @param int $offset
*
* @return mixed
*/
abstract protected function retrieveObject($offset);

Expand Down
4 changes: 1 addition & 3 deletions lib/autoload/sfAutoload.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,7 @@ class sfAutoload
protected $overriden = array();
protected $classes = array();

protected function __construct()
{
}
protected function __construct() {}

/**
* Retrieves the singleton instance of this class.
Expand Down
4 changes: 1 addition & 3 deletions lib/autoload/sfAutoloadAgain.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,7 @@ class sfAutoloadAgain
/**
* Constructor.
*/
protected function __construct()
{
}
protected function __construct() {}

/**
* Returns the singleton autoloader.
Expand Down
13 changes: 4 additions & 9 deletions lib/cache/sfAPCCache.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ class sfAPCCache extends sfCache
* * see sfCache for options available for all drivers
*
* @see sfCache
* {@inheritdoc}
*/
public function initialize($options = array())
{
Expand All @@ -38,7 +37,8 @@ public function initialize($options = array())

/**
* @see sfCache
* {@inheritdoc}
*
* @param mixed|null $default
*/
public function get($key, $default = null)
{
Expand All @@ -53,7 +53,6 @@ public function get($key, $default = null)

/**
* @see sfCache
* {@inheritdoc}
*/
public function has($key)
{
Expand All @@ -68,7 +67,8 @@ public function has($key)

/**
* @see sfCache
* {@inheritdoc}
*
* @param mixed|null $lifetime
*/
public function set($key, $data, $lifetime = null)
{
Expand All @@ -81,7 +81,6 @@ public function set($key, $data, $lifetime = null)

/**
* @see sfCache
* {@inheritdoc}
*/
public function remove($key)
{
Expand All @@ -94,7 +93,6 @@ public function remove($key)

/**
* @see sfCache
* {@inheritdoc}
*/
public function clean($mode = sfCache::ALL)
{
Expand All @@ -109,7 +107,6 @@ public function clean($mode = sfCache::ALL)

/**
* @see sfCache
* {@inheritdoc}
*/
public function getLastModified($key)
{
Expand All @@ -122,7 +119,6 @@ public function getLastModified($key)

/**
* @see sfCache
* {@inheritdoc}
*/
public function getTimeout($key)
{
Expand All @@ -135,7 +131,6 @@ public function getTimeout($key)

/**
* @see sfCache
* {@inheritdoc}
*/
public function removePattern($pattern)
{
Expand Down
2 changes: 0 additions & 2 deletions lib/cache/sfCache.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -201,8 +201,6 @@ public function getOption($name, $default = null)
*
* @param string $name The option name
* @param mixed $value The option value
*
* @return mixed
*/
public function setOption($name, $value)
{
Expand Down
9 changes: 2 additions & 7 deletions lib/cache/sfEAcceleratorCache.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ public function initialize($options = array())
/**
* @see sfCache
*
* @param string $key
* @param mixed $default
* @param string $key
* @param mixed|null $default
*
* @return string|null
*/
Expand Down Expand Up @@ -82,7 +82,6 @@ public function set($key, $data, $lifetime = null)

/**
* @see sfCache
* {@inheritdoc}
*/
public function remove($key)
{
Expand All @@ -91,7 +90,6 @@ public function remove($key)

/**
* @see sfCache
* {@inheritdoc}
*/
public function removePattern($pattern)
{
Expand All @@ -110,7 +108,6 @@ public function removePattern($pattern)

/**
* @see sfCache
* {@inheritdoc}
*/
public function clean($mode = sfCache::ALL)
{
Expand All @@ -136,7 +133,6 @@ public function clean($mode = sfCache::ALL)

/**
* @see sfCache
* {@inheritdoc}
*/
public function getLastModified($key)
{
Expand All @@ -149,7 +145,6 @@ public function getLastModified($key)

/**
* @see sfCache
* {@inheritdoc}
*/
public function getTimeout($key)
{
Expand Down
13 changes: 4 additions & 9 deletions lib/cache/sfFileCache.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ class sfFileCache extends sfCache
* * see sfCache for options available for all drivers
*
* @see sfCache
* {@inheritdoc}
*/
public function initialize($options = array())
{
Expand All @@ -48,7 +47,8 @@ public function initialize($options = array())

/**
* @see sfCache
* {@inheritdoc}
*
* @param mixed|null $default
*/
public function get($key, $default = null)
{
Expand All @@ -68,7 +68,6 @@ public function get($key, $default = null)

/**
* @see sfCache
* {@inheritdoc}
*/
public function has($key)
{
Expand All @@ -79,7 +78,8 @@ public function has($key)

/**
* @see sfCache
* {@inheritdoc}
*
* @param mixed|null $lifetime
*/
public function set($key, $data, $lifetime = null)
{
Expand All @@ -92,7 +92,6 @@ public function set($key, $data, $lifetime = null)

/**
* @see sfCache
* {@inheritdoc}
*/
public function remove($key)
{
Expand All @@ -101,7 +100,6 @@ public function remove($key)

/**
* @see sfCache
* {@inheritdoc}
*/
public function removePattern($pattern)
{
Expand Down Expand Up @@ -130,7 +128,6 @@ public function removePattern($pattern)

/**
* @see sfCache
* {@inheritdoc}
*/
public function clean($mode = sfCache::ALL)
{
Expand All @@ -150,7 +147,6 @@ public function clean($mode = sfCache::ALL)

/**
* @see sfCache
* {@inheritdoc}
*/
public function getTimeout($key)
{
Expand All @@ -167,7 +163,6 @@ public function getTimeout($key)

/**
* @see sfCache
* {@inheritdoc}
*/
public function getLastModified($key)
{
Expand Down
Loading

0 comments on commit 7826e99

Please sign in to comment.