Completed
Pull Request — erdiko2 (#29)
by
unknown
01:47
created
src/controllers/Web.php 3 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@
 block discarded – undo
40 40
         // Action
41 41
         $action .= empty($args['action']) ? "" : ucfirst($args['action']);
42 42
 
43
-         // @todo trigger 404 instead of throw exception
43
+            // @todo trigger 404 instead of throw exception
44 44
         if(!method_exists($this, $action))
45 45
             throw new \Exception("action does not exist");
46 46
 
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@
 block discarded – undo
41 41
         $action .= empty($args['action']) ? "" : ucfirst($args['action']);
42 42
 
43 43
          // @todo trigger 404 instead of throw exception
44
-        if(!method_exists($this, $action))
44
+        if (!method_exists($this, $action))
45 45
             throw new \Exception("action does not exist");
46 46
 
47 47
         return $action;
Please login to merge, or discard this patch.
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -41,8 +41,9 @@
 block discarded – undo
41 41
         $action .= empty($args['action']) ? "" : ucfirst($args['action']);
42 42
 
43 43
          // @todo trigger 404 instead of throw exception
44
-        if(!method_exists($this, $action))
45
-            throw new \Exception("action does not exist");
44
+        if(!method_exists($this, $action)) {
45
+                    throw new \Exception("action does not exist");
46
+        }
46 47
 
47 48
         return $action;
48 49
     }
Please login to merge, or discard this patch.
src/controllers/Api.php 1 patch
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -12,19 +12,19 @@
 block discarded – undo
12 12
 class Api extends \erdiko\Controller
13 13
 {
14 14
 
15
-  /**
16
-   * Contructor
17
-   */
15
+    /**
16
+     * Contructor
17
+     */
18 18
     public function __construct()
19 19
     {
20 20
         $this->_webroot = ERDIKO_ROOT;
21 21
         $this->_response = new \erdiko\core\ApiResponse;
22 22
     }
23 23
 
24
-  /**
25
-   * setStatusCode
26
-   *
27
-   */
24
+    /**
25
+     * setStatusCode
26
+     *
27
+     */
28 28
     public function setStatusCode($code = null)
29 29
     {
30 30
         if (!empty($code)) {
Please login to merge, or discard this patch.
src/controllers/Ajax.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -13,9 +13,9 @@
 block discarded – undo
13 13
 class Ajax extends \erdiko\Controller
14 14
 {
15 15
 
16
-  /**
17
-   * Contructor
18
-   */
16
+    /**
17
+     * Contructor
18
+     */
19 19
     public function __construct()
20 20
     {
21 21
         $this->_webroot = ERDIKO_ROOT;
Please login to merge, or discard this patch.
src/autoload.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -6,9 +6,9 @@
 block discarded – undo
6 6
  * @copyright   2012-2017 Arroyo Labs, Inc. http://www.arroyolabs.com
7 7
  * @author      John Arroyo <[email protected]>
8 8
  */
9
-ini_set('include_path', ini_get('include_path') . PATH_SEPARATOR . ERDIKO_ROOT . PATH_SEPARATOR . ERDIKO_ROOT . '/app');
9
+ini_set('include_path', ini_get('include_path').PATH_SEPARATOR.ERDIKO_ROOT.PATH_SEPARATOR.ERDIKO_ROOT.'/app');
10 10
 
11
-spl_autoload_register(function ($name) {
11
+spl_autoload_register(function($name) {
12 12
 
13 13
     // error_log("autoload: $name");
14 14
 
Please login to merge, or discard this patch.
bootstrap.php 3 patches
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1,9 +1,9 @@
 block discarded – undo
1 1
 <?php
2 2
 // @note should we fully deprecate the globals?
3
- define('ERDIKO_ROOT', getenv('ERDIKO_ROOT'));
4
- define('ERDIKO_PUBLIC', ERDIKO_ROOT.'/public');
5
- define('ERDIKO_APP', ERDIKO_ROOT.'/app');
6
- define('ERDIKO_VAR', ERDIKO_ROOT.'/var');
3
+    define('ERDIKO_ROOT', getenv('ERDIKO_ROOT'));
4
+    define('ERDIKO_PUBLIC', ERDIKO_ROOT.'/public');
5
+    define('ERDIKO_APP', ERDIKO_ROOT.'/app');
6
+    define('ERDIKO_VAR', ERDIKO_ROOT.'/var');
7 7
 
8 8
 // @todo move this function
9 9
 if (PHP_SAPI == 'cli-server') {
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -17,8 +17,8 @@
 block discarded – undo
17 17
 }
18 18
 
19 19
 require_once 'src/autoload.php';
20
-require_once ERDIKO_ROOT . '/vendor/autoload.php';
20
+require_once ERDIKO_ROOT.'/vendor/autoload.php';
21 21
 
22 22
 // Set a default context if none specified
23
-if(empty(getenv('ERDIKO_CONTEXT')))
23
+if (empty(getenv('ERDIKO_CONTEXT')))
24 24
         putenv("ERDIKO_CONTEXT=default");
25 25
\ No newline at end of file
Please login to merge, or discard this patch.
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -20,5 +20,6 @@
 block discarded – undo
20 20
 require_once ERDIKO_ROOT . '/vendor/autoload.php';
21 21
 
22 22
 // Set a default context if none specified
23
-if(empty(getenv('ERDIKO_CONTEXT')))
24
-        putenv("ERDIKO_CONTEXT=default");
25 23
\ No newline at end of file
24
+if(empty(getenv('ERDIKO_CONTEXT'))) {
25
+        putenv("ERDIKO_CONTEXT=default");
26
+}
Please login to merge, or discard this patch.
src/App.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@
 block discarded – undo
23 23
      */
24 24
     public function __construct($container = null)
25 25
     {
26
-        if($container == null) {
26
+        if ($container == null) {
27 27
             $container = require ERDIKO_ROOT."/contexts/".
28 28
                 getenv('ERDIKO_CONTEXT')."/bootstrap/settings.php";
29 29
         }
Please login to merge, or discard this patch.