Completed
Push — master ( bf05f4...1e9202 )
by Jacob
04:21
created
controller/blog/SearchController.class.inc.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
 	{
45 45
 		parent::set_head_data();
46 46
 		
47
-		if($this->page == 1)
47
+		if ($this->page == 1)
48 48
 		{
49 49
 			$this->set_title(sprintf(self::$TITLE_MAIN, ucwords($this->query)));
50 50
 			$this->set_description(sprintf(self::$DESCRIPTION_MAIN, ucwords($this->query)));
@@ -62,10 +62,10 @@  discard block
 block discarded – undo
62 62
 
63 63
 	protected function get_introduction()
64 64
 	{
65
-		if($this->total_pages > 1)
65
+		if ($this->total_pages > 1)
66 66
 			return array(
67 67
 				'title' => "Posts from search '{$this->query}', page {$this->page} of {$this->total_pages}.");
68
-		else if($this->total_pages == 1)
68
+		else if ($this->total_pages == 1)
69 69
 			return array(
70 70
 				'title' => "Posts from search '{$this->query}'.");
71 71
 		else
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
 	protected function get_page_number()
77 77
 	{
78 78
 		$page = URLDecode::getPiece(3);
79
-		if(isset($page) && is_numeric($page))
79
+		if (isset($page) && is_numeric($page))
80 80
 			return $page;
81 81
 		return 1;
82 82
 	}
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
 	private $search_result;
85 85
 	private function get_search_result()
86 86
 	{
87
-		if(!isset($this->search_result))
87
+		if (!isset($this->search_result))
88 88
 		{
89 89
         global $container;
90 90
         $repository = new Jacobemerick\Web\Domain\Blog\Post\MysqlPostRepository($container['db_connection_locator']);
@@ -114,24 +114,24 @@  discard block
 block discarded – undo
114 114
 
115 115
 	protected function get_list_next_link()
116 116
 	{
117
-		if($this->page == 1)
117
+		if ($this->page == 1)
118 118
 			return;
119
-		if($this->page == 2)
119
+		if ($this->page == 2)
120 120
 			return Content::instance('URLSafe', "/search/{$this->query}/")->activate();
121
-		return Content::instance('URLSafe', "/search/{$this->query}/" . ($this->page - 1) . '/')->activate();
121
+		return Content::instance('URLSafe', "/search/{$this->query}/".($this->page - 1).'/')->activate();
122 122
 	}
123 123
 
124 124
 	protected function get_list_prev_link()
125 125
 	{
126
-		if(($this->page * self::$POSTS_PER_PAGE) >= $this->get_total_post_count())
126
+		if (($this->page * self::$POSTS_PER_PAGE) >= $this->get_total_post_count())
127 127
 			return;
128
-		return Content::instance('URLSafe', "/search/{$this->query}/" . ($this->page + 1) . '/')->activate();
128
+		return Content::instance('URLSafe', "/search/{$this->query}/".($this->page + 1).'/')->activate();
129 129
 	}
130 130
 
131 131
 	private $total_post_count;
132 132
 	protected function get_total_post_count()
133 133
 	{
134
-		if(!isset($this->total_post_count))
134
+		if (!isset($this->total_post_count))
135 135
 			$this->total_post_count = count($this->get_search_result());
136 136
 		return $this->total_post_count;
137 137
 	}
Please login to merge, or discard this patch.
controller/portfolio/ResumeController.class.inc.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@
 block discarded – undo
25 25
     {
26 26
         $this->set_body('body_view', 'Resume');
27 27
 
28
-        $resumePath = Loader::getRootURL('portfolio') . "/jsonresume/{$this->resume}";
28
+        $resumePath = Loader::getRootURL('portfolio')."/jsonresume/{$this->resume}";
29 29
         $resume = file_get_contents($resumePath);
30 30
         $resume = json_decode($resume, true);
31 31
         $this->set_body('body_data', $resume);
Please login to merge, or discard this patch.
controller/portfolio/ContactController.class.inc.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -89,7 +89,7 @@
 block discarded – undo
89 89
 
90 90
         return [
91 91
             'success' =>
92
-                "Thank you for your message, {$_POST['name']}! " .
92
+                "Thank you for your message, {$_POST['name']}! ".
93 93
                 "I'll get back to you as soon as possible."
94 94
         ];
95 95
     }
Please login to merge, or discard this patch.
controller/portfolio/DefaultPageController.class.inc.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -33,15 +33,15 @@  discard block
 block discarded – undo
33 33
             ],
34 34
             [
35 35
                 'name' => 'Projects',
36
-                'link' => Loader::getRootURL() . 'projects/',
36
+                'link' => Loader::getRootURL().'projects/',
37 37
             ],
38 38
             [
39 39
                 'name' => 'Résumé',
40
-                'link' => Loader::getRootURL() . 'resume/',
40
+                'link' => Loader::getRootURL().'resume/',
41 41
             ],
42 42
             [
43 43
                 'name' => 'Contact',
44
-                'link' => Loader::getRootURL() . 'contact/',
44
+                'link' => Loader::getRootURL().'contact/',
45 45
             ],
46 46
         ];
47 47
 
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
             $active_page = ucfirst(URLDecode::getPiece(1));
52 52
         }
53 53
 
54
-        return array_map(function ($row) use ($active_page) {
54
+        return array_map(function($row) use ($active_page) {
55 55
             $row = (object) $row;
56 56
             $row->active = ($row->name == $active_page);
57 57
             return $row;
Please login to merge, or discard this patch.
controller/waterfalls/ContactController.class.inc.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -35,16 +35,16 @@  discard block
 block discarded – undo
35 35
 
36 36
 	private function process_form()
37 37
 	{
38
-		if(!Request::hasPost() || Request::getPost('submit') != 'Send Message!')
38
+		if (!Request::hasPost() || Request::getPost('submit') != 'Send Message!')
39 39
 			return (object) array('display' => 'normal');
40 40
 		
41 41
 		Loader::load('utility', 'Validate');
42 42
 		$error_result = array();
43
-		if(!Validate::checkRequest('post', 'name', 'string'))
43
+		if (!Validate::checkRequest('post', 'name', 'string'))
44 44
 			$error_result['name'] = 'please enter your name';
45
-		if(!Validate::checkRequest('post', 'email', 'string'))
45
+		if (!Validate::checkRequest('post', 'email', 'string'))
46 46
 			$error_result['email'] = 'please enter a valid email';
47
-		if(!Validate::checkRequest('post', 'message', 'string'))
47
+		if (!Validate::checkRequest('post', 'message', 'string'))
48 48
 			$error_result['message'] = 'please write a message';
49 49
 		
50 50
 		$values = (object) array(
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
 			'email' => Request::getPost('email'),
53 53
 			'message' => Request::getPost('message'));
54 54
 		
55
-		if(count($error_result) > 0)
55
+		if (count($error_result) > 0)
56 56
 		{
57 57
 			return (object) array(
58 58
 				'display' => 'error',
@@ -65,8 +65,8 @@  discard block
 block discarded – undo
65 65
       ->addTo($container['config']->admin_email)
66 66
       ->setSubject('Home Page Contact')
67 67
       ->setPlainMessage(
68
-        "Name: {$values->name}\n" .
69
-        "Email: {$values->email}\n" .
68
+        "Name: {$values->name}\n".
69
+        "Email: {$values->email}\n".
70 70
         "Message: {$values->message}"
71 71
       )
72 72
       ->send();		
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 = '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.
public/home/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.
public/blog/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.
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 = '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.