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/acl/resource/Resources.php 2 patches
Doc Comments   -1 removed lines patch added patch discarded remove patch
@@ -31,7 +31,6 @@
 block discarded – undo
31 31
 	/**
32 32
 	 * Recursively builds parents path to passed resource
33 33
 	 *
34
-	 * @param ACL_Resource|bool $page
35 34
 	 * @param array $return
36 35
 	 * @return array
37 36
 	 */
Please login to merge, or discard this patch.
Indentation   +56 added lines, -56 removed lines patch added patch discarded remove patch
@@ -3,61 +3,61 @@
 block discarded – undo
3 3
 class ACL_Resources extends Records
4 4
 {
5 5
 
6
-	protected $_sortOn = "name";
7
-
8
-	public function findAll()
9
-	{
10
-		if (!$this->getRegistry()->exists("all")) {
11
-			$resources = parent::findAll();
12
-			$this->buildTree($resources);
13
-		}
14
-
15
-		return $this->getRegistry()->get('all');
16
-	}
17
-
18
-	public function buildTree($resources = array())
19
-	{
20
-		if ($resources) {
21
-			/* @var $resource ACL_Resource */
22
-			foreach ($resources as $resource) {
23
-				if ($resource->hasParent()) {
24
-					$parent = $resources[$resource->id_parent];
25
-					$parent->addChild($resource);
26
-				}
27
-			}
28
-		}
29
-	}
30
-
31
-	/**
32
-	 * Recursively builds parents path to passed resource
33
-	 *
34
-	 * @param ACL_Resource|bool $page
35
-	 * @param array $return
36
-	 * @return array
37
-	 */
38
-	public function buildPath($resource, &$return = array())
39
-	{
40
-		if (!($resource instanceof ACL_Resource)) {
41
-			return array_reverse($return);
42
-		}
43
-
44
-		$return[] = $resource;
45
-
46
-		return $this->buildPath($resource->getParent(), $return);
47
-	}
48
-
49
-	/**
50
-	 * Singleton
51
-	 *
52
-	 * @return ACL_Resources
53
-	 */
54
-	public static function instance()
55
-	{
56
-		static $instance;
57
-		if (!($instance instanceof self)) {
58
-			$instance = new self();
59
-		}
60
-		return $instance;
61
-	}
6
+    protected $_sortOn = "name";
7
+
8
+    public function findAll()
9
+    {
10
+        if (!$this->getRegistry()->exists("all")) {
11
+            $resources = parent::findAll();
12
+            $this->buildTree($resources);
13
+        }
14
+
15
+        return $this->getRegistry()->get('all');
16
+    }
17
+
18
+    public function buildTree($resources = array())
19
+    {
20
+        if ($resources) {
21
+            /* @var $resource ACL_Resource */
22
+            foreach ($resources as $resource) {
23
+                if ($resource->hasParent()) {
24
+                    $parent = $resources[$resource->id_parent];
25
+                    $parent->addChild($resource);
26
+                }
27
+            }
28
+        }
29
+    }
30
+
31
+    /**
32
+     * Recursively builds parents path to passed resource
33
+     *
34
+     * @param ACL_Resource|bool $page
35
+     * @param array $return
36
+     * @return array
37
+     */
38
+    public function buildPath($resource, &$return = array())
39
+    {
40
+        if (!($resource instanceof ACL_Resource)) {
41
+            return array_reverse($return);
42
+        }
43
+
44
+        $return[] = $resource;
45
+
46
+        return $this->buildPath($resource->getParent(), $return);
47
+    }
48
+
49
+    /**
50
+     * Singleton
51
+     *
52
+     * @return ACL_Resources
53
+     */
54
+    public static function instance()
55
+    {
56
+        static $instance;
57
+        if (!($instance instanceof self)) {
58
+            $instance = new self();
59
+        }
60
+        return $instance;
61
+    }
62 62
 
63 63
 }
64 64
\ No newline at end of file
Please login to merge, or discard this patch.
src/auth/Auth.php 2 patches
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -37,6 +37,9 @@
 block discarded – undo
37 37
 		return $this;
38 38
 	}
39 39
 
40
+	/**
41
+	 * @param boolean $value
42
+	 */
40 43
 	public function authenticated($value = null)
