Skip to content

Commit d6a62ea

Browse files
authored
Merge pull request #268 from Hackwar/patch-3
Fixing list of magic methods for naming convention
2 parents 1ceeaf4 + 29c960d commit d6a62ea

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

Joomla/Sniffs/NamingConventions/ValidFunctionNameSniff.php

+25
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,31 @@
1919
*/
2020
class Joomla_Sniffs_NamingConventions_ValidFunctionNameSniff extends PEAR_Sniffs_NamingConventions_ValidFunctionNameSniff
2121
{
22+
/**
23+
* A list of all PHP magic methods.
24+
*
25+
* @var array
26+
*/
27+
protected $magicMethods = array(
28+
'construct' => true,
29+
'destruct' => true,
30+
'call' => true,
31+
'callstatic' => true,
32+
'get' => true,
33+
'set' => true,
34+
'isset' => true,
35+
'unset' => true,
36+
'sleep' => true,
37+
'wakeup' => true,
38+
'serialize' => true,
39+
'unserialize' => true,
40+
'tostring' => true,
41+
'invoke' => true,
42+
'set_state' => true,
43+
'clone' => true,
44+
'debuginfo' => true,
45+
);
46+
2247
/**
2348
* Processes the tokens within the scope.
2449
*

0 commit comments

Comments
 (0)