Completed
Pull Request — master (#2)
by Jacob
04:01
created
tests/unit/domain/blog/MysqlPostRepositoryTest.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
     public function __construct()
14 14
     {
15 15
         $extendedPdo = $this->newExtendedPdo();
16
-        $this->connections = new ConnectionLocator(function () use ($extendedPdo) {
16
+        $this->connections = new ConnectionLocator(function() use ($extendedPdo) {
17 17
             return $extendedPdo;
18 18
         });
19 19
     }
Please login to merge, or discard this patch.
src/Domain/Blog/Post/PostRepositoryInterface.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -5,7 +5,7 @@
 block discarded – undo
5 5
 interface PostRepository
6 6
 {
7 7
     public function findPostByPath($category, $path);
8
-    public function getActivePosts($limit = null, $offset= 0);
8
+    public function getActivePosts($limit = null, $offset = 0);
9 9
     public function getActivePostsCount();
10 10
     public function getActivePostsByTag($tag, $limit = null, $offset = 0);
11 11
     public function getActivePostsCountByTag($tag);
Please login to merge, or discard this patch.
controller/home/HomeController.class.inc.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -48,7 +48,7 @@
 block discarded – undo
48 48
     $recentPosts = $postRepository->getActivePosts(3);
49 49
 
50 50
 		$recent_post_array = array();
51
-		foreach($recentPosts as $postResult)
51
+		foreach ($recentPosts as $postResult)
52 52
 		{
53 53
 			$post = new stdclass();
54 54
 			$post->title = $postResult['title'];
Please login to merge, or discard this patch.
utility/Debugger.class.inc.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@  discard block
 block discarded – undo
8 8
 
9 9
 	private static $UNKNOWN_ERROR_FILE		= 'Unknown File';
10 10
 	private static $UNKNOWN_ERROR_LINE		= 'Unknown Line';
11
-	private static $UNKNOWN_ERROR_CONTEXT	= 'Unknown Context';
11
+	private static $UNKNOWN_ERROR_CONTEXT = 'Unknown Context';
12 12
 
13 13
 	private $profiler;
14 14
 	private $display = true;
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
 
25 25
 	public static function instance()
26 26
 	{
27
-		if(!isset(self::$instance))
27
+		if (!isset(self::$instance))
28 28
 			self::$instance = new Debugger();
29 29
 		return self::$instance;
30 30
 	}
@@ -52,11 +52,11 @@  discard block
 block discarded – undo
52 52
 
53 53
 	public static function internal_error($code, $string, $file = null, $line = null, $context = null)
54 54
 	{
55
-		if($file == null)
55
+		if ($file == null)
56 56
 			$file = self::$UNKNOWN_ERROR_FILE;
57
-		if($line == null)
57
+		if ($line == null)
58 58
 			$line = self::$UNKNOWN_ERROR_LINE;
59
-		if($context == null)
59
+		if ($context == null)
60 60
 			$context = self::$UNKNOWN_ERROR_CONTEXT;
61 61
 		
62 62
 		self::instance()->console->logError(new Exception($string), "{$string}... TYPE: {$code}");
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
 	{
69 69
 		$error = error_get_last();
70 70
 		
71
-		if(isset($error))
71
+		if (isset($error))
72 72
 			self::internal_error($error['type'], $error['message'], $error['file'], $error['line']);
73 73
 		
74 74
 		self::display();
@@ -90,10 +90,10 @@  discard block
 block discarded – undo
90 90
       }
91 91
       if (!empty($pdo)) {
92 92
         $profiles = $pdo->getProfiler()->getProfiles();
93
-        $profiles = array_filter($profiles, function ($profile) {
93
+        $profiles = array_filter($profiles, function($profile) {
94 94
             return $profile['function'] == 'perform';
95 95
         });
96
-        $profiles = array_map(function ($profile) {
96
+        $profiles = array_map(function($profile) {
97 97
             return array(
98 98
                 'sql' => trim(preg_replace('/\s+/', ' ', $profile['statement'])),
99 99
                 'parameters' => $profile['bind_values'],
Please login to merge, or discard this patch.
router/BlogRouter.class.inc.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -45,11 +45,11 @@  discard block
 block discarded – undo
45 45
 
46 46
 	protected function check_for_special_redirect($uri)
47 47
 	{
48
-		if(preg_match('@^/post_([0-9]{4}-[0-9]{2}-[0-9]{2})_([a-z0-9-]+)(/?)$@', $uri, $matches))
48
+		if (preg_match('@^/post_([0-9]{4}-[0-9]{2}-[0-9]{2})_([a-z0-9-]+)(/?)$@', $uri, $matches))
49 49
 		{
50 50
 			Loader::load('collector', 'blog/PostCollector');
51 51
 			$post = PostCollector::getPostByURI($matches[2]);
52
-			if(!$post)
52
+			if (!$post)
53 53
 			{
54 54
 				Loader::loadNew('controller', '/Error404Controller')
55 55
 					->activate();
@@ -61,21 +61,21 @@  discard block
 block discarded – undo
61 61
 		else
62 62
 		{
63 63
 			$post_uri = URLDecode::getPiece(1);
64
-			if($post_uri !== null)
64
+			if ($post_uri !== null)
65 65
 			{
66 66
 				Loader::load('collector', 'blog/PostCollector');
67 67
 				$post = PostCollector::getPostByURI($post_uri);
68 68
 				
69
-				if($post != false)
69
+				if ($post != false)
70 70
 				{
71 71
 					Loader::load('utility', 'Content');
72 72
 					$uri = Content::instance('URLSafe', "/{$post->category}/{$post->title_url}/")->activate();
73 73
 				}
74 74
 			}
75 75
 		}
76
-		if($uri == '/search/')
76
+		if ($uri == '/search/')
77 77
 		{
78
-			if(Request::getGet('submit') == 'Submit Search' && Request::getGet('search'))
78
+			if (Request::getGet('submit') == 'Submit Search' && Request::getGet('search'))
79 79
 			{
80 80
 				$uri .= Request::getGet('search');
81 81
 				$uri .= '/';
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
@@ -27,12 +27,12 @@
 block discarded – undo
27 27
 
28 28
 	protected function check_for_special_redirect($uri)
29 29
 	{
30
-		if(preg_match('@^/piece/([a-z0-9-]+)(/?)$@', $uri, $matches))
30
+		if (preg_match('@^/piece/([a-z0-9-]+)(/?)$@', $uri, $matches))
31 31
 		{
32 32
 			Loader::load('collector', 'portfolio/PortfolioCollector');
33 33
 			$piece = PortfolioCollector::getPieceByURI($matches[1]);
34 34
 			
35
-			if($piece === null)
35
+			if ($piece === null)
36 36
 			{
37 37
 				Loader::loadNew('controller', '/Error404Controller')
38 38
 					->activate();
Please login to merge, or discard this patch.
collector/comment/CommentCollector.class.inc.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -163,7 +163,7 @@
 block discarded – undo
163 163
 	{
164 164
 		$path = self::escape($path);
165 165
 		
166
-		if($commenter != 0)
166
+		if ($commenter != 0)
167 167
 			$trusted_commenter_clause = "(`commenter`.`trusted` = '1' || `commenter`.`id` = '{$commenter}')";
168 168
 		else
169 169
 			$trusted_commenter_clause = "`commenter`.`trusted` = '1'";
Please login to merge, or discard this patch.
collector/blog/PostCollector.class.inc.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -80,7 +80,7 @@
 block discarded – undo
80 80
 		$tag_clause = "'{$tag_clause}'";
81 81
 		
82 82
 		$exclude_clause = '';
83
-		if(count($exclude_posts) > 0)
83
+		if (count($exclude_posts) > 0)
84 84
 		{
85 85
 			$exclude_clause .= " && `ptlink`.`post_id` NOT IN ('";
86 86
 			$exclude_clause .= implode("', '", $exclude_posts);
Please login to merge, or discard this patch.
controller/AJAXController.class.inc.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@
 block discarded – undo
28 28
 
29 29
 	protected function set_response($message, $type = 'internal')
30 30
 	{
31
-		switch($type)
31
+		switch ($type)
32 32
 		{
33 33
 			case 'internal' :
34 34
 				$this->response['internal'] = $message;
Please login to merge, or discard this patch.