41 44
 	{
42 45
 		if (!is_null($value)) {
Please login to merge, or discard this patch.
Indentation   +77 added lines, -77 removed lines patch added patch discarded remove patch
@@ -3,86 +3,86 @@
 block discarded – undo
3 3
 class Nip_Auth extends Record
4 4
 {
5 5
 
6
-	protected $_authenticated = false;
6
+    protected $_authenticated = false;
7 7
 
8
-	public function authenticate($request = array())
9
-	{
10
-		if ($request) {
11
-			$this->email = clean($request['email']);
12
-			$this->password = clean($request['password']);
13
-		}
8
+    public function authenticate($request = array())
9
+    {
10
+        if ($request) {
11
+            $this->email = clean($request['email']);
12
+            $this->password = clean($request['password']);
13
+        }
14 14
 
15
-		$query = $this->_getAuthenticateQuery();
16
-		$user = $this->getManager()->findOneByQuery($query);
15
+        $query = $this->_getAuthenticateQuery();
16
+        $user = $this->getManager()->findOneByQuery($query);
17 17
 
18
-		if ($user) {
19
-			$this->writeData($user->toArray());
18
+        if ($user) {
19
+            $this->writeData($user->toArray());
20 20
 			
21
-			$this->id_session = session_id();
22
-			$this->last_login = date(DATE_DB);
23
-			$this->save();
24
-
25
-			$this->authenticated(true);
26
-
27
-			$_SESSION[$this->_getSessionVar()]['id'] = $this->id;
28
-		}
29
-
30
-		return $this->authenticated();
31
-	}
32
-
33
-	public function deauthenticate()
34
-	{
35
-		unset($_SESSION[$this->_getSessionVar()]);
36
-		$this->authenticated(false);
37
-		return $this;
38
-	}
39
-
40
-	public function authenticated($value = null)
41
-	{
42
-		if (!is_null($value)) {
43
-			$this->_authenticated = $value;
44
-		}
45
-		return $this->_authenticated;
46
-	}
47
-
48
-	public function updatePassword()
49
-	{
50
-		$this->password = Nip_Helper_Passwords::instance()->hash($this->new_password);
51
-		$this->save();
52
-		return $this;
53
-	}
54
-
55
-	public function recoverPassword()
56
-	{
57
-		$user = $this->getManager()->findOneByEmail($this->email);
58
-		$this->writeData($user->toArray());
59
-
60
-		$this->generatePassword()->updatePassword();
61
-		$this->sendRecoverPasswordMail();
62
-	}
63
-
64
-	public function generatePassword()
65
-	{
66
-		$this->new_password = Nip_Helper_Passwords::instance()->generate(8, false, true, true, false);
67
-		return $this;
68
-	}
69
-
70
-	/**
71
-	 * @return Nip_DB_Query_Select
72
-	 */
73
-	protected function _getAuthenticateQuery()
74
-	{
75
-		$query = $this->getManager()->newQuery();
76
-
77
-		$query->where("email = ?", $this->email);
78
-		$query->where("password = ?", Nip_Helper_Passwords::instance()->hash($this->password));
79
-
80
-		return $query;
81
-	}
82
-
83
-	protected function _getSessionVar()
84
-	{
85
-		return $this->getManager()->getModel();
86
-	}
21
+            $this->id_session = session_id();
22
+            $this->last_login = date(DATE_DB);
23
+            $this->save();
24
+
25
+            $this->authenticated(true);
26
+
27
+            $_SESSION[$this->_getSessionVar()]['id'] = $this->id;
28
+        }
29
+
30
+        return $this->authenticated();
31
+    }
32
+
33
+    public function deauthenticate()
34
+    {
35
+        unset($_SESSION[$this->_getSessionVar()]);
36
+        $this->authenticated(false);
37
+        return $this;
38
+    }
39
+
40
+    public function authenticated($value = null)
41
+    {
42
+        if (!is_null($value)) {
43
+            $this->_authenticated = $value;
44
+        }
45
+        return $this->_authenticated;
46
+    }
47
+
48
+    public function updatePassword()
49
+    {
50
+        $this->password = Nip_Helper_Passwords::instance()->hash($this->new_password);
51
+        $this->save();
52
+        return $this;
53
+    }
54
+
55
+    public function recoverPassword()
56
+    {
57
+        $user = $this->getManager()->findOneByEmail($this->email);
58
+        $this->writeData($user->toArray());
59
+
60
+        $this->generatePassword()->updatePassword();
61
+        $this->sendRecoverPasswordMail();
62
+    }
63
+
64
+    public function generatePassword()
65
+    {
66
+        $this->new_password = Nip_Helper_Passwords::instance()->generate(8, false, true, true, false);
67
+        return $this;
68
+    }
69
+
70
+    /**
71
+     * @return Nip_DB_Query_Select
72
+     */
73
+    protected function _getAuthenticateQuery()
74
+    {
75
+        $query = $this->getManager()->newQuery();
76
+
77
+        $query->where("email = ?", $this->email);
78
+        $query->where("password = ?", Nip_Helper_Passwords::instance()->hash($this->password));
79
+
80
+        return $query;
81
+    }
82
+
83
+    protected function _getSessionVar()
84
+    {
85
+        return $this->getManager()->getModel();
86
+    }
87 87
 
88 88
 }
89 89
\ No newline at end of file
Please login to merge, or discard this patch.
src/AutoLoader.php 2 patches
Doc Comments   +13 added lines, -1 removed lines patch added patch discarded remove patch
@@ -81,6 +81,9 @@  discard block
 block discarded – undo
81 81
         return false;
82 82
     }
83 83
 
84
+    /**
85
+     * @return string
86
+     */
84 87
     protected function getClassLocation($class, $retry = false)
85 88
     {
86 89
         if (in_array($class, array_keys($this->getMap()))) {
@@ -133,6 +136,9 @@  discard block
 block discarded – undo
133 136
         return $this->_map;
134 137
     }
135 138
 
139
+    /**
140
+     * @param string $filePath
141
+     */
136 142
     protected function readCacheFile($filePath)
137 143
     {
138 144
         if (file_exists($filePath)) {
@@ -153,11 +159,17 @@  discard block
 block discarded – undo
153 159
         return str_replace(DS, '-', $dir).'.php';
154 160
     }
155 161
 
162
+    /**
163
+     * @param boolean $retry
164
+     */
156 165
     public function setRetry($retry)
157 166
     {
158 167
         $this->_retry = $retry;
159 168
     }
160 169
 
170
+    /**
171
+     * @param boolean $value
172
+     */
161 173
     public function isFatal($value = null)
162 174
     {
163 175
         if (is_bool($value)) {
@@ -170,7 +182,7 @@  discard block
 block discarded – undo
170 182
     /**
171 183
      * Singleton
172 184
      *
173
-     * @return Nip_AutoLoader
185
+     * @return AutoLoader
174 186
      */
175 187
     static public function instance()
176 188
     {
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
     public function generateMapDir($dir)
112 112
     {
113 113
         $fileName = $this->getCacheName($dir);
114
-        $filePath = $this->_cachePath.$fileName;
114
+        $filePath = $this->_cachePath . $fileName;
115 115
         $this->_mapGenerator->dump($dir, $filePath);
116 116
     }
117 117
 
@@ -120,7 +120,7 @@  discard block
 block discarded – undo
120 120
         if (!$this->_map) {
121 121
             foreach ($this->_directories as $dir) {
122 122
                 $fileName = $this->getCacheName($dir);
123
-                $filePath = $this->_cachePath.$fileName;
123
+                $filePath = $this->_cachePath . $fileName;
124 124
 
125 125
                 if (!$this->readCacheFile($filePath)) {
126 126
                     \Nip_Profiler::instance()->start('autoloader [readCache]');
@@ -150,7 +150,7 @@  discard block
 block discarded – undo
150 150
         if (defined('ROOT_PATH')) {
151 151
             $dir = str_replace(ROOT_PATH, '', $dir);
152 152
         }
153
-        return str_replace(DS, '-', $dir).'.php';
153
+        return str_replace(DS, '-', $dir) . '.php';
154 154
     }
155 155
 
156 156
     public function setRetry($retry)
Please login to merge, or discard this patch.
src/Bootstrap.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -194,6 +194,9 @@
 block discarded – undo
194 194
         return $i18n;
195 195
     }
196 196
 
197
+    /**
198
+     * @param \Nip_I18n $translation
199
+     */
197 200
     public function initLanguages($translation)
198 201
     {
199 202
         return $translation;
Please login to merge, or discard this patch.
src/console/Console.php 1 patch
Doc Comments   +7 added lines, -1 removed lines patch added patch discarded remove patch
@@ -28,6 +28,9 @@  discard block
 block discarded – undo
28 28
         return $this->_plugins;
29 29
     }
30 30
 
31
+    /**
32
+     * @param string $key
33
+     */
31 34
     public function getPlugin($key)
32 35
     {
33 36
         return $this->_plugins[$key];
@@ -68,6 +71,9 @@  discard block
 block discarded – undo
68 71
         $_this->setEnabled(false);
69 72
     }
70 73
 
74
+    /**
75
+     * @param boolean $enabled
76
+     */
71 77
     public function setEnabled($enabled)
72 78
     {
73 79
         $this->_enabled = $enabled;
@@ -88,7 +94,7 @@  discard block
 block discarded – undo
88 94
     /**
89 95
      * Singleton
90 96
      *
91
-     * @return Console
97
+     * @return Nip_Console
92 98
      */
93 99
     public static function instance()
94 100
     {
Please login to merge, or discard this patch.
src/console/plugin/logger/Logger.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@
 block discarded – undo
13 13
     }
14 14
 
15 15
     /**
16
-     * @return Logger_Adapter
16
+     * @return Nip\Logger\Adapter\AdapterAbstract
17 17
      */
18 18
     public function getLogger()
19 19
     {
Please login to merge, or discard this patch.
src/Controller.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -159,6 +159,9 @@
 block discarded – undo
159 159
         return true;
160 160
     }
161 161
 
162
+    /**
163
+     * @param string[] $action
164
+     */
162 165
     protected function validAction($action)
163 166
     {
164 167
         return in_array($action, get_class_methods(get_class($this)));
Please login to merge, or discard this patch.
src/database/metadata/Cache.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -32,6 +32,9 @@
 block discarded – undo
32 32
         return parent::cachePath() . '/db-metadata/';
33 33
     }
34 34
 
35
+    /**
36
+     * @param Nip_Db_Metadata $metadata
37
+     */
35 38
     public function setMetadata($metadata) {
36 39
         $this->_metadata = $metadata;
37 40
         return $this;
Please login to merge, or discard this patch.
src/database/profiler/Query.php 3 patches
Doc Comments   +4 added lines patch added patch discarded remove patch
@@ -16,6 +16,10 @@
 block discarded – undo
16 16
 class Nip_DB_Profiler_Query extends Nip_Profile {
17 17
 	public $columns = array('time',	'type',	'memory', 'query', 'affectedRows', 'info');
18 18
 
19
+	/**
20
+	 * @param boolean $query
21
+	 * @param string $queryType
22
+	 */
19 23
 	public function __construct($query, $queryType) {
20 24
 		$this->query = $query;
21 25
 
Please login to merge, or discard this patch.
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -14,11 +14,11 @@
 block discarded – undo
14 14
  */
15 15
 
16 16
 class Nip_DB_Profiler_Query extends Nip_Profile {
17
-	public $columns = array('time',	'type',	'memory', 'query', 'affectedRows', 'info');
17
+    public $columns = array('time',	'type',	'memory', 'query', 'affectedRows', 'info');
18 18
 
19
-	public function __construct($query, $queryType) {
20
-		$this->query = $query;
19
+    public function __construct($query, $queryType) {
20
+        $this->query = $query;
21 21
 
22
-		parent::__construct($queryType);
23
-	}
22
+        parent::__construct($queryType);
23
+    }
24 24
 }
25 25
\ No newline at end of file
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@
 block discarded – undo
14 14
  */
15 15
 
16 16
 class Nip_DB_Profiler_Query extends Nip_Profile {
17
-	public $columns = array('time',	'type',	'memory', 'query', 'affectedRows', 'info');
17
+	public $columns = array('time', 'type', 'memory', 'query', 'affectedRows', 'info');
18 18
 
19 19
 	public function __construct($query, $queryType) {
20 20
 		$this->query = $query;
Please login to merge, or discard this patch.