@@ -1,25 +1,25 @@ |
||
1 | 1 | <?php |
2 | 2 | function getWidget($type) |
3 | 3 | { |
4 | - eval('$obj = new '.$type.'();'); |
|
5 | - return $obj; |
|
4 | + eval('$obj = new '.$type.'();'); |
|
5 | + return $obj; |
|
6 | 6 | |
7 | 7 | }//end getWidget() |
8 | 8 | |
9 | 9 | function getWidget2($type) |
10 | 10 | { |
11 | - $string = '$obj = new '.$type.'();'; |
|
12 | - eval($string); |
|
13 | - eval('$string = "";'); |
|
14 | - return $obj; |
|
11 | + $string = '$obj = new '.$type.'();'; |
|
12 | + eval($string); |
|
13 | + eval('$string = "";'); |
|
14 | + return $obj; |
|
15 | 15 | |
16 | 16 | }//end getWidget2() |
17 | 17 | |
18 | 18 | function getWidget3($type) |
19 | 19 | { |
20 | - $string = '$obj = new '; |
|
21 | - eval($string.$type.'();'); |
|
22 | - return $obj; |
|
20 | + $string = '$obj = new '; |
|
21 | + eval($string.$type.'();'); |
|
22 | + return $obj; |
|
23 | 23 | |
24 | 24 | }//end getWidget3() |
25 | 25 |
@@ -15,42 +15,42 @@ |
||
15 | 15 | { |
16 | 16 | |
17 | 17 | |
18 | - /** |
|
19 | - * Returns the lines where errors should occur. |
|
20 | - * |
|
21 | - * The key of the array should represent the line number and the value |
|
22 | - * should represent the number of errors that should occur on that line. |
|
23 | - * |
|
24 | - * @return array<int, int> |
|
25 | - */ |
|
26 | - public function getErrorList() |
|
27 | - { |
|
28 | - return [ |
|
29 | - 2 => 1, |
|
30 | - 5 => 1, |
|
31 | - 8 => 1, |
|
32 | - 21 => 1, |
|
33 | - 26 => 1, |
|
34 | - 27 => 1, |
|
35 | - 28 => 1, |
|
36 | - ]; |
|
37 | - |
|
38 | - }//end getErrorList() |
|
39 | - |
|
40 | - |
|
41 | - /** |
|
42 | - * Returns the lines where warnings should occur. |
|
43 | - * |
|
44 | - * The key of the array should represent the line number and the value |
|
45 | - * should represent the number of warnings that should occur on that line. |
|
46 | - * |
|
47 | - * @return array<int, int> |
|
48 | - */ |
|
49 | - public function getWarningList() |
|
50 | - { |
|
51 | - return []; |
|
52 | - |
|
53 | - }//end getWarningList() |
|
18 | + /** |
|
19 | + * Returns the lines where errors should occur. |
|
20 | + * |
|
21 | + * The key of the array should represent the line number and the value |
|
22 | + * should represent the number of errors that should occur on that line. |
|
23 | + * |
|
24 | + * @return array<int, int> |
|
25 | + */ |
|
26 | + public function getErrorList() |
|
27 | + { |
|
28 | + return [ |
|
29 | + 2 => 1, |
|
30 | + 5 => 1, |
|
31 | + 8 => 1, |
|
32 | + 21 => 1, |
|
33 | + 26 => 1, |
|
34 | + 27 => 1, |
|
35 | + 28 => 1, |
|
36 | + ]; |
|
37 | + |
|
38 | + }//end getErrorList() |
|
39 | + |
|
40 | + |
|
41 | + /** |
|
42 | + * Returns the lines where warnings should occur. |
|
43 | + * |
|
44 | + * The key of the array should represent the line number and the value |
|
45 | + * should represent the number of warnings that should occur on that line. |
|
46 | + * |
|
47 | + * @return array<int, int> |
|
48 | + */ |
|
49 | + public function getWarningList() |
|
50 | + { |
|
51 | + return []; |
|
52 | + |
|
53 | + }//end getWarningList() |
|
54 | 54 | |
55 | 55 | |
56 | 56 | }//end class |
@@ -10,17 +10,17 @@ |
||
10 | 10 | |
11 | 11 | class Security |
12 | 12 | { |
13 | - function getRequestData($var) { |
|
14 | - echo $_REQUEST[$var]; |
|
15 | - } |
|
13 | + function getRequestData($var) { |
|
14 | + echo $_REQUEST[$var]; |
|
15 | + } |
|
16 | 16 | } |
17 | 17 | |
18 | 18 | class Insecurity |
19 | 19 | { |
20 | - function getRequestData($var) { |
|
21 | - unset($_REQUEST[$var]); |
|
22 | - echo 'OMGHAX!'; |
|
23 | - } |
|
20 | + function getRequestData($var) { |
|
21 | + unset($_REQUEST[$var]); |
|
22 | + echo 'OMGHAX!'; |
|
23 | + } |
|
24 | 24 | } |
25 | 25 | |
26 | 26 | $sample = Util::getArrayIndex($_REQUEST, 'sample', ''); |
@@ -15,48 +15,48 @@ |
||
15 | 15 | { |
16 | 16 | |
17 | 17 | |
18 | - /** |
|
19 | - * Returns the lines where errors should occur. |
|
20 | - * |
|
21 | - * The key of the array should represent the line number and the value |
|
22 | - * should represent the number of errors that should occur on that line. |
|
23 | - * |
|
24 | - * @param string $testFile The name of the file being tested. |
|
25 | - * |
|
26 | - * @return array<int, int> |
|
27 | - */ |
|
28 | - public function getErrorList($testFile='JoinStringsUnitTest.js') |
|
29 | - { |
|
30 | - if ($testFile !== 'JoinStringsUnitTest.js') { |
|
31 | - return []; |
|
32 | - } |
|
33 | - |
|
34 | - return [ |
|
35 | - 6 => 1, |
|
36 | - 7 => 1, |
|
37 | - 8 => 2, |
|
38 | - 9 => 2, |
|
39 | - 10 => 2, |
|
40 | - 12 => 2, |
|
41 | - 15 => 1, |
|
42 | - ]; |
|
43 | - |
|
44 | - }//end getErrorList() |
|
45 | - |
|
46 | - |
|
47 | - /** |
|
48 | - * Returns the lines where warnings should occur. |
|
49 | - * |
|
50 | - * The key of the array should represent the line number and the value |
|
51 | - * should represent the number of warnings that should occur on that line. |
|
52 | - * |
|
53 | - * @return array<int, int> |
|
54 | - */ |
|
55 | - public function getWarningList() |
|
56 | - { |
|
57 | - return []; |
|
58 | - |
|
59 | - }//end getWarningList() |
|
18 | + /** |
|
19 | + * Returns the lines where errors should occur. |
|
20 | + * |
|
21 | + * The key of the array should represent the line number and the value |
|
22 | + * should represent the number of errors that should occur on that line. |
|
23 | + * |
|
24 | + * @param string $testFile The name of the file being tested. |
|
25 | + * |
|
26 | + * @return array<int, int> |
|
27 | + */ |
|
28 | + public function getErrorList($testFile='JoinStringsUnitTest.js') |
|
29 | + { |
|
30 | + if ($testFile !== 'JoinStringsUnitTest.js') { |
|
31 | + return []; |
|
32 | + } |
|
33 | + |
|
34 | + return [ |
|
35 | + 6 => 1, |
|
36 | + 7 => 1, |
|
37 | + 8 => 2, |
|
38 | + 9 => 2, |
|
39 | + 10 => 2, |
|
40 | + 12 => 2, |
|
41 | + 15 => 1, |
|
42 | + ]; |
|
43 | + |
|
44 | + }//end getErrorList() |
|
45 | + |
|
46 | + |
|
47 | + /** |
|
48 | + * Returns the lines where warnings should occur. |
|
49 | + * |
|
50 | + * The key of the array should represent the line number and the value |
|
51 | + * should represent the number of warnings that should occur on that line. |
|
52 | + * |
|
53 | + * @return array<int, int> |
|
54 | + */ |
|
55 | + public function getWarningList() |
|
56 | + { |
|
57 | + return []; |
|
58 | + |
|
59 | + }//end getWarningList() |
|
60 | 60 | |
61 | 61 | |
62 | 62 | }//end class |
@@ -25,7 +25,7 @@ |
||
25 | 25 | * |
26 | 26 | * @return array<int, int> |
27 | 27 | */ |
28 | - public function getErrorList($testFile='JoinStringsUnitTest.js') |
|
28 | + public function getErrorList($testFile = 'JoinStringsUnitTest.js') |
|
29 | 29 | { |
30 | 30 | if ($testFile !== 'JoinStringsUnitTest.js') { |
31 | 31 | return []; |
@@ -15,47 +15,47 @@ |
||
15 | 15 | { |
16 | 16 | |
17 | 17 | |
18 | - /** |
|
19 | - * Returns the lines where errors should occur. |
|
20 | - * |
|
21 | - * The key of the array should represent the line number and the value |
|
22 | - * should represent the number of errors that should occur on that line. |
|
23 | - * |
|
24 | - * @param string $testFile The name of the file being tested. |
|
25 | - * |
|
26 | - * @return array<int, int> |
|
27 | - */ |
|
28 | - public function getErrorList($testFile='FirebugConsoleUnitTest.js') |
|
29 | - { |
|
30 | - if ($testFile !== 'FirebugConsoleUnitTest.js') { |
|
31 | - return []; |
|
32 | - } |
|
33 | - |
|
34 | - return [ |
|
35 | - 1 => 1, |
|
36 | - 2 => 1, |
|
37 | - 3 => 1, |
|
38 | - 5 => 1, |
|
39 | - 6 => 1, |
|
40 | - 8 => 1, |
|
41 | - ]; |
|
42 | - |
|
43 | - }//end getErrorList() |
|
44 | - |
|
45 | - |
|
46 | - /** |
|
47 | - * Returns the lines where warnings should occur. |
|
48 | - * |
|
49 | - * The key of the array should represent the line number and the value |
|
50 | - * should represent the number of warnings that should occur on that line. |
|
51 | - * |
|
52 | - * @return array<int, int> |
|
53 | - */ |
|
54 | - public function getWarningList() |
|
55 | - { |
|
56 | - return []; |
|
57 | - |
|
58 | - }//end getWarningList() |
|
18 | + /** |
|
19 | + * Returns the lines where errors should occur. |
|
20 | + * |
|
21 | + * The key of the array should represent the line number and the value |
|
22 | + * should represent the number of errors that should occur on that line. |
|
23 | + * |
|
24 | + * @param string $testFile The name of the file being tested. |
|
25 | + * |
|
26 | + * @return array<int, int> |
|
27 | + */ |
|
28 | + public function getErrorList($testFile='FirebugConsoleUnitTest.js') |
|
29 | + { |
|
30 | + if ($testFile !== 'FirebugConsoleUnitTest.js') { |
|
31 | + return []; |
|
32 | + } |
|
33 | + |
|
34 | + return [ |
|
35 | + 1 => 1, |
|
36 | + 2 => 1, |
|
37 | + 3 => 1, |
|
38 | + 5 => 1, |
|
39 | + 6 => 1, |
|
40 | + 8 => 1, |
|
41 | + ]; |
|
42 | + |
|
43 | + }//end getErrorList() |
|
44 | + |
|
45 | + |
|
46 | + /** |
|
47 | + * Returns the lines where warnings should occur. |
|
48 | + * |
|
49 | + * The key of the array should represent the line number and the value |
|
50 | + * should represent the number of warnings that should occur on that line. |
|
51 | + * |
|
52 | + * @return array<int, int> |
|
53 | + */ |
|
54 | + public function getWarningList() |
|
55 | + { |
|
56 | + return []; |
|
57 | + |
|
58 | + }//end getWarningList() |
|
59 | 59 | |
60 | 60 | |
61 | 61 | }//end class |
@@ -25,7 +25,7 @@ |
||
25 | 25 | * |
26 | 26 | * @return array<int, int> |
27 | 27 | */ |
28 | - public function getErrorList($testFile='FirebugConsoleUnitTest.js') |
|
28 | + public function getErrorList($testFile = 'FirebugConsoleUnitTest.js') |
|
29 | 29 | { |
30 | 30 | if ($testFile !== 'FirebugConsoleUnitTest.js') { |
31 | 31 | return []; |
@@ -15,37 +15,37 @@ |
||
15 | 15 | { |
16 | 16 | |
17 | 17 | |
18 | - /** |
|
19 | - * Returns the lines where errors should occur. |
|
20 | - * |
|
21 | - * The key of the array should represent the line number and the value |
|
22 | - * should represent the number of errors that should occur on that line. |
|
23 | - * |
|
24 | - * @return array<int, int> |
|
25 | - */ |
|
26 | - public function getErrorList() |
|
27 | - { |
|
28 | - return [ |
|
29 | - 2 => 1, |
|
30 | - 3 => 1, |
|
31 | - ]; |
|
32 | - |
|
33 | - }//end getErrorList() |
|
34 | - |
|
35 | - |
|
36 | - /** |
|
37 | - * Returns the lines where warnings should occur. |
|
38 | - * |
|
39 | - * The key of the array should represent the line number and the value |
|
40 | - * should represent the number of warnings that should occur on that line. |
|
41 | - * |
|
42 | - * @return array<int, int> |
|
43 | - */ |
|
44 | - public function getWarningList() |
|
45 | - { |
|
46 | - return []; |
|
47 | - |
|
48 | - }//end getWarningList() |
|
18 | + /** |
|
19 | + * Returns the lines where errors should occur. |
|
20 | + * |
|
21 | + * The key of the array should represent the line number and the value |
|
22 | + * should represent the number of errors that should occur on that line. |
|
23 | + * |
|
24 | + * @return array<int, int> |
|
25 | + */ |
|
26 | + public function getErrorList() |
|
27 | + { |
|
28 | + return [ |
|
29 | + 2 => 1, |
|
30 | + 3 => 1, |
|
31 | + ]; |
|
32 | + |
|
33 | + }//end getErrorList() |
|
34 | + |
|
35 | + |
|
36 | + /** |
|
37 | + * Returns the lines where warnings should occur. |
|
38 | + * |
|
39 | + * The key of the array should represent the line number and the value |
|
40 | + * should represent the number of warnings that should occur on that line. |
|
41 | + * |
|
42 | + * @return array<int, int> |
|
43 | + */ |
|
44 | + public function getWarningList() |
|
45 | + { |
|
46 | + return []; |
|
47 | + |
|
48 | + }//end getWarningList() |
|
49 | 49 | |
50 | 50 | |
51 | 51 | }//end class |
@@ -2,50 +2,50 @@ |
||
2 | 2 | class SomethingActions |
3 | 3 | { |
4 | 4 | |
5 | - private static function _x() |
|
6 | - { |
|
7 | - } |
|
8 | - |
|
9 | - |
|
10 | - public static function y() |
|
11 | - { |
|
12 | - self::z(); |
|
13 | - static::z(); |
|
14 | - SomethingActions::z(); |
|
15 | - static::_x(); |
|
16 | - self::a(); |
|
17 | - static::a(); |
|
18 | - } |
|
19 | - |
|
20 | - |
|
21 | - public static function z() |
|
22 | - { |
|
23 | - } |
|
24 | - |
|
25 | - protected static function a() |
|
26 | - { |
|
27 | - self::a(); // recursion, yay! |
|
28 | - self::z(); |
|
29 | - static::y(); |
|
30 | - self::b(); |
|
31 | - echo self::$_myVar; |
|
32 | - echo static::$yourVar; |
|
33 | - } |
|
5 | + private static function _x() |
|
6 | + { |
|
7 | + } |
|
8 | + |
|
9 | + |
|
10 | + public static function y() |
|
11 | + { |
|
12 | + self::z(); |
|
13 | + static::z(); |
|
14 | + SomethingActions::z(); |
|
15 | + static::_x(); |
|
16 | + self::a(); |
|
17 | + static::a(); |
|
18 | + } |
|
19 | + |
|
20 | + |
|
21 | + public static function z() |
|
22 | + { |
|
23 | + } |
|
24 | + |
|
25 | + protected static function a() |
|
26 | + { |
|
27 | + self::a(); // recursion, yay! |
|
28 | + self::z(); |
|
29 | + static::y(); |
|
30 | + self::b(); |
|
31 | + echo self::$_myVar; |
|
32 | + echo static::$yourVar; |
|
33 | + } |
|
34 | 34 | } |
35 | 35 | |
36 | 36 | abstract class AbstractEditingScreenModeWidgetActions extends AbstractEditingModeWidgetActions { |
37 | 37 | |
38 | - public static function getScreens($systemName) |
|
39 | - { |
|
38 | + public static function getScreens($systemName) |
|
39 | + { |
|
40 | 40 | |
41 | - }//end getScreens() |
|
41 | + }//end getScreens() |
|
42 | 42 | |
43 | - public static function setHelpScreenTitle() |
|
44 | - { |
|
45 | - // This is allowed because we are in an abstract class. |
|
46 | - $screens = self::getScreens(''); |
|
43 | + public static function setHelpScreenTitle() |
|
44 | + { |
|
45 | + // This is allowed because we are in an abstract class. |
|
46 | + $screens = self::getScreens(''); |
|
47 | 47 | |
48 | - }//end setHelpScreenTitle() |
|
48 | + }//end setHelpScreenTitle() |
|
49 | 49 | |
50 | 50 | }//end class |
51 | 51 | ?> |
@@ -5,29 +5,29 @@ discard block |
||
5 | 5 | Channels::includeAsset('Folder'); |
6 | 6 | |
7 | 7 | function one() { |
8 | - Channels::includeSystem('MySystem'); |
|
9 | - $siteid = MySystem2::getCurrentSiteId(); |
|
10 | - Page::create(); |
|
11 | - PageAssetType::create(); |
|
8 | + Channels::includeSystem('MySystem'); |
|
9 | + $siteid = MySystem2::getCurrentSiteId(); |
|
10 | + Page::create(); |
|
11 | + PageAssetType::create(); |
|
12 | 12 | } |
13 | 13 | |
14 | 14 | function two() { |
15 | - Page2AssetType::create(); |
|
16 | - Folder::getFolder(); |
|
15 | + Page2AssetType::create(); |
|
16 | + Folder::getFolder(); |
|
17 | 17 | } |
18 | 18 | |
19 | 19 | Channels::includeAsset('Asset'); |
20 | 20 | class AssetListingAssetType extends AssetAssetType |
21 | 21 | { |
22 | - function one() { |
|
23 | - Channels::includeSystem('MySystem2'); |
|
24 | - Channels::includeSystem('Page2'); |
|
25 | - $siteid = MySystem2::getCurrentSiteId(); |
|
26 | - } |
|
22 | + function one() { |
|
23 | + Channels::includeSystem('MySystem2'); |
|
24 | + Channels::includeSystem('Page2'); |
|
25 | + $siteid = MySystem2::getCurrentSiteId(); |
|
26 | + } |
|
27 | 27 | |
28 | - function two() { |
|
29 | - $siteid = Page2::getCurrentSiteId(); |
|
30 | - } |
|
28 | + function two() { |
|
29 | + $siteid = Page2::getCurrentSiteId(); |
|
30 | + } |
|
31 | 31 | } |
32 | 32 | |
33 | 33 | Channels::includeSystem('Log'); |
@@ -43,11 +43,11 @@ discard block |
||
43 | 43 | class MyLog implements Log3 {} |
44 | 44 | |
45 | 45 | if (self::systemExists($systemName) === FALSE) { |
46 | - return $actions; |
|
46 | + return $actions; |
|
47 | 47 | } else { |
48 | - // Shouldn't throw an error because we don't know the system name. |
|
49 | - self::includeSystem($systemName); |
|
50 | - self::includeSystem($systemNames['log']); |
|
48 | + // Shouldn't throw an error because we don't know the system name. |
|
49 | + self::includeSystem($systemName); |
|
50 | + self::includeSystem($systemNames['log']); |
|
51 | 51 | } |
52 | 52 | |
53 | 53 | Channels::includeSystem('Widget'); |
@@ -56,12 +56,12 @@ discard block |
||
56 | 56 | |
57 | 57 | function myFunction() |
58 | 58 | { |
59 | - if (Channels::systemExists('Log5') === TRUE) { |
|
60 | - Channels::includeSystem('Log5'); |
|
61 | - } else { |
|
62 | - return; |
|
63 | - } |
|
59 | + if (Channels::systemExists('Log5') === TRUE) { |
|
60 | + Channels::includeSystem('Log5'); |
|
61 | + } else { |
|
62 | + return; |
|
63 | + } |
|
64 | 64 | |
65 | - Log5::addProjectLog('metadata.field.update', $msg); |
|
65 | + Log5::addProjectLog('metadata.field.update', $msg); |
|
66 | 66 | } |
67 | 67 | ?> |
68 | 68 | \ No newline at end of file |
@@ -15,39 +15,39 @@ |
||
15 | 15 | { |
16 | 16 | |
17 | 17 | |
18 | - /** |
|
19 | - * Returns the lines where errors should occur. |
|
20 | - * |
|
21 | - * The key of the array should represent the line number and the value |
|
22 | - * should represent the number of errors that should occur on that line. |
|
23 | - * |
|
24 | - * @return array<int, int> |
|
25 | - */ |
|
26 | - public function getErrorList() |
|
27 | - { |
|
28 | - return [ |
|
29 | - 12 => 1, |
|
30 | - 13 => 1, |
|
31 | - 28 => 1, |
|
32 | - 29 => 1, |
|
33 | - ]; |
|
34 | - |
|
35 | - }//end getErrorList() |
|
36 | - |
|
37 | - |
|
38 | - /** |
|
39 | - * Returns the lines where warnings should occur. |
|
40 | - * |
|
41 | - * The key of the array should represent the line number and the value |
|
42 | - * should represent the number of warnings that should occur on that line. |
|
43 | - * |
|
44 | - * @return array<int, int> |
|
45 | - */ |
|
46 | - public function getWarningList() |
|
47 | - { |
|
48 | - return []; |
|
49 | - |
|
50 | - }//end getWarningList() |
|
18 | + /** |
|
19 | + * Returns the lines where errors should occur. |
|
20 | + * |
|
21 | + * The key of the array should represent the line number and the value |
|
22 | + * should represent the number of errors that should occur on that line. |
|
23 | + * |
|
24 | + * @return array<int, int> |
|
25 | + */ |
|
26 | + public function getErrorList() |
|
27 | + { |
|
28 | + return [ |
|
29 | + 12 => 1, |
|
30 | + 13 => 1, |
|
31 | + 28 => 1, |
|
32 | + 29 => 1, |
|
33 | + ]; |
|
34 | + |
|
35 | + }//end getErrorList() |
|
36 | + |
|
37 | + |
|
38 | + /** |
|
39 | + * Returns the lines where warnings should occur. |
|
40 | + * |
|
41 | + * The key of the array should represent the line number and the value |
|
42 | + * should represent the number of warnings that should occur on that line. |
|
43 | + * |
|
44 | + * @return array<int, int> |
|
45 | + */ |
|
46 | + public function getWarningList() |
|
47 | + { |
|
48 | + return []; |
|
49 | + |
|
50 | + }//end getWarningList() |
|
51 | 51 | |
52 | 52 | |
53 | 53 | }//end class |