Skip to content

Commit 2826410

Browse files
committed
Fix(php-cs-fixer) Fix php-cs-fixer warnings, according to new checks
1 parent ef9f881 commit 2826410

File tree

411 files changed

+454
-1852
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

411 files changed

+454
-1852
lines changed

Diff for: data/bin/check_configuration.php

+1-7
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,6 @@ function is_cli()
77

88
/**
99
* Checks a configuration.
10-
*
11-
* @param mixed $boolean
12-
* @param mixed $message
13-
* @param mixed $help
14-
* @param mixed $fatal
1510
*/
1611
function check($boolean, $message, $help = '', $fatal = false)
1712
{
@@ -84,8 +79,7 @@ function get_ini_path()
8479
$accelerator =
8580
(function_exists('apc_store') && ini_get('apc.enabled'))
8681
|| function_exists('eaccelerator_put') && ini_get('eaccelerator.enable')
87-
|| function_exists('xcache_set')
88-
;
82+
|| function_exists('xcache_set');
8983
check($accelerator, 'A PHP accelerator is installed', 'Install a PHP accelerator like APC (highly recommended)', false);
9084

9185
check(!ini_get('short_open_tag'), 'php.ini has short_open_tag set to off', 'Set it to off in php.ini', false);

Diff for: lib/action/sfAction.class.php

+2-8
Original file line numberDiff line numberDiff line change
@@ -46,18 +46,14 @@ public function initialize($context, $moduleName, $actionName)
4646
*
4747
* By default, this method is empty.
4848
*/
49-
public function preExecute()
50-
{
51-
}
49+
public function preExecute() {}
5250

5351
/**
5452
* Execute an application defined process immediately after execution of this sfAction object.
5553
*
5654
* By default, this method is empty.
5755
*/
58-
public function postExecute()
59-
{
60-
}
56+
public function postExecute() {}
6157

6258
/**
6359
* Forwards current action to the default 404 error action.
@@ -385,8 +381,6 @@ public function setSecurityConfiguration($security)
385381
*
386382
* @param string $name The name of the value to pull from security.yml
387383
* @param mixed $default The default value to return if none is found in security.yml
388-
*
389-
* @return mixed
390384
*/
391385
public function getSecurityValue($name, $default = null)
392386
{

Diff for: lib/action/sfComponents.class.php

-2
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,6 @@ abstract class sfComponents extends sfComponent
2020
/**
2121
* @param sfRequest $request
2222
*
23-
* @return mixed
24-
*
2523
* @throws sfInitializationException
2624
*
2725
* @see sfComponent

Diff for: lib/addon/sfPager.class.php

+2-11
Original file line numberDiff line numberDiff line change
@@ -155,8 +155,6 @@ public function setCursor($pos)
155155
* Returns an object by cursor position.
156156
*
157157
* @param int $pos
158-
*
159-
* @return mixed
160158
*/
161159
public function getObjectByCursor($pos)
162160
{
@@ -167,8 +165,6 @@ public function getObjectByCursor($pos)
167165

168166
/**
169167
* Returns the current object.
170-
*
171-
* @return mixed
172168
*/
173169
public function getCurrent()
174170
{
@@ -396,10 +392,8 @@ public function getParameterHolder()
396392
/**
397393
* Returns a parameter.
398394
*
399-
* @param string $name
400-
* @param mixed $default
401-
*
402-
* @return mixed
395+
* @param string $name
396+
* @param mixed|null $default
403397
*/
404398
public function getParameter($name, $default = null)
405399
{
@@ -422,7 +416,6 @@ public function hasParameter($name)
422416
* Sets a parameter.
423417
*
424418
* @param string $name
425-
* @param mixed $value
426419
*/
427420
public function setParameter($name, $value)
428421
{
@@ -525,8 +518,6 @@ public function count()
525518
* Used internally by {@link getCurrent()}.
526519
*
527520
* @param int $offset
528-
*
529-
* @return mixed
530521
*/
531522
abstract protected function retrieveObject($offset);
532523

Diff for: lib/autoload/sfAutoload.class.php

+1-3
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,7 @@ class sfAutoload
2626
protected $overriden = array();
2727
protected $classes = array();
2828

29-
protected function __construct()
30-
{
31-
}
29+
protected function __construct() {}
3230

3331
/**
3432
* Retrieves the singleton instance of this class.

Diff for: lib/autoload/sfAutoloadAgain.class.php

+1-3
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,7 @@ class sfAutoloadAgain
2525
/**
2626
* Constructor.
2727
*/
28-
protected function __construct()
29-
{
30-
}
28+
protected function __construct() {}
3129

3230
/**
3331
* Returns the singleton autoloader.

Diff for: lib/cache/sfAPCCache.class.php

+4-9
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ class sfAPCCache extends sfCache
2727
* * see sfCache for options available for all drivers
2828
*
2929
* @see sfCache
30-
* {@inheritdoc}
3130
*/
3231
public function initialize($options = array())
3332
{
@@ -38,7 +37,8 @@ public function initialize($options = array())
3837

3938
/**
4039
* @see sfCache
41-
* {@inheritdoc}
40+
*
41+
* @param mixed|null $default
4242
*/
4343
public function get($key, $default = null)
4444
{
@@ -53,7 +53,6 @@ public function get($key, $default = null)
5353

5454
/**
5555
* @see sfCache
56-
* {@inheritdoc}
5756
*/
5857
public function has($key)
5958
{
@@ -68,7 +67,8 @@ public function has($key)
6867

6968
/**
7069
* @see sfCache
71-
* {@inheritdoc}
70+
*
71+
* @param mixed|null $lifetime
7272
*/
7373
public function set($key, $data, $lifetime = null)
7474
{
@@ -81,7 +81,6 @@ public function set($key, $data, $lifetime = null)
8181

8282
/**
8383
* @see sfCache
84-
* {@inheritdoc}
8584
*/
8685
public function remove($key)
8786
{
@@ -94,7 +93,6 @@ public function remove($key)
9493

9594
/**
9695
* @see sfCache
97-
* {@inheritdoc}
9896
*/
9997
public function clean($mode = sfCache::ALL)
10098
{
@@ -109,7 +107,6 @@ public function clean($mode = sfCache::ALL)
109107

110108
/**
111109
* @see sfCache
112-
* {@inheritdoc}
113110
*/
114111
public function getLastModified($key)
115112
{
@@ -122,7 +119,6 @@ public function getLastModified($key)
122119

123120
/**
124121
* @see sfCache
125-
* {@inheritdoc}
126122
*/
127123
public function getTimeout($key)
128124
{
@@ -135,7 +131,6 @@ public function getTimeout($key)
135131

136132
/**
137133
* @see sfCache
138-
* {@inheritdoc}
139134
*/
140135
public function removePattern($pattern)
141136
{

Diff for: lib/cache/sfCache.class.php

-2
Original file line numberDiff line numberDiff line change
@@ -201,8 +201,6 @@ public function getOption($name, $default = null)
201201
*
202202
* @param string $name The option name
203203
* @param mixed $value The option value
204-
*
205-
* @return mixed
206204
*/
207205
public function setOption($name, $value)
208206
{

Diff for: lib/cache/sfEAcceleratorCache.class.php

+2-7
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@ public function initialize($options = array())
4242
/**
4343
* @see sfCache
4444
*
45-
* @param string $key
46-
* @param mixed $default
45+
* @param string $key
46+
* @param mixed|null $default
4747
*
4848
* @return string|null
4949
*/
@@ -82,7 +82,6 @@ public function set($key, $data, $lifetime = null)
8282

8383
/**
8484
* @see sfCache
85-
* {@inheritdoc}
8685
*/
8786
public function remove($key)
8887
{
@@ -91,7 +90,6 @@ public function remove($key)
9190

9291
/**
9392
* @see sfCache
94-
* {@inheritdoc}
9593
*/
9694
public function removePattern($pattern)
9795
{
@@ -110,7 +108,6 @@ public function removePattern($pattern)
110108

111109
/**
112110
* @see sfCache
113-
* {@inheritdoc}
114111
*/
115112
public function clean($mode = sfCache::ALL)
116113
{
@@ -136,7 +133,6 @@ public function clean($mode = sfCache::ALL)
136133

137134
/**
138135
* @see sfCache
139-
* {@inheritdoc}
140136
*/
141137
public function getLastModified($key)
142138
{
@@ -149,7 +145,6 @@ public function getLastModified($key)
149145

150146
/**
151147
* @see sfCache
152-
* {@inheritdoc}
153148
*/
154149
public function getTimeout($key)
155150
{

Diff for: lib/cache/sfFileCache.class.php

+4-9
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ class sfFileCache extends sfCache
3333
* * see sfCache for options available for all drivers
3434
*
3535
* @see sfCache
36-
* {@inheritdoc}
3736
*/
3837
public function initialize($options = array())
3938
{
@@ -48,7 +47,8 @@ public function initialize($options = array())
4847

4948
/**
5049
* @see sfCache
51-
* {@inheritdoc}
50+
*
51+
* @param mixed|null $default
5252
*/
5353
public function get($key, $default = null)
5454
{
@@ -68,7 +68,6 @@ public function get($key, $default = null)
6868

6969
/**
7070
* @see sfCache
71-
* {@inheritdoc}
7271
*/
7372
public function has($key)
7473
{
@@ -79,7 +78,8 @@ public function has($key)
7978

8079
/**
8180
* @see sfCache
82-
* {@inheritdoc}
81+
*
82+
* @param mixed|null $lifetime
8383
*/
8484
public function set($key, $data, $lifetime = null)
8585
{
@@ -92,7 +92,6 @@ public function set($key, $data, $lifetime = null)
9292

9393
/**
9494
* @see sfCache
95-
* {@inheritdoc}
9695
*/
9796
public function remove($key)
9897
{
@@ -101,7 +100,6 @@ public function remove($key)
101100

102101
/**
103102
* @see sfCache
104-
* {@inheritdoc}
105103
*/
106104
public function removePattern($pattern)
107105
{
@@ -130,7 +128,6 @@ public function removePattern($pattern)
130128

131129
/**
132130
* @see sfCache
133-
* {@inheritdoc}
134131
*/
135132
public function clean($mode = sfCache::ALL)
136133
{
@@ -150,7 +147,6 @@ public function clean($mode = sfCache::ALL)
150147

151148
/**
152149
* @see sfCache
153-
* {@inheritdoc}
154150
*/
155151
public function getTimeout($key)
156152
{
@@ -167,7 +163,6 @@ public function getTimeout($key)
167163

168164
/**
169165
* @see sfCache
170-
* {@inheritdoc}
171166
*/
172167
public function getLastModified($key)
173168
{

0 commit comments

Comments
 (0)