GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Passed
Branch master (3eac19)
by Gabriel
05:37 queued 18s
created
src/auth/Auths.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -3,10 +3,10 @@
 block discarded – undo
3 3
 class Nip_Auths extends Records
4 4
 {
5 5
 
6
-	/**
7
-	 * @return Nip_Auth
8
-	 */
9
-	public function getCurrent()
6
+    /**
7
+     * @return Nip_Auth
8
+     */
9
+    public function getCurrent()
10 10
     {
11 11
         $model = $this->getModel();
12 12
         if ($_SESSION[$model]) {
Please login to merge, or discard this patch.
src/console/index.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -178,7 +178,7 @@
 block discarded – undo
178 178
                 break;
179 179
         }
180 180
     ?>
181
-    <div id="console-plugin-container" <?php echo $style ? ' style="'.$style.'"' : ''; ?>>
181
+    <div id="console-plugin-container" <?php echo $style ? ' style="' . $style . '"' : ''; ?>>
182 182
         <script type="text/javascript">
183 183
             PHPConsole.Utility.resize('<?php echo $size; ?>');
184 184
         </script>
Please login to merge, or discard this patch.
src/Records/Collections/Associated.php 1 patch
Indentation   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -4,8 +4,8 @@  discard block
 block discarded – undo
4 4
 {
5 5
 
6 6
 
7
-	public function populate()
8
-	{
7
+    public function populate()
8
+    {
9 9
         if (!$this->_populated && !count($this->_items)) {
10 10
             $this->_items = array();
11 11
             $query = $this->getQuery();
@@ -16,32 +16,32 @@  discard block
 block discarded – undo
16 16
             $this->_populated = true;
17 17
         }
18 18
         return $this;
19
-	}
19
+    }
20 20
 
21
-	public function remove($record)
22
-	{
23
-		$pk = $this->getWith()->getPrimaryKey();
24
-		unset($this[$record->$pk]);
25
-		return $this;
26
-	}
21
+    public function remove($record)
22
+    {
23
+        $pk = $this->getWith()->getPrimaryKey();
24
+        unset($this[$record->$pk]);
25
+        return $this;
26
+    }
27 27
 
28
-	public function exists($index)
29
-	{
28
+    public function exists($index)
29
+    {
30 30
         if (is_object($index)) {
31
-    		$pk = $this->getWith()->getPrimaryKey();
31
+            $pk = $this->getWith()->getPrimaryKey();
32 32
             $index = $index->$pk;
33 33
         }
34
-		return parent::exists($index);
35
-	}
34
+        return parent::exists($index);
35
+    }
36 36
 
37
-	public function get($index)
38
-	{
37
+    public function get($index)
38
+    {
39 39
         if (is_object($index)) {
40
-    		$pk = $this->getWith()->getPrimaryKey();
40
+            $pk = $this->getWith()->getPrimaryKey();
41 41
             $index = $index->$pk;
42 42
         }
43 43
 
44 44
         return $this[$index];
45
-	}
45
+    }
46 46
 
47 47
 }
48 48
\ No newline at end of file
Please login to merge, or discard this patch.
src/Records/Navigator/Paginator.php 1 patch
Indentation   +69 added lines, -69 removed lines patch added patch discarded remove patch
@@ -3,77 +3,77 @@
 block discarded – undo
3 3
 class Nip_Record_Paginator
4 4
 {
5 5
 
6
-	protected $_query = null;
7
-	protected $_page = 1;
8
-	protected $_itemsPerPage = 20;
9
-	protected $_count;
10
-	protected $_pages;
6
+    protected $_query = null;
7
+    protected $_page = 1;
8
+    protected $_itemsPerPage = 20;
9
+    protected $_count;
10
+    protected $_pages;
11 11
 
12
-	public function paginate($query)
13
-	{
14
-		$query->options("sql_calc_found_rows");
15
-		$query->limit($this->getLimitStart(), $this->getItemsPerPage());
12
+    public function paginate($query)
13
+    {
14
+        $query->options("sql_calc_found_rows");
15
+        $query->limit($this->getLimitStart(), $this->getItemsPerPage());
16 16
 
17 17
         $this->_query = $query;
18 18
         
19
-		return $query;
20
-	}
21
-
22
-	public function count()
23
-	{
24
-		$query = $this->_query->getManager()->newQuery();
25
-		$query->cols("FOUND_ROWS()");
26
-
27
-		$result = $query->execute()->fetchResult();
28
-
29
-		$this->_count = intval(reset($result));                
30
-		$this->_pages = intval($this->_count / $this->_itemsPerPage);
31
-
32
-		if ($this->_count % $this->_itemsPerPage != 0) {
33
-			$this->_pages++;
34
-		}
35
-
36
-		if ($this->_pages == 0) {
37
-			$this->_pages = 1;
38
-		}
39
-	}
40
-
41
-	public function setPage($page = false)
42
-	{
43
-		if ($page) {
44
-			$this->_page = $page;
45
-		}
46
-		return $this;
47
-	}
48
-
49
-	public function getPage()
50
-	{
51
-		return $this->_page;
52
-	}
53
-
54
-	public function getPages()
55
-	{
56
-		return $this->_pages;
57
-	}
58
-
59
-	public function setItemsPerPage($items)
60
-	{
61
-		$this->_itemsPerPage = $items;
62
-		return $this;
63
-	}
64
-
65
-	public function getItemsPerPage()
66
-	{
67
-		return $this->_itemsPerPage;
68
-	}
69
-
70
-	public function getLimitStart()
71
-	{
72
-		return ($this->getPage() - 1) * $this->getItemsPerPage();
73
-	}
74
-
75
-	public function getCount()
76
-	{
77
-		return $this->_count;
78
-	}
19
+        return $query;
20
+    }
21
+
22
+    public function count()
23
+    {
24
+        $query = $this->_query->getManager()->newQuery();
25
+        $query->cols("FOUND_ROWS()");
26
+
27
+        $result = $query->execute()->fetchResult();
28
+
29
+        $this->_count = intval(reset($result));                
30
+        $this->_pages = intval($this->_count / $this->_itemsPerPage);
31
+
32
+        if ($this->_count % $this->_itemsPerPage != 0) {
33
+            $this->_pages++;
34
+        }
35
+
36
+        if ($this->_pages == 0) {
37
+            $this->_pages = 1;
38
+        }
39
+    }
40
+
41
+    public function setPage($page = false)
42
+    {
43
+        if ($page) {
44
+            $this->_page = $page;
45
+        }
46
+        return $this;
47
+    }
48
+
49
+    public function getPage()
50
+    {
51
+        return $this->_page;
52
+    }
53
+
54
+    public function getPages()
55
+    {
56
+        return $this->_pages;
57
+    }
58
+
59
+    public function setItemsPerPage($items)
60
+    {
61
+        $this->_itemsPerPage = $items;
62
+        return $this;
63
+    }
64
+
65
+    public function getItemsPerPage()
66
+    {
67
+        return $this->_itemsPerPage;
68
+    }
69
+
70
+    public function getLimitStart()
71
+    {
72
+        return ($this->getPage() - 1) * $this->getItemsPerPage();
73
+    }
74
+
75
+    public function getCount()
76
+    {
77
+        return $this->_count;
78
+    }
79 79
 }
Please login to merge, or discard this patch.
src/Records/Navigator/Sorter.php 1 patch
Indentation   +53 added lines, -53 removed lines patch added patch discarded remove patch
@@ -3,67 +3,67 @@
 block discarded – undo
3 3
 class Nip_Record_Sorter
4 4
 {
5 5
 	
6
-	protected $_query;
7
-	protected $_field;
8
-	protected $_type = "asc";
6
+    protected $_query;
7
+    protected $_field;
8
+    protected $_type = "asc";
9 9
 
10
-	public function  __construct($field = false, $type = false)
11
-	{
12
-		$this->_field = $field;
10
+    public function  __construct($field = false, $type = false)
11
+    {
12
+        $this->_field = $field;
13 13
 
14
-		if ($type) {
15
-			$this->_type = $type;
16
-		}
17
-	}
14
+        if ($type) {
15
+            $this->_type = $type;
16
+        }
17
+    }
18 18
 
19
-	public function sort($query, $request = array())
20
-	{
21
-		$this->setQuery($query);
22
-		$this->setParams($request);
19
+    public function sort($query, $request = array())
20
+    {
21
+        $this->setQuery($query);
22
+        $this->setParams($request);
23 23
 
24
-		if ($this->getField()) {
25
-			$query->order(array($this->getField(), $this->getType()));
26
-		}
27
-		return $query;
28
-	}
24
+        if ($this->getField()) {
25
+            $query->order(array($this->getField(), $this->getType()));
26
+        }
27
+        return $query;
28
+    }
29 29
 
30
-	public function setParams($request = array()) 
31
-	{
32
-		if ($request['order'] && preg_match("/[a-z0-9_-]/i", $request['order'])) {
33
-			$this->_field = $request['order'];
34
-			if (in_array($request['order_type'], array("asc", "desc"))) {
35
-				$this->_type = $request['order_type'];
36
-			}
37
-		}
38
-		return $this;
39
-	}
30
+    public function setParams($request = array()) 
31
+    {
32
+        if ($request['order'] && preg_match("/[a-z0-9_-]/i", $request['order'])) {
33
+            $this->_field = $request['order'];
34
+            if (in_array($request['order_type'], array("asc", "desc"))) {
35
+                $this->_type = $request['order_type'];
36
+            }
37
+        }
38
+        return $this;
39
+    }
40 40
 
41
-	/**
42
-	 * @param Nip_DB_Query_Select $query
43
-	 * @return Nip_Record_Sorter
44
-	 */
45
-	public function setQuery($query)
46
-	{
47
-		$this->_query = $query;
48
-		return $this;
49
-	}
41
+    /**
42
+     * @param Nip_DB_Query_Select $query
43
+     * @return Nip_Record_Sorter
44
+     */
45
+    public function setQuery($query)
46
+    {
47
+        $this->_query = $query;
48
+        return $this;
49
+    }
50 50
 
51
-	/**
52
-	 * @return Nip_DB_Query_Select
53
-	 */
54
-	public function getQuery()
55
-	{
56
-		return $this->_query;
57
-	}
51
+    /**
52
+     * @return Nip_DB_Query_Select
53
+     */
54
+    public function getQuery()
55
+    {
56
+        return $this->_query;
57
+    }
58 58
 
59
-	public function getField()
60
-	{
61
-		return $this->_field;
62
-	}
59
+    public function getField()
60
+    {
61
+        return $this->_field;
62
+    }
63 63
 
64
-	public function getType()
65
-	{
66
-		return $this->_type;
67
-	}
64
+    public function getType()
65
+    {
66
+        return $this->_type;
67
+    }
68 68
 
69 69
 }
Please login to merge, or discard this patch.
src/functions/input.php 2 patches
Indentation   +26 added lines, -26 removed lines patch added patch discarded remove patch
@@ -2,42 +2,42 @@
 block discarded – undo
2 2
 
3 3
 function fix_input_quotes()
4 4
 {
5
-	if (get_magic_quotes_gpc ()) {
6
-		array_stripslashes($_GET);
7
-		array_stripslashes($_POST);
8
-		array_stripslashes($_COOKIE);
9
-	}
5
+    if (get_magic_quotes_gpc ()) {
6
+        array_stripslashes($_GET);
7
+        array_stripslashes($_POST);
8
+        array_stripslashes($_COOKIE);
9
+    }
10 10
 }
11 11
 
12 12
 function array_stripslashes(&$array)
13 13
 {
14
-	if (!is_array($array)) {
15
-		return;
16
-	}
17
-	foreach ($array as $k => $v) {
18
-		if (is_array($array[$k])) {
19
-			array_stripslashes($array[$k]);
20
-		} else {
21
-			$array[$k] = stripslashes($array[$k]);
22
-		}
23
-	}
24
-	return $array;
14
+    if (!is_array($array)) {
15
+        return;
16
+    }
17
+    foreach ($array as $k => $v) {
18
+        if (is_array($array[$k])) {
19
+            array_stripslashes($array[$k]);
20
+        } else {
21
+            $array[$k] = stripslashes($array[$k]);
22
+        }
23
+    }
24
+    return $array;
25 25
 }
26 26
 
27 27
 function clean($input)
28 28
 {
29
-	return trim(stripslashes(htmlentities($input, ENT_QUOTES, 'UTF-8')));
29
+    return trim(stripslashes(htmlentities($input, ENT_QUOTES, 'UTF-8')));
30 30
 }
31 31
 
32 32
 function strToASCII( $str )
33 33
 {
34
-	$trans = array(
35
-	'Š'=>'S', 'Ș'=>'S', 'š'=>'s', 'ș'=>'s', 'Ð'=>'Dj','Ž'=>'Z', 'ž'=>'z', 'À'=>'A', 'Á'=>'A', 'Â'=>'A', 'Ã'=>'A', 'Ä'=>'A', 'Ă' => 'A', 
36
-	'Å'=>'A', 'Æ'=>'A', 'Ç'=>'C', 'È'=>'E', 'É'=>'E', 'Ê'=>'E', 'Ë'=>'E', 'Ì'=>'I', 'Í'=>'I', 'Î'=>'I',
37
-	'Ï'=>'I', 'Ñ'=>'N', 'Ò'=>'O', 'Ó'=>'O', 'Ô'=>'O', 'Õ'=>'O', 'Ö'=>'O', 'Ø'=>'O', 'Ù'=>'U', 'Ú'=>'U', 'Ț' => 'T',
38
-	'Û'=>'U', 'Ü'=>'U', 'Ý'=>'Y', 'Þ'=>'B', 'ß'=>'Ss','à'=>'a', 'á'=>'a', 'â'=>'a', 'ã'=>'a', 'ä'=>'a', 'ă' => 'a', 
39
-	'å'=>'a', 'æ'=>'a', 'ç'=>'c', 'è'=>'e', 'é'=>'e', 'ê'=>'e', 'ë'=>'e', 'ì'=>'i', 'í'=>'i', 'î'=>'i',
40
-	'ï'=>'i', 'ð'=>'o', 'ñ'=>'n', 'ò'=>'o', 'ó'=>'o', 'ô'=>'o', 'õ'=>'o', 'ö'=>'o', 'ø'=>'o', 'ù'=>'u', 
41
-	'ú'=>'u', 'û'=>'u', 'ý'=>'y', 'ý'=>'y', 'þ'=>'b', 'ÿ'=>'y', 'ƒ'=>'f', 'ț' => 't');
42
-	return strtr($str, $trans);	
34
+    $trans = array(
35
+    'Š'=>'S', 'Ș'=>'S', 'š'=>'s', 'ș'=>'s', 'Ð'=>'Dj','Ž'=>'Z', 'ž'=>'z', 'À'=>'A', 'Á'=>'A', 'Â'=>'A', 'Ã'=>'A', 'Ä'=>'A', 'Ă' => 'A', 
36
+    'Å'=>'A', 'Æ'=>'A', 'Ç'=>'C', 'È'=>'E', 'É'=>'E', 'Ê'=>'E', 'Ë'=>'E', 'Ì'=>'I', 'Í'=>'I', 'Î'=>'I',
37
+    'Ï'=>'I', 'Ñ'=>'N', 'Ò'=>'O', 'Ó'=>'O', 'Ô'=>'O', 'Õ'=>'O', 'Ö'=>'O', 'Ø'=>'O', 'Ù'=>'U', 'Ú'=>'U', 'Ț' => 'T',
38
+    'Û'=>'U', 'Ü'=>'U', 'Ý'=>'Y', 'Þ'=>'B', 'ß'=>'Ss','à'=>'a', 'á'=>'a', 'â'=>'a', 'ã'=>'a', 'ä'=>'a', 'ă' => 'a', 
39
+    'å'=>'a', 'æ'=>'a', 'ç'=>'c', 'è'=>'e', 'é'=>'e', 'ê'=>'e', 'ë'=>'e', 'ì'=>'i', 'í'=>'i', 'î'=>'i',
40
+    'ï'=>'i', 'ð'=>'o', 'ñ'=>'n', 'ò'=>'o', 'ó'=>'o', 'ô'=>'o', 'õ'=>'o', 'ö'=>'o', 'ø'=>'o', 'ù'=>'u', 
41
+    'ú'=>'u', 'û'=>'u', 'ý'=>'y', 'ý'=>'y', 'þ'=>'b', 'ÿ'=>'y', 'ƒ'=>'f', 'ț' => 't');
42
+    return strtr($str, $trans);	
43 43
 }
44 44
\ No newline at end of file
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -2,7 +2,7 @@  discard block
 block discarded – undo
2 2
 
3 3
 function fix_input_quotes()
4 4
 {
5
-	if (get_magic_quotes_gpc ()) {
5
+	if (get_magic_quotes_gpc()) {
6 6
 		array_stripslashes($_GET);
7 7
 		array_stripslashes($_POST);
8 8
 		array_stripslashes($_COOKIE);
@@ -29,13 +29,13 @@  discard block
 block discarded – undo
29 29
 	return trim(stripslashes(htmlentities($input, ENT_QUOTES, 'UTF-8')));
30 30
 }
31 31
 
32
-function strToASCII( $str )
32
+function strToASCII($str)
33 33
 {
34 34
 	$trans = array(
35
-	'Š'=>'S', 'Ș'=>'S', 'š'=>'s', 'ș'=>'s', 'Ð'=>'Dj','Ž'=>'Z', 'ž'=>'z', 'À'=>'A', 'Á'=>'A', 'Â'=>'A', 'Ã'=>'A', 'Ä'=>'A', 'Ă' => 'A', 
35
+	'Š'=>'S', 'Ș'=>'S', 'š'=>'s', 'ș'=>'s', 'Ð'=>'Dj', 'Ž'=>'Z', 'ž'=>'z', 'À'=>'A', 'Á'=>'A', 'Â'=>'A', 'Ã'=>'A', 'Ä'=>'A', 'Ă' => 'A', 
36 36
 	'Å'=>'A', 'Æ'=>'A', 'Ç'=>'C', 'È'=>'E', 'É'=>'E', 'Ê'=>'E', 'Ë'=>'E', 'Ì'=>'I', 'Í'=>'I', 'Î'=>'I',
37 37
 	'Ï'=>'I', 'Ñ'=>'N', 'Ò'=>'O', 'Ó'=>'O', 'Ô'=>'O', 'Õ'=>'O', 'Ö'=>'O', 'Ø'=>'O', 'Ù'=>'U', 'Ú'=>'U', 'Ț' => 'T',
38
-	'Û'=>'U', 'Ü'=>'U', 'Ý'=>'Y', 'Þ'=>'B', 'ß'=>'Ss','à'=>'a', 'á'=>'a', 'â'=>'a', 'ã'=>'a', 'ä'=>'a', 'ă' => 'a', 
38
+	'Û'=>'U', 'Ü'=>'U', 'Ý'=>'Y', 'Þ'=>'B', 'ß'=>'Ss', 'à'=>'a', 'á'=>'a', 'â'=>'a', 'ã'=>'a', 'ä'=>'a', 'ă' => 'a', 
39 39
 	'å'=>'a', 'æ'=>'a', 'ç'=>'c', 'è'=>'e', 'é'=>'e', 'ê'=>'e', 'ë'=>'e', 'ì'=>'i', 'í'=>'i', 'î'=>'i',
40 40
 	'ï'=>'i', 'ð'=>'o', 'ñ'=>'n', 'ò'=>'o', 'ó'=>'o', 'ô'=>'o', 'õ'=>'o', 'ö'=>'o', 'ø'=>'o', 'ù'=>'u', 
41 41
 	'ú'=>'u', 'û'=>'u', 'ý'=>'y', 'ý'=>'y', 'þ'=>'b', 'ÿ'=>'y', 'ƒ'=>'f', 'ț' => 't');
Please login to merge, or discard this patch.
src/functions/flash.php 1 patch
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -2,25 +2,25 @@
 block discarded – undo
2 2
 
3 3
 function flash_get($name)
4 4
 {
5
-	return Nip_Flash::instance()->get($name);
5
+    return Nip_Flash::instance()->get($name);
6 6
 }
7 7
 
8 8
 function flash_add($name, $value)
9 9
 {
10
-	Nip_Flash::instance()->add($name, $value);
10
+    Nip_Flash::instance()->add($name, $value);
11 11
 }
12 12
 
13 13
 function flash_success($name, $message)
14 14
 {
15
-	Nip_Flash_Messages::instance()->add($name, 'success', $message);
15
+    Nip_Flash_Messages::instance()->add($name, 'success', $message);
16 16
 }
17 17
 
18 18
 function flash_error($name, $message)
19 19
 {
20
-	Nip_Flash_Messages::instance()->add($name, 'error', $message);
20
+    Nip_Flash_Messages::instance()->add($name, 'error', $message);
21 21
 }
22 22
 
23 23
 function flash_info($name, $message)
24 24
 {
25
-	Nip_Flash_Messages::instance()->add($name, 'info', $message);
25
+    Nip_Flash_Messages::instance()->add($name, 'info', $message);
26 26
 }
27 27
\ No newline at end of file
Please login to merge, or discard this patch.
src/Paginator.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
     public function getTotalPages()
30 30
     {
31
-        $this->totalPages = (int)($this->count / $this->itemsPerPage);
31
+        $this->totalPages = (int) ($this->count / $this->itemsPerPage);
32 32
         if ($this->count % $this->itemsPerPage != 0) {
33 33
             $this->totalPages++;
34 34
         }
Please login to merge, or discard this patch.
src/Registry.php 1 patch
Indentation   +50 added lines, -50 removed lines patch added patch discarded remove patch
@@ -3,55 +3,55 @@
 block discarded – undo
3 3
 class Nip_Registry
4 4
 {
5 5
 
6
-	protected $_registry;
7
-
8
-	/**
9
-	 * @return boolean
10
-	 * @param string $id
11
-	 */
12
-	public function exists($id)
13
-	{
14
-		return isset($this->_registry[$id]);
15
-	}
16
-
17
-	/**
18
-	 * @param string $id
19
-	 */
20
-	public function delete($id)
21
-	{
22
-		unset($this->_registry[$id]);
23
-	}
24
-
25
-	/**
26
-	 * @return mixed
27
-	 * @param string $id
28
-	 */
29
-	public function get($id)
30
-	{
31
-		return $this->_registry[$id];
32
-	}
33
-
34
-	/**
35
-	 * @param string $id
36
-	 * @param mixed $value
37
-	 */
38
-	public function set($id, $value)
39
-	{
40
-		$this->_registry[$id] = $value;
41
-	}
42
-
43
-	/**
44
-	 * Singleton
45
-	 *
46
-	 * @return Nip_Registry
47
-	 */
48
-	static public function instance()
49
-	{
50
-		static $instance;
51
-		if (!($instance instanceof self)) {
52
-			$instance = new self();
53
-		}
54
-		return $instance;
55
-	}
6
+    protected $_registry;
7
+
8
+    /**
9
+     * @return boolean
10
+     * @param string $id
11
+     */
12
+    public function exists($id)
13
+    {
14
+        return isset($this->_registry[$id]);
15
+    }
16
+
17
+    /**
18
+     * @param string $id
19
+     */
20
+    public function delete($id)
21
+    {
22
+        unset($this->_registry[$id]);
23
+    }
24
+
25
+    /**
26
+     * @return mixed
27
+     * @param string $id
28
+     */
29
+    public function get($id)
30
+    {
31
+        return $this->_registry[$id];
32
+    }
33
+
34
+    /**
35
+     * @param string $id
36
+     * @param mixed $value
37
+     */
38
+    public function set($id, $value)
39
+    {
40
+        $this->_registry[$id] = $value;
41
+    }
42
+
43
+    /**
44
+     * Singleton
45
+     *
46
+     * @return Nip_Registry
47
+     */
48
+    static public function instance()
49
+    {
50
+        static $instance;
51
+        if (!($instance instanceof self)) {
52
+            $instance = new self();
53
+        }
54
+        return $instance;
55
+    }
56 56
 
57 57
 }
58 58
\ No newline at end of file
Please login to merge, or discard this patch.