Completed
Push — master ( a1c0c6...ad16ce )
by Jacob
09:58
created
utility/cron/ErrorCron.class.inc.php 2 patches
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -13,23 +13,23 @@  discard block
 block discarded – undo
13 13
 
14 14
 	function __construct()
15 15
 	{
16
-		if(Loader::isLive())
16
+		if (Loader::isLive())
17 17
 			$handle[] = self::$live_root;
18 18
 		else
19 19
 			$handle[] = self::$test_root;
20 20
 		
21 21
 		$i = 0;
22
-		while(isset($handle[$i]))
22
+		while (isset($handle[$i]))
23 23
 		{
24 24
 			$path = $handle[$i];
25 25
 			$fh = opendir($path);
26
-			while(false !== ($file = readdir($fh)))
26
+			while (false !== ($file = readdir($fh)))
27 27
 			{
28
-				if($file != '.' && $file != '..')
28
+				if ($file != '.' && $file != '..')
29 29
 				{
30
-					if(is_dir("{$path}/{$file}"))
30
+					if (is_dir("{$path}/{$file}"))
31 31
 						$handle[] = "{$path}/{$file}";
32
-					if($file == 'error.log')
32
+					if ($file == 'error.log')
33 33
 						$this->error_files[] = "{$path}/{$file}";
34 34
 				}
35 35
 			}
@@ -42,10 +42,10 @@  discard block
 block discarded – undo
42 42
 	{
43 43
 		$message = '';
44 44
 		
45
-		if(count($this->error_files) > 0)
45
+		if (count($this->error_files) > 0)
46 46
 		{
47 47
 			$message .= "Errors from flat-file logs.\n\n";
48
-			foreach($this->error_files as $error_file)
48
+			foreach ($this->error_files as $error_file)
49 49
 			{
50 50
 				$contents = file_get_contents($error_file);
51 51
 				$message .= "{$error_file}\n{$contents}\n\n";
@@ -60,9 +60,9 @@  discard block
 block discarded – undo
60 60
 		$mail->setMessage($message);
61 61
 		$mail->send();
62 62
 		
63
-		if(count($this->error_files) > 0)
63
+		if (count($this->error_files) > 0)
64 64
 		{
65
-			foreach($this->error_files as $error_file)
65
+			foreach ($this->error_files as $error_file)
66 66
 			{
67 67
 			//	if(file_exists($error_file))
68 68
 			//		unlink($error_file);
Please login to merge, or discard this patch.
Braces   +14 added lines, -11 removed lines patch added patch discarded remove patch
@@ -13,10 +13,11 @@  discard block
 block discarded – undo
13 13
 
14 14
 	function __construct()
15 15
 	{
16
-		if(Loader::isLive())
17
-			$handle[] = self::$live_root;
18
-		else
19
-			$handle[] = self::$test_root;
16
+		if(Loader::isLive()) {
17
+					$handle[] = self::$live_root;
18
+		} else {
19
+					$handle[] = self::$test_root;
20
+		}
20 21
 		
21 22
 		$i = 0;
22 23
 		while(isset($handle[$i]))
@@ -27,10 +28,12 @@  discard block
 block discarded – undo
27 28
 			{
28 29
 				if($file != '.' && $file != '..')
29 30
 				{
30
-					if(is_dir("{$path}/{$file}"))
31
-						$handle[] = "{$path}/{$file}";
32
-					if($file == 'error.log')
33
-						$this->error_files[] = "{$path}/{$file}";
31
+					if(is_dir("{$path}/{$file}")) {
32
+											$handle[] = "{$path}/{$file}";
33
+					}
34
+					if($file == 'error.log') {
35
+											$this->error_files[] = "{$path}/{$file}";
36
+					}
34 37
 				}
35 38
 			}
36 39
 			closedir($fh);
@@ -50,9 +53,9 @@  discard block
 block discarded – undo
50 53
 				$contents = file_get_contents($error_file);
51 54
 				$message .= "{$error_file}\n{$contents}\n\n";
52 55
 			}
53
-		}
54
-		else
55
-			$message = 'No errors found in the flat-files!';
56
+		} else {
57
+					$message = 'No errors found in the flat-files!';
58
+		}
56 59
 		
57 60
 		$mail = new Mail();
58 61
 		$mail->setToAddress('EMAIL', 'Jacob Emerick');
Please login to merge, or discard this patch.
utility/cron/BookCron.class.inc.php 2 patches
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -19,12 +19,12 @@  discard block
 block discarded – undo
19 19
 
20 20
 	public function activate()
21 21
 	{
22
-		if(!$this->xml)
22
+		if (!$this->xml)
23 23
 			return $this->error('Could not connect to feed.');
24 24
 		
25
-		foreach($this->xml->channel->item as $item)
25
+		foreach ($this->xml->channel->item as $item)
26 26
 		{
27
-			if(strtotime($item->user_read_at) <= 0)
27
+			if (strtotime($item->user_read_at) <= 0)
28 28
 				continue;
29 29
 			
30 30
 			$title = $item->title;
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
 			$date_added = date('Y-m-d H:i:s', strtotime($item->user_date_created));
43 43
 			
44 44
 			$book_result = BookCollector::getBookByFields($title, $author);
45
-			if($book_result !== null)
45
+			if ($book_result !== null)
46 46
 				continue;
47 47
 			
48 48
 			$query = sprintf(self::$QUERY, $title, $author, $link, $description, $image, $date_read, $date_added);
Please login to merge, or discard this patch.
Braces   +9 added lines, -6 removed lines patch added patch discarded remove patch
@@ -19,13 +19,15 @@  discard block
 block discarded – undo
19 19
 
20 20
 	public function activate()
21 21
 	{
22
-		if(!$this->xml)
23
-			return $this->error('Could not connect to feed.');
22
+		if(!$this->xml) {
23
+					return $this->error('Could not connect to feed.');
24
+		}
24 25
 		
25 26
 		foreach($this->xml->channel->item as $item)
26 27
 		{
27
-			if(strtotime($item->user_read_at) <= 0)
28
-				continue;
28
+			if(strtotime($item->user_read_at) <= 0) {
29
+							continue;
30
+			}
29 31
 			
30 32
 			$title = $item->title;
31 33
 			$title = trim($title);
@@ -42,8 +44,9 @@  discard block
 block discarded – undo
42 44
 			$date_added = date('Y-m-d H:i:s', strtotime($item->user_date_created));
43 45
 			
44 46
 			$book_result = BookCollector::getBookByFields($title, $author);
45
-			if($book_result !== null)
46
-				continue;
47
+			if($book_result !== null) {
48
+							continue;
49
+			}
47 50
 			
48 51
 			$query = sprintf(self::$QUERY, $title, $author, $link, $description, $image, $date_read, $date_added);
49 52
 			Database::execute($query);
Please login to merge, or discard this patch.
utility/cron/DistanceCron.class.inc.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -20,11 +20,11 @@  discard block
 block discarded – undo
20 20
 
21 21
 	public function activate()
22 22
 	{
23
-		if(!$this->json)
23
+		if (!$this->json)
24 24
 			return $this->error('Could not connect to feed.');
25 25
 		
26 26
 		$count = 0;
27
-		foreach($this->json->entries as $entry)
27
+		foreach ($this->json->entries as $entry)
28 28
 		{
29 29
 			$type = $entry->workout->activity_type;
30 30
 			$type = strtolower($type);
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
 			$date = date('Y-m-d H:i:s', strtotime($entry->at));
42 42
 			
43 43
 			$distance_result = DistanceCollector::getDistanceByFields($date, $type, $distance);
44
-			if($distance_result !== null)
44
+			if ($distance_result !== null)
45 45
 				continue;
46 46
 			
47 47
 			$query = sprintf(self::$QUERY, $type, $distance, $url, $felt, $title, $message, $date);
Please login to merge, or discard this patch.
Braces   +6 added lines, -4 removed lines patch added patch discarded remove patch
@@ -20,8 +20,9 @@  discard block
 block discarded – undo
20 20
 
21 21
 	public function activate()
22 22
 	{
23
-		if(!$this->json)
24
-			return $this->error('Could not connect to feed.');
23
+		if(!$this->json) {
24
+					return $this->error('Could not connect to feed.');
25
+		}
25 26
 		
26 27
 		$count = 0;
27 28
 		foreach($this->json->entries as $entry)
@@ -41,8 +42,9 @@  discard block
 block discarded – undo
41 42
 			$date = date('Y-m-d H:i:s', strtotime($entry->at));
42 43
 			
43 44
 			$distance_result = DistanceCollector::getDistanceByFields($date, $type, $distance);
44
-			if($distance_result !== null)
45
-				continue;
45
+			if($distance_result !== null) {
46
+							continue;
47
+			}
46 48
 			
47 49
 			$query = sprintf(self::$QUERY, $type, $distance, $url, $felt, $title, $message, $date);
48 50
 			Database::execute($query);
Please login to merge, or discard this patch.
utility/Header.class.inc.php 4 patches
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -186,10 +186,10 @@  discard block
 block discarded – undo
186 186
 
187 187
 	private static function send($array, $gzip = true)
188 188
 	{
189
-		if($gzip)
189
+		if ($gzip)
190 190
 			self::start_gzipping();
191 191
 		
192
-		foreach($array as $row)
192
+		foreach ($array as $row)
193 193
 		{
194 194
 			header($row, TRUE);
195 195
 		}
@@ -197,14 +197,14 @@  discard block
 block discarded – undo
197 197
 
198 198
 	private static function get_date($timestamp = false)
199 199
 	{
200
-		if($timestamp == 0)
200
+		if ($timestamp == 0)
201 201
 			$timestamp = time();
202 202
 		return gmdate('D, d M Y H:i:s \G\M\T', $timestamp);
203 203
 	}
204 204
 
205 205
 	private static function start_gzipping()
206 206
 	{
207
-		if(!ob_start('ob_gzhandler'))
207
+		if (!ob_start('ob_gzhandler'))
208 208
             ob_start();
209 209
 	}
210 210
 
Please login to merge, or discard this patch.
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -131,6 +131,9 @@
 block discarded – undo
131 131
 		self::send($array);
132 132
 	}
133 133
 
134
+	/**
135
+	 * @param string[] $array
136
+	 */
134 137
 	private static function send($array, $gzip = true)
135 138
 	{
136 139
 		if($gzip)
Please login to merge, or discard this patch.
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -152,7 +152,7 @@
 block discarded – undo
152 152
 	private static function start_gzipping()
153 153
 	{
154 154
 		if(!ob_start('ob_gzhandler'))
155
-            ob_start();
155
+			ob_start();
156 156
 	}
157 157
 
158 158
 }
Please login to merge, or discard this patch.
Braces   +9 added lines, -6 removed lines patch added patch discarded remove patch
@@ -133,8 +133,9 @@  discard block
 block discarded – undo
133 133
 
134 134
 	private static function send($array, $gzip = true)
135 135
 	{
136
-		if($gzip)
137
-			self::start_gzipping();
136
+		if($gzip) {
137
+					self::start_gzipping();
138
+		}
138 139
 		
139 140
 		foreach($array as $row)
140 141
 		{
@@ -144,15 +145,17 @@  discard block
 block discarded – undo
144 145
 
145 146
 	private static function get_date($timestamp = false)
146 147
 	{
147
-		if($timestamp == 0)
148
-			$timestamp = time();
148
+		if($timestamp == 0) {
149
+					$timestamp = time();
150
+		}
149 151
 		return gmdate('D, d M Y H:i:s \G\M\T', $timestamp);
150 152
 	}
151 153
 
152 154
 	private static function start_gzipping()
153 155
 	{
154
-		if(!ob_start('ob_gzhandler'))
155
-            ob_start();
156
+		if(!ob_start('ob_gzhandler')) {
157
+		            ob_start();
158
+		}
156 159
 	}
157 160
 
158 161
 }
Please login to merge, or discard this patch.
utility/Search.class.inc.php 2 patches
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.
Braces   +6 added lines, -4 removed lines patch added patch discarded remove patch
@@ -42,8 +42,9 @@  discard block
 block discarded – undo
42 42
 		foreach($this->result as $row)
43 43
 		{
44 44
 			$weight = $this->get_search_weight($row);
45
-			if($weight > 0)
46
-				$weighted_array[$row->id] = $weight;
45
+			if($weight > 0) {
46
+							$weighted_array[$row->id] = $weight;
47
+			}
47 48
 		}
48 49
 		arsort($weighted_array);
49 50
 		
@@ -52,8 +53,9 @@  discard block
 block discarded – undo
52 53
 		{
53 54
 			foreach($this->result as $row)
54 55
 			{
55
-				if($row->id == $id)
56
-					$final_array[] = $row;
56
+				if($row->id == $id) {
57
+									$final_array[] = $row;
58
+				}
57 59
 			}
58 60
 		}
59 61
 		return $final_array;
Please login to merge, or discard this patch.
controller/lifestream/DefaultListController.class.inc.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -56,11 +56,11 @@
 block discarded – undo
56 56
 	final private function get_list_posts()
57 57
 	{
58 58
 		$post_array = array();
59
-		foreach($this->get_list_results() as $post)
59
+		foreach ($this->get_list_results() as $post)
60 60
 		{
61 61
 			$post_array[] = $this->format_post($post, true);
62 62
 		}
63
-		if(count($post_array) < 1 && URLDecode::getPiece(1) !== 'search')
63
+		if (count($post_array) < 1 && URLDecode::getPiece(1) !== 'search')
64 64
 			$this->eject();
65 65
 		return $post_array;
66 66
 	}
Please login to merge, or discard this patch.
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -60,8 +60,9 @@
 block discarded – undo
60 60
 		{
61 61
 			$post_array[] = $this->format_post($post, true);
62 62
 		}
63
-		if(count($post_array) < 1 && URLDecode::getPiece(1) !== 'search')
64
-			$this->eject();
63
+		if(count($post_array) < 1 && URLDecode::getPiece(1) !== 'search') {
64
+					$this->eject();
65
+		}
65 66
 		return $post_array;
66 67
 	}
67 68
 
Please login to merge, or discard this patch.
controller/home/ContactController.class.inc.php 3 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@
 block discarded – undo
12 12
 
13 13
 	public function __construct()
14 14
 	{
15
-        global $config;
15
+		global $config;
16 16
 		$this->headers['From'] = self::$FROM;
17 17
 		$this->headers['Reply-To'] = "Jacob <{$config->admin_email}>";
18 18
 		$this->headers['Bcc'] = "Jacob <{$config->admin_email}>";
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -33,16 +33,16 @@  discard block
 block discarded – undo
33 33
 
34 34
 	private function process_form()
35 35
 	{
36
-		if(!Request::hasPost() || Request::getPost('submit') != 'Send Message!')
36
+		if (!Request::hasPost() || Request::getPost('submit') != 'Send Message!')
37 37
 			return (object) array('display' => 'normal');
38 38
 		
39 39
 		Loader::load('utility', 'Validate');
40 40
 		$error_result = array();
41
-		if(!Validate::checkRequest('post', 'name', 'string'))
41
+		if (!Validate::checkRequest('post', 'name', 'string'))
42 42
 			$error_result['name'] = 'please enter your name';
43
-		if(!Validate::checkRequest('post', 'email', 'string'))
43
+		if (!Validate::checkRequest('post', 'email', 'string'))
44 44
 			$error_result['email'] = 'please enter a valid email';
45
-		if(!Validate::checkRequest('post', 'message', 'string'))
45
+		if (!Validate::checkRequest('post', 'message', 'string'))
46 46
 			$error_result['message'] = 'please write a message';
47 47
 		
48 48
 		$values = (object) array(
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
 			'email' => Request::getPost('email'),
51 51
 			'message' => Request::getPost('message'));
52 52
 		
53
-		if(count($error_result) > 0)
53
+		if (count($error_result) > 0)
54 54
 		{
55 55
 			return (object) array(
56 56
 				'display' => 'error',
Please login to merge, or discard this patch.
Braces   +12 added lines, -8 removed lines patch added patch discarded remove patch
@@ -33,17 +33,21 @@
 block discarded – undo
33 33
 
34 34
 	private function process_form()
35 35
 	{
36
-		if(!Request::hasPost() || Request::getPost('submit') != 'Send Message!')
37
-			return (object) array('display' => 'normal');
36
+		if(!Request::hasPost() || Request::getPost('submit') != 'Send Message!') {
37
+					return (object) array('display' => 'normal');
38
+		}
38 39
 		
39 40
 		Loader::load('utility', 'Validate');
40 41
 		$error_result = array();
41
-		if(!Validate::checkRequest('post', 'name', 'string'))
42
-			$error_result['name'] = 'please enter your name';
43
-		if(!Validate::checkRequest('post', 'email', 'string'))
44
-			$error_result['email'] = 'please enter a valid email';
45
-		if(!Validate::checkRequest('post', 'message', 'string'))
46
-			$error_result['message'] = 'please write a message';
42
+		if(!Validate::checkRequest('post', 'name', 'string')) {
43
+					$error_result['name'] = 'please enter your name';
44
+		}
45
+		if(!Validate::checkRequest('post', 'email', 'string')) {
46
+					$error_result['email'] = 'please enter a valid email';
47
+		}
48
+		if(!Validate::checkRequest('post', 'message', 'string')) {
49
+					$error_result['message'] = 'please write a message';
50
+		}
47 51
 		
48 52
 		$values = (object) array(
49 53
 			'name' => Request::getPost('name'),
Please login to merge, or discard this patch.
bootstrap.php 2 patches
Indentation   +26 added lines, -26 removed lines patch added patch discarded remove patch
@@ -7,7 +7,7 @@  discard block
 block discarded – undo
7 7
 
8 8
 $handle = @fopen($config_path, 'r');
9 9
 if ($handle === false) {
10
-    throw new RuntimeException("Could not load config");
10
+	throw new RuntimeException("Could not load config");
11 11
 }
12 12
 $config = fread($handle, filesize($config_path));
13 13
 fclose($handle);
@@ -15,40 +15,40 @@  discard block
 block discarded – undo
15 15
 $config = json_decode($config);
16 16
 $last_json_error = json_last_error();
17 17
 if ($last_json_error !== JSON_ERROR_NONE) {
18
-    throw new RuntimeException("Could not parse config - JSON error detected");
18
+	throw new RuntimeException("Could not parse config - JSON error detected");
19 19
 }
20 20
 
21 21
 // configure the db connections holder
22 22
 $db_connections = new Aura\Sql\ConnectionLocator();
23 23
 $db_connections->setDefault(function () use ($config) {
24
-    $connection = $config->database->slave;
25
-    return new Aura\Sql\ExtendedPdo(
26
-        "mysql:host={$connection->host}",
27
-        $connection->user,
28
-        $connection->password
29
-    );
24
+	$connection = $config->database->slave;
25
+	return new Aura\Sql\ExtendedPdo(
26
+		"mysql:host={$connection->host}",
27
+		$connection->user,
28
+		$connection->password
29
+	);
30 30
 });
31 31
 $db_connections->setWrite('master', function () use ($config) {
32
-    $connection = $config->database->master;
33
-    return new Aura\Sql\ExtendedPdo(
34
-        "mysql:host={$connection->host}",
35
-        $connection->user,
36
-        $connection->password
37
-    );
32
+	$connection = $config->database->master;
33
+	return new Aura\Sql\ExtendedPdo(
34
+		"mysql:host={$connection->host}",
35
+		$connection->user,
36
+		$connection->password
37
+	);
38 38
 });
39 39
 $db_connections->setRead('slave', function () use ($config) {
40
-    $connection = $config->database->slave;
41
-    $pdo = new Aura\Sql\ExtendedPdo(
42
-        "mysql:host={$connection->host}",
43
-        $connection->user,
44
-        $connection->password
45
-    );
46
-
47
-    $profiler = new Aura\Sql\Profiler();
48
-    $profiler->setActive(true);
49
-    $pdo->setProfiler($profiler);
50
-
51
-    return $pdo;
40
+	$connection = $config->database->slave;
41
+	$pdo = new Aura\Sql\ExtendedPdo(
42
+		"mysql:host={$connection->host}",
43
+		$connection->user,
44
+		$connection->password
45
+	);
46
+
47
+	$profiler = new Aura\Sql\Profiler();
48
+	$profiler->setActive(true);
49
+	$pdo->setProfiler($profiler);
50
+
51
+	return $pdo;
52 52
 });
53 53
 
54 54
 // setup the service locator
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
20 20
 
21 21
 // configure the db connections holder
22 22
 $db_connections = new Aura\Sql\ConnectionLocator();
23
-$db_connections->setDefault(function () use ($config) {
23
+$db_connections->setDefault(function() use ($config) {
24 24
     $connection = $config->database->slave;
25 25
     return new Aura\Sql\ExtendedPdo(
26 26
         "mysql:host={$connection->host}",
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
         $connection->password
29 29
     );
30 30
 });
31
-$db_connections->setWrite('master', function () use ($config) {
31
+$db_connections->setWrite('master', function() use ($config) {
32 32
     $connection = $config->database->master;
33 33
     return new Aura\Sql\ExtendedPdo(
34 34
         "mysql:host={$connection->host}",
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
         $connection->password
37 37
     );
38 38
 });
39
-$db_connections->setRead('slave', function () use ($config) {
39
+$db_connections->setRead('slave', function() use ($config) {
40 40
     $connection = $config->database->slave;
41 41
     $pdo = new Aura\Sql\ExtendedPdo(
42 42
         "mysql:host={$connection->host}",
Please login to merge, or discard this patch.
src/Domain/Stream/YouTube/MysqlYouTubeRepository.php 2 patches
Doc Comments   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@  discard block
 block discarded – undo
11 11
     protected $connections;
12 12
 
13 13
     /**
14
-     * @param ConnectonLocator $connections
14
+     * @param ConnectionLocator $connections
15 15
      */
16 16
     public function __construct(ConnectionLocator $connections)
17 17
     {
@@ -41,7 +41,6 @@  discard block
 block discarded – undo
41 41
     }
42 42
 
43 43
     /**
44
-     * @param string $title
45 44
      *
46 45
      * @return array|false
47 46
      */
Please login to merge, or discard this patch.
Indentation   +52 added lines, -52 removed lines patch added patch discarded remove patch
@@ -7,75 +7,75 @@
 block discarded – undo
7 7
 class MysqlYouTubeRepository implements YouTubeRepositoryInterface
8 8
 {
9 9
 
10
-    /** @var  ConnectionLocator */
11
-    protected $connections;
10
+	/** @var  ConnectionLocator */
11
+	protected $connections;
12 12
 
13
-    /**
14
-     * @param ConnectonLocator $connections
15
-     */
16
-    public function __construct(ConnectionLocator $connections)
17
-    {
18
-        $this->connections = $connections;
19
-    }
13
+	/**
14
+	 * @param ConnectonLocator $connections
15
+	 */
16
+	public function __construct(ConnectionLocator $connections)
17
+	{
18
+		$this->connections = $connections;
19
+	}
20 20
 
21
-    /**
22
-     * @param integer $id
23
-     *
24
-     * @return array|false
25
-     */
26
-    public function getYouTubeById($id)
27
-    {
28
-        $query = "
21
+	/**
22
+	 * @param integer $id
23
+	 *
24
+	 * @return array|false
25
+	 */
26
+	public function getYouTubeById($id)
27
+	{
28
+		$query = "
29 29
             SELECT *
30 30
             FROM `jpemeric_stream`.`youtube`
31 31
             WHERE `id` = :id
32 32
             LIMIT 1";
33
-        $bindings = [
34
-            'id' => $id,
35
-        ];
33
+		$bindings = [
34
+			'id' => $id,
35
+		];
36 36
 
37
-        return $this
38
-            ->connections
39
-            ->getRead()
40
-            ->fetchOne($query, $bindings);
41
-    }
37
+		return $this
38
+			->connections
39
+			->getRead()
40
+			->fetchOne($query, $bindings);
41
+	}
42 42
 
43
-    /**
44
-     * @param string $title
45
-     *
46
-     * @return array|false
47
-     */
48
-    public function getYouTubeByVideoId($videoId)
49
-    {
50
-        $query = "
43
+	/**
44
+	 * @param string $title
45
+	 *
46
+	 * @return array|false
47
+	 */
48
+	public function getYouTubeByVideoId($videoId)
49
+	{
50
+		$query = "
51 51
             SELECT *
52 52
             FROM `jpemeric_stream`.`youtube`
53 53
             WHERE `video_id` = :video_id
54 54
             LIMIT 1";
55
-        $bindings = [
56
-            'video_id' => $videoId,
57
-        ];
55
+		$bindings = [
56
+			'video_id' => $videoId,
57
+		];
58 58
 
59
-        return $this
60
-            ->connections
61
-            ->getRead()
62
-            ->fetchOne($query, $bindings);
63
-    }
59
+		return $this
60
+			->connections
61
+			->getRead()
62
+			->fetchOne($query, $bindings);
63
+	}
64 64
 
65
-    /**
66
-     * @return array|false
67
-     */
68
-    public function getUnmappedYouTubes()
69
-    {
70
-        $query = "
65
+	/**
66
+	 * @return array|false
67
+	 */
68
+	public function getUnmappedYouTubes()
69
+	{
70
+		$query = "
71 71
             SELECT `id`, `date`
72 72
             FROM `jpemeric_stream`.`youtube`
73 73
             LEFT JOIN `jpemeric_stream`.`post`
74 74
             ON `post`.`type_id` = `youtube`.`id` AND `post`.`id` IS NULL";
75 75
 
76
-        return $this
77
-            ->connections
78
-            ->getRead()
79
-            ->fetchAll($query);
80
-    }
76
+		return $this
77
+			->connections
78
+			->getRead()
79
+			->fetchAll($query);
80
+	}
81 81
 }
Please login to merge, or discard this patch.