Completed
Branch master (2a91d9)
by kna
04:22
created
config/di/url.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -6,7 +6,7 @@
 block discarded – undo
6 6
     "services" => [
7 7
         "url" => [
8 8
             "shared" => true,
9
-            "callback" => function () {
9
+            "callback" => function() {
10 10
                 $url = new \Anax\Url\Url();
11 11
                 $request = $this->get("request");
12 12
                 $url->setSiteUrl($request->getSiteUrl());
Please login to merge, or discard this patch.
config/di/response.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@
 block discarded – undo
9 9
         "response" => [
10 10
             "shared" => true,
11 11
             //"callback" => "\Anax\Response\Response",
12
-            "callback" => function () {
12
+            "callback" => function() {
13 13
                 $obj = new \Anax\Response\ResponseUtility();
14 14
                 $obj->setDI($this);
15 15
                 return $obj;
Please login to merge, or discard this patch.
config/di/session.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@
 block discarded – undo
8 8
         "session" => [
9 9
             "active" => defined("ANAX_WITH_SESSION") && ANAX_WITH_SESSION, // true|false
10 10
             "shared" => true,
11
-            "callback" => function () {
11
+            "callback" => function() {
12 12
                 $session = new \Anax\Session\Session();
13 13
 
14 14
                 // Load the configuration files
Please login to merge, or discard this patch.
config/di/content.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@
 block discarded – undo
8 8
     "services" => [
9 9
         "content" => [
10 10
             "shared" => true,
11
-            "callback" => function () {
11
+            "callback" => function() {
12 12
                 $content = new \Anax\Content\FileBasedContent();
13 13
                 $content->setDI($this);
14 14
 
Please login to merge, or discard this patch.
config/commons.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -24,10 +24,10 @@  discard block
 block discarded – undo
24 24
 error_reporting(-1); // Report all type of errors
25 25
 //error_reporting(E_ALL ^ E_DEPRECATED);  // Report no deprecated errors
26 26
 if (constant("ANAX_DEVELOPMENT")) {
27
-    ini_set("display_errors", 1);  // Display all errors
27
+    ini_set("display_errors", 1); // Display all errors
28 28
 } elseif (constant("ANAX_PRODUCTION")) {
29
-    ini_set("display_errors", 0);  // Display no errors
30
-    ini_set("log_errors", 1);      // Log errors to file error_log
29
+    ini_set("display_errors", 0); // Display no errors
30
+    ini_set("log_errors", 1); // Log errors to file error_log
31 31
     ini_set("error_log", ANAX_INSTALL_PATH . "/log/error_log");
32 32
 }
33 33
 
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
 /**
37 37
  * Default exception handler.
38 38
  */
39
-set_exception_handler(function ($e) {
39
+set_exception_handler(function($e) {
40 40
     echo "<p>Anax: Uncaught exception:</p><p>Line "
41 41
         . $e->getLine()
42 42
         . " in file "
Please login to merge, or discard this patch.
config/router/700_example.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@
 block discarded – undo
13 13
             "info" => "Just say hi with a string.",
14 14
             "method" => null,
15 15
             "path" => "hi",
16
-            "handler" => function () {
16
+            "handler" => function() {
17 17
                 //echo "Ho";
18 18
                 return "Hi.";
19 19
             },
Please login to merge, or discard this patch.
config/router/800_test.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -16,21 +16,21 @@  discard block
 block discarded – undo
16 16
         [
17 17
             "info" => "Just say hi with a string.",
18 18
             "path" => "hi",
19
-            "handler" => function () {
19
+            "handler" => function() {
20 20
                 return "Hi.";
21 21
             },
22 22
         ],
23 23
         [
24 24
             "info" => "Say No! with status code 500.",
25 25
             "path" => "no",
26
-            "handler" => function () {
26
+            "handler" => function() {
27 27
                 return ["No!", 500];
28 28
             },
29 29
         ],
30 30
         [
31 31
             "info" => "Say Hi through JSON.",
32 32
             "path" => "json",
33
-            "handler" => function () {
33
+            "handler" => function() {
34 34
                 return [["message" => "Hi JSON"]];
35 35
             },
36 36
         ],
@@ -47,28 +47,28 @@  discard block
 block discarded – undo
47 47
         [
48 48
             "info" => "Throw standard exception.",
49 49
             "path" => "exception",
50
-            "handler" => function () {
50
+            "handler" => function() {
51 51
                 throw new \Exception("Standard \Exception");
52 52
             },
53 53
         ],
54 54
         [
55 55
             "info" => "Try internal 403.",
56 56
             "path" => "403",
57
-            "handler" => function () {
57
+            "handler" => function() {
58 58
                 throw new ForbiddenException("Detailed error message.");
59 59
             },
60 60
         ],
61 61
         [
62 62
             "info" => "Try internal 404.",
63 63
             "path" => "404",
64
-            "handler" => function () {
64
+            "handler" => function() {
65 65
                 throw new NotFoundException("Detailed error message.");
66 66
             },
67 67
         ],
68 68
         [
69 69
             "info" => "Try internal 500.",
70 70
             "path" => "500",
71
-            "handler" => function () {
71
+            "handler" => function() {
72 72
                 throw new InternalErrorException("Detailed error message.");
73 73
             },
74 74
         ],
Please login to merge, or discard this patch.
src/Filter/MyTextFilter.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -108,7 +108,7 @@
 block discarded – undo
108 108
     {
109 109
         return preg_replace_callback(
110 110
             '#\b(?<![href|src]=[\'"])https?://[^\s()<>]+(?:\([\w\d]+\)|([^[:punct:]\s]|/))#',
111
-            function ($matches) {
111
+            function($matches) {
112 112
                 return "<a href=\'{$matches[0]}\'>{$matches[0]}</a>";
113 113
             },
114 114
             $text
Please login to merge, or discard this patch.
src/User/User.php 1 patch
Indentation   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -9,9 +9,9 @@  discard block
 block discarded – undo
9 9
  */
10 10
 class User extends ActiveRecordModel
11 11
 {
12
-      /**
13
-     * @var string $tableName name of the database table.
14
-     */
12
+        /**
13
+         * @var string $tableName name of the database table.
14
+         */
15 15
     protected $tableName = "User";
16 16
 
17 17
     /** Variables
@@ -42,9 +42,9 @@  discard block
 block discarded – undo
42 42
     }
43 43
 
44 44
 
45
-      /**
46
-     * Method
47
-     */
45
+        /**
46
+         * Method
47
+         */
48 48
     public function setSession($id)
49 49
     {
50 50
         session_destroy();
@@ -52,26 +52,26 @@  discard block
 block discarded – undo
52 52
         $_SESSION['user_id'] = $id;
53 53
     }
54 54
 
55
-      /**
56
-     * Method
57
-     */
55
+        /**
56
+         * Method
57
+         */
58 58
     public function getSession()
59 59
     {
60 60
         return $_SESSION['user_id'];
61 61
     }
62 62
 
63
-      /**
64
-     * Method
65
-     */
63
+        /**
64
+         * Method
65
+         */
66 66
     public function logoutSession()
67 67
     {
68 68
         session_destroy();
69 69
     }
70 70
 
71 71
 
72
-      /**
73
-     * Method
74
-     */
72
+        /**
73
+         * Method
74
+         */
75 75
     public function checkAvatar($avatar)
76 76
     {
77 77
         if ($avatar == null || $avatar == "") {
Please login to merge, or discard this patch.