Completed
Push — master ( 4775c0...e1a3eb )
by Jacob
03:33
created
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/portfolio/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 = 'portfolio';
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.
utility/Header.class.inc.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -10,8 +10,8 @@  discard block
 block discarded – undo
10 10
 			'Cache-Control: no-cache',
11 11
 			'Content-Language: en',
12 12
 			'Content-Type: application/json',
13
-			'Expires: ' . self::get_date(time() - 1),
14
-			'Last-Modified: ' . self::get_date(),
13
+			'Expires: '.self::get_date(time() - 1),
14
+			'Last-Modified: '.self::get_date(),
15 15
 			'X-Powered-By: jacobemerick.com');
16 16
 		self::send($array);
17 17
 	}
@@ -23,8 +23,8 @@  discard block
 block discarded – undo
23 23
 			'Cache-Control: no-cache',
24 24
 			'Content-Language: en',
25 25
 			'Content-Type: text/html',
26
-			'Expires: ' . self::get_date(time() - 1),
27
-			'Last-Modified: ' . self::get_date(),
26
+			'Expires: '.self::get_date(time() - 1),
27
+			'Last-Modified: '.self::get_date(),
28 28
 			'X-Powered-By: jacobemerick.com');
29 29
 		self::send($array);
30 30
 	}
@@ -42,8 +42,8 @@  discard block
 block discarded – undo
42 42
 			'Cache-Control: no-cache',
43 43
 			'Content-Language: en',
44 44
 			'Content-Type: text/html',
45
-			'Expires: ' . self::get_date(time() - 1),
46
-			'Last-Modified: ' . self::get_date(),
45
+			'Expires: '.self::get_date(time() - 1),
46
+			'Last-Modified: '.self::get_date(),
47 47
 			'X-Powered-By: jacobemerick.com');
48 48
 		self::send($array);
49 49
 	}
@@ -55,18 +55,18 @@  discard block
 block discarded – undo
55 55
 			'Cache-Control: no-cache',
56 56
 			'Content-Language: en',
57 57
 			'Content-Type: text/html',
58
-			'Expires: ' . self::get_date(time() - 1),
59
-			'Last-Modified: ' . self::get_date(),
58
+			'Expires: '.self::get_date(time() - 1),
59
+			'Last-Modified: '.self::get_date(),
60 60
 			'X-Powered-By: jacobemerick.com');
61 61
 		self::send($array);
62 62
 	}
63 63
 
64 64
 	private static function send($array, $gzip = true)
65 65
 	{
66
-		if($gzip)
66
+		if ($gzip)
67 67
 			self::start_gzipping();
68 68
 		
69
-		foreach($array as $row)
69
+		foreach ($array as $row)
70 70
 		{
71 71
 			header($row, TRUE);
72 72
 		}
@@ -74,14 +74,14 @@  discard block
 block discarded – undo
74 74
 
75 75
 	private static function get_date($timestamp = false)
76 76
 	{
77
-		if($timestamp == 0)
77
+		if ($timestamp == 0)
78 78
 			$timestamp = time();
79 79
 		return gmdate('D, d M Y H:i:s \G\M\T', $timestamp);
80 80
 	}
81 81
 
82 82
 	private static function start_gzipping()
83 83
 	{
84
-		if(!ob_start('ob_gzhandler'))
84
+		if (!ob_start('ob_gzhandler'))
85 85
             ob_start();
86 86
 	}
87 87
 
Please login to merge, or discard this patch.
utility/content/ImperialUnitContent.class.inc.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -26,16 +26,16 @@  discard block
 block discarded – undo
26 26
         
27 27
         switch ($type) {
28 28
             case 'full miles' :
29
-                $this->content = number_format(round($number / (12 * 3 * 1760))) . ' miles';
29
+                $this->content = number_format(round($number / (12 * 3 * 1760))).' miles';
30 30
                 break;
31 31
             case 'tenth miles' :
32
-                $this->content = round($number / (12 * 3 * 1760), 1) . ' miles';
32
+                $this->content = round($number / (12 * 3 * 1760), 1).' miles';
33 33
                 break;
34 34
             case 'yards' :
35
-                $this->content = number_format(round($number / (12 * 3))) . ' yards';
35
+                $this->content = number_format(round($number / (12 * 3))).' yards';
36 36
                 break;
37 37
             case 'feet' :
38
-                $this->content = number_format(round($number / 12)) . "'";
38
+                $this->content = number_format(round($number / 12))."'";
39 39
                 break;
40 40
             case 'inches' :
41 41
                 $feet = floor($number / 12);
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
                 }
50 50
                 
51 51
                 $this->content = '';
52
-                $this->content .= number_format($feet) . "'";
52
+                $this->content .= number_format($feet)."'";
53 53
                 if (isset($inches) && $inches > 0) {
54 54
                     $this->content .= " {$inches}\"";
55 55
                 }
Please login to merge, or discard this patch.
utility/content/CleanCommentContent.class.inc.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -40,10 +40,10 @@  discard block
 block discarded – undo
40 40
 	{
41 41
 		$match_count = preg_match_all($pattern, $this->content, $matches, PREG_SET_ORDER);
42 42
 		
43
-		if($match_count < 1)
43
+		if ($match_count < 1)
44 44
 			return;
45 45
 		
46
-		foreach($matches as $match)
46
+		foreach ($matches as $match)
47 47
 		{
48 48
 			$full_match = array_shift($match);
49 49
 			$placeholder = $this->create_placeholder($full_match);
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
 
57 57
 	private function create_placeholder($text)
58 58
 	{
59
-		return md5($text . rand());
59
+		return md5($text.rand());
60 60
 	}
61 61
 
62 62
 	private function create_full_match_pattern($text)
@@ -79,10 +79,10 @@  discard block
 block discarded – undo
79 79
 	{
80 80
 		$match_count = preg_match_all($pattern, $this->content, $matches, PREG_SET_ORDER);
81 81
 		
82
-		if($match_count < 1)
82
+		if ($match_count < 1)
83 83
 			return;
84 84
 		
85
-		foreach($matches as $match)
85
+		foreach ($matches as $match)
86 86
 		{
87 87
 			$full_match = array_shift($match);
88 88
 			$full_match_pattern = $this->create_full_match_pattern($full_match);
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
 
100 100
 	private function replace_element_patterns()
101 101
 	{
102
-		foreach($this->replacement_array as $key => $replace)
102
+		foreach ($this->replacement_array as $key => $replace)
103 103
 		{
104 104
 			$this->content = str_replace($key, $replace, $this->content);
105 105
 		}
Please login to merge, or discard this patch.