Completed
Push — master ( a1f655...a0345d )
by Jacob
08:14
created
utility/Request.class.inc.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -18,9 +18,9 @@  discard block
 block discarded – undo
18 18
 
19 19
 	static function getServer($key = null)
20 20
 	{
21
-		if($key)
21
+		if ($key)
22 22
 		{
23
-			if(isset(self::$server[$key]))
23
+			if (isset(self::$server[$key]))
24 24
 				return self::$server[$key];
25 25
 			return false;
26 26
 		}
@@ -29,16 +29,16 @@  discard block
 block discarded – undo
29 29
 
30 30
 	static function isAjax()
31 31
 	{
32
-		if(self::getServer(self::$AJAX_REQUEST))
32
+		if (self::getServer(self::$AJAX_REQUEST))
33 33
 			return true;
34 34
 		return false;
35 35
 	}
36 36
 
37 37
 	static function getGet($key = null)
38 38
 	{
39
-		if($key)
39
+		if ($key)
40 40
 		{
41
-			if(isset(self::$get[$key]))
41
+			if (isset(self::$get[$key]))
42 42
 				return self::$get[$key];
43 43
 			return false;
44 44
 		}
@@ -47,9 +47,9 @@  discard block
 block discarded – undo
47 47
 
48 48
 	static function getPost($key = null)
49 49
 	{
50
-		if($key)
50
+		if ($key)
51 51
 		{
52
-			if(isset(self::$post[$key]))
52
+			if (isset(self::$post[$key]))
53 53
 				return self::$post[$key];
54 54
 			return false;
55 55
 		}
Please login to merge, or discard this patch.
src/Domain/Waterfall/Log/LogRepositoryInterface.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -4,5 +4,5 @@
 block discarded – undo
4 4
 
5 5
 interface LogRepositoryInterface
6 6
 {
7
-    public function getActiveLogs($limit = null, $offset= 0);
7
+    public function getActiveLogs($limit = null, $offset = 0);
8 8
 }
Please login to merge, or discard this patch.
src/Domain/Waterfall/Waterfall/WaterfallRepositoryInterface.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -4,5 +4,5 @@
 block discarded – undo
4 4
 
5 5
 interface WaterfallRepositoryInterface
6 6
 {
7
-    public function getWaterfalls($limit = null, $offset= 0);
7
+    public function getWaterfalls($limit = null, $offset = 0);
8 8
 }
Please login to merge, or discard this patch.
utility/Search.class.inc.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -39,20 +39,20 @@  discard block
 block discarded – undo
39 39
 	public function perform()
40 40
 	{
41 41
 		$weighted_array = array();
42
-		foreach($this->result as $row)
42
+		foreach ($this->result as $row)
43 43
 		{
44 44
 			$weight = $this->get_search_weight($row);
45
-			if($weight > 0)
45
+			if ($weight > 0)
46 46
 				$weighted_array[$row['id']] = $weight;
47 47
 		}
48 48
 		arsort($weighted_array);
49 49
 		
50 50
 		$final_array = array();
51
-		foreach($weighted_array as $id => $weight)
51
+		foreach ($weighted_array as $id => $weight)
52 52
 		{
53
-			foreach($this->result as $row)
53
+			foreach ($this->result as $row)
54 54
 			{
55
-				if($row['id'] == $id)
55
+				if ($row['id'] == $id)
56 56
 					$final_array[] = $row;
57 57
 			}
58 58
 		}
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
 	private function get_search_weight($row)
63 63
 	{
64 64
 		$weight = 0;
65
-		foreach($this->weight as $weight_array)
65
+		foreach ($this->weight as $weight_array)
66 66
 		{
67 67
 			$text = $row[$weight_array['field']];
68 68
 			$weight += $weight_array['weight'] * substr_count(strtolower($text), strtolower($this->query));
Please login to merge, or discard this patch.
router/PortfolioRouter.class.inc.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
             ],
27 27
         ];
28 28
 
29
-        return array_map(function ($row) {
29
+        return array_map(function($row) {
30 30
             return (object) $row;
31 31
         }, $paths);
32 32
     }
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
             ],
49 49
         ];
50 50
 
51
-        return array_map(function ($row) {
51
+        return array_map(function($row) {
52 52
             return (object) $row;
53 53
         }, $paths);
54 54
     }
Please login to merge, or discard this patch.
router/Router.class.inc.php 1 patch
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -18,10 +18,10 @@  discard block
 block discarded – undo
18 18
 
19 19
 	private static function get_router_name()
20 20
 	{
21
-		if(Request::isAJAX())
21
+		if (Request::isAJAX())
22 22
 			return 'AJAXRouter';
23 23
 		
24
-		switch(URLDecode::getSite())
24
+		switch (URLDecode::getSite())
25 25
 		{
26 26
 			case 'ajax' :
27 27
 				return 'AjaxRouter';
@@ -65,42 +65,42 @@  discard block
 block discarded – undo
65 65
 
66 66
 	final protected function check_for_redirect($redirect_uri)
67 67
 	{
68
-		foreach($this->get_redirect_array() as $check)
68
+		foreach ($this->get_redirect_array() as $check)
69 69
 		{
70 70
 			$redirect_uri = preg_replace($check->pattern, $check->replace, $redirect_uri);
71 71
 		}
72 72
 		
73 73
 		$redirect_uri = $this->check_for_special_redirect($redirect_uri);
74 74
 		
75
-		if($this->requires_trailing_slash() && substr($redirect_uri, -1) != '/')
75
+		if ($this->requires_trailing_slash() && substr($redirect_uri, -1) != '/')
76 76
 			$redirect_uri .= '/';
77 77
 		
78 78
         if (URLDecode::getHost() == 'waterfalls.jacobemerick.com') {
79 79
             $protocol = (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off') ? 'https' : 'http';
80
-            $redirect_uri = $protocol . '://' . (!Loader::isLive() ? 'dev' : 'www') . '.waterfallsofthekeweenaw.com' . $redirect_uri;
80
+            $redirect_uri = $protocol.'://'.(!Loader::isLive() ? 'dev' : 'www').'.waterfallsofthekeweenaw.com'.$redirect_uri;
81 81
         }
82 82
         
83
-		if($redirect_uri == URLDecode::getURI())
83
+		if ($redirect_uri == URLDecode::getURI())
84 84
 			return;
85 85
 		
86 86
 		$controller_check = $redirect_uri;
87
-		if(substr($redirect_uri, 0, 4) == 'http') {
87
+		if (substr($redirect_uri, 0, 4) == 'http') {
88 88
       $protocol = (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off') ? 'https' : 'http';
89
-			$controller_check = preg_replace('@^' . $protocol . '://([a-z\.]+)@', '', $redirect_uri);
89
+			$controller_check = preg_replace('@^'.$protocol.'://([a-z\.]+)@', '', $redirect_uri);
90 90
     }
91 91
 		
92 92
 		$controller = $this->get_controller($controller_check);
93
-		if($controller == '/Error404Controller')
93
+		if ($controller == '/Error404Controller')
94 94
 		{
95 95
 			Loader::loadNew('controller', '/Error404Controller')
96 96
 				->activate();
97 97
 			exit;
98 98
 		}
99 99
 
100
-		if(substr($redirect_uri, 0, 4) != 'http')
100
+		if (substr($redirect_uri, 0, 4) != 'http')
101 101
 		{
102 102
 			$redirect_uri = substr($redirect_uri, 1);
103
-			$redirect_uri = URLDecode::getBase() . $redirect_uri;
103
+			$redirect_uri = URLDecode::getBase().$redirect_uri;
104 104
 		}
105 105
 		
106 106
 		Loader::loadNew('controller', '/Error301Controller', (array) $redirect_uri)
@@ -114,12 +114,12 @@  discard block
 block discarded – undo
114 114
 
115 115
 	final private function get_controller($uri)
116 116
 	{
117
-		foreach($this->get_direct_array() as $check)
117
+		foreach ($this->get_direct_array() as $check)
118 118
 		{
119
-			if($uri == $check->match)
119
+			if ($uri == $check->match)
120 120
 				return "{$this->get_primary_folder()}/{$check->controller}";
121 121
 			
122
-			if(preg_match("@^{$check->match}$@", $uri))
122
+			if (preg_match("@^{$check->match}$@", $uri))
123 123
 				return "{$this->get_primary_folder()}/{$check->controller}";
124 124
 		}
125 125
 		
@@ -128,7 +128,7 @@  discard block
 block discarded – undo
128 128
 
129 129
 	final private function get_primary_folder()
130 130
 	{
131
-		if(Request::isAjax())
131
+		if (Request::isAjax())
132 132
 			return 'ajax';
133 133
 		
134 134
 		return URLDecode::getSite();
Please login to merge, or discard this patch.
public/lifestream/index.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,7 +1,7 @@
 block discarded – undo
1 1
 <?php
2 2
 
3 3
 $namespace = 'lifestream';
4
-require_once __DIR__ . '/../../bootstrap.php';
4
+require_once __DIR__.'/../../bootstrap.php';
5 5
 
6 6
 // route
7 7
 Loader::loadInstance('router', 'Router');
Please login to merge, or discard this patch.
public/site/index.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,7 +1,7 @@
 block discarded – undo
1 1
 <?php
2 2
 
3 3
 $namespace = 'site';
4
-require_once __DIR__ . '/../../bootstrap.php';
4
+require_once __DIR__.'/../../bootstrap.php';
5 5
 
6 6
 // route
7 7
 Loader::loadInstance('router', 'Router');
Please login to merge, or discard this patch.
public/waterfalls/index.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,7 +1,7 @@
 block discarded – undo
1 1
 <?php
2 2
 
3 3
 $namespace = 'waterfalls';
4
-require_once __DIR__ . '/../../bootstrap.php';
4
+require_once __DIR__.'/../../bootstrap.php';
5 5
 
6 6
 // route
7 7
 Loader::loadInstance('router', 'Router');
Please login to merge, or discard this patch.