Completed
Push — master ( 1f65a3...0feaa6 )
by Jean-Christophe
01:28
created
micro/cache/CacheManager.php 1 patch
Doc Comments   +32 added lines patch added patch discarded remove patch
@@ -57,6 +57,9 @@  discard block
 block discarded – undo
57 57
 		}
58 58
 	}
59 59
 
60
+	/**
61
+	 * @param string $key
62
+	 */
60 63
 	public static function expired($key, $duration) {
61 64
 		return self::$cache->expired("controllers/" . $key, $duration) === true || \array_key_exists($key, self::$expiredRoutes);
62 65
 	}
@@ -69,6 +72,9 @@  discard block
 block discarded – undo
69 72
 		return true;
70 73
 	}
71 74
 
75
+	/**
76
+	 * @param string $routePath
77
+	 */
72 78
 	public static function setExpired($routePath, $expired=true) {
73 79
 		$key=self::getRouteKey($routePath);
74 80
 		self::setKeyExpired($key, $expired);
@@ -88,6 +94,10 @@  discard block
 block discarded – undo
88 94
 		return self::storeRouteResponse($key, $response);
89 95
 	}
90 96
 
97
+	/**
98
+	 * @param string $key
99
+	 * @param string $response
100
+	 */
91 101
 	private static function storeRouteResponse($key, $response) {
92 102
 		self::setKeyExpired($key, false);
93 103
 		self::$cache->store("controllers/" . $key, $response, false);
@@ -123,6 +133,9 @@  discard block
 block discarded – undo
123 133
 		}
124 134
 	}
125 135
 
136
+	/**
137
+	 * @return string
138
+	 */
126 139
 	public static function getModelCacheKey($classname){
127 140
 		return \str_replace("\\", DIRECTORY_SEPARATOR, $classname);
128 141
 	}
@@ -134,6 +147,9 @@  discard block
 block discarded – undo
134 147
 		return false;
135 148
 	}
136 149
 
150
+	/**
151
+	 * @param string $classname
152
+	 */
137 153
 	private static function addControllerCache($classname) {
138 154
 		$parser=new ControllerParser();
139 155
 		try {
@@ -167,6 +183,9 @@  discard block
 block discarded – undo
167 183
 		return [ "annotations" => $annotationCacheDir,"models" => $modelsCacheDir,"controllers" => $controllersCacheDir,"queries" => $queriesCacheDir ,"views"=>$viewsCacheDir];
168 184
 	}
169 185
 
186
+	/**
187
+	 * @param string $dir
188
+	 */
170 189
 	private static function safeMkdir($dir) {
171 190
 		if (!is_dir($dir))
172 191
 			return mkdir($dir, 0777, true);
@@ -180,6 +199,10 @@  discard block
 block discarded – undo
180 199
 		}
181 200
 	}
182 201
 
202
+	/**
203
+	 * @param string $type
204
+	 * @param string $typeRef
205
+	 */
183 206
 	private static function _clearCache($cacheDirectories,$type,$typeRef){
184 207
 		if ($type === "all" || $type === $typeRef)
185 208
 			FsUtils::deleteAllFilesFromFolder($cacheDirectories[$typeRef]);
@@ -216,6 +239,9 @@  discard block
 block discarded – undo
216 239
 		return self::_getFiles($config, "controllers",$silent);
217 240
 	}
218 241
 
242
+	/**
243
+	 * @param string $type
244
+	 */
219 245
 	private static function _getFiles(&$config,$type,$silent=false){
220 246
 		$typeNS=$config["mvcNS"][$type];
221 247
 		$typeDir=ROOT . DS . str_replace("\\", DS, $typeNS);
@@ -280,6 +306,9 @@  discard block
 block discarded – undo
280 306
 		return $result;
281 307
 	}
282 308
 
309
+	/**
310
+	 * @param string $controllerClass
311
+	 */
283 312
 	public static function getRestResource($controllerClass){
284 313
 		$cache=self::getRestCache();
285 314
 		if(isset($cache[$controllerClass])){
@@ -288,6 +317,9 @@  discard block
 block discarded – undo
288 317
 		return null;
289 318
 	}
290 319
 
320
+	/**
321
+	 * @param string $controllerClass
322
+	 */
291 323
 	public static function getRestCacheController($controllerClass){
292 324
 		$cache=self::getRestCache();
293 325
 		if(isset($cache[$controllerClass])){
Please login to merge, or discard this patch.
micro/cache/parser/ControllerParser.php 1 patch
Doc Comments   +6 added lines patch added patch discarded remove patch
@@ -67,6 +67,9 @@  discard block
 block discarded – undo
67 67
 		return "/".\implode("/", $pathParts);
68 68
 	}
69 69
 
70
+	/**
71
+	 * @param string $prefix
72
+	 */
70 73
 	private static function cleanpath($prefix, $path="") {
71 74
 		if (!StrUtils::endswith($prefix, "/"))
72 75
 			$prefix=$prefix . "/";
@@ -163,6 +166,9 @@  discard block
 block discarded – undo
163 166
 		return [ "path" => $path,"parameters" => $parameters ];
164 167
 	}
165 168
 
169
+	/**
170
+	 * @param string $path
171
+	 */
166 172
 	private static function createRouteMethod(&$result, $controllerClass, $path, $httpMethods, $method, $parameters, $name, $cache, $duration) {
167 173
 		foreach ( $httpMethods as $httpMethod ) {
168 174
 			$result[$path][$httpMethod]=[ "controller" => $controllerClass,"action" => $method,"parameters" => $parameters,"name" => $name,"cache" => $cache,"duration" => $duration ];
Please login to merge, or discard this patch.
micro/controllers/rest/ApiTokens.php 1 patch
Doc Comments   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -78,9 +78,9 @@
 block discarded – undo
78 78
 	}
79 79
 
80 80
 	/**
81
-	 * @param string $name
82
-	 * @param number $length
83
-	 * @param number $duration
81
+	 * @param integer $length
82
+	 * @param integer $duration
83
+	 * @param string $folder
84 84
 	 * @return ApiTokens
85 85
 	 */
86 86
 	public static function getFromCache($folder,$key="_apiTokens",$length=78,$duration=3600){
Please login to merge, or discard this patch.
micro/controllers/rest/RestController.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -79,6 +79,9 @@
 block discarded – undo
79 79
 		echo $this->responseFormatter->formatException($e);
80 80
 	}
81 81
 
82
+	/**
83
+	 * @param integer $value
84
+	 */
82 85
 	public function _setResponseCode($value){
83 86
 		\http_response_code($value);
84 87
 	}
Please login to merge, or discard this patch.
micro/controllers/rest/RestServer.php 1 patch
Doc Comments   +5 added lines patch added patch discarded remove patch
@@ -74,6 +74,11 @@
 block discarded – undo
74 74
 		}
75 75
 	}
76 76
 
77
+	/**
78
+	 * @param string $header
79
+	 *
80
+	 * @return string
81
+	 */
77 82
 	public function _getHeader($header){
78 83
 		$headers=getallheaders();
79 84
 		if(isset($headers[$header])){
Please login to merge, or discard this patch.
micro/utils/yuml/ClassesToYuml.php 1 patch
Doc Comments   -5 removed lines patch added patch discarded remove patch
@@ -22,11 +22,6 @@
 block discarded – undo
22 22
 		$this->displayPropertiesTypes=$displayPropertiesTypes;
23 23
 	}
24 24
 	/**
25
-	 * @param boolean $displayProperties
26
-	 * @param boolean $displayAssociations
27
-	 * @param boolean $displayMethods
28
-	 * @param boolean $displayMethodsParams
29
-	 * @param boolean $displayPropertiesTypes
30 25
 	 * @return ClassParser[]|string[]
31 26
 	 */
32 27
 	public function parse(){
Please login to merge, or discard this patch.
micro/utils/yuml/ClassToYuml.php 2 patches
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -122,6 +122,9 @@
 block discarded – undo
122 122
 		return $this->_getYumlRelationsType($this->oneToManys,"1-0..*");
123 123
 	}
124 124
 
125
+	/**
126
+	 * @param string $branche
127
+	 */
125 128
 	protected function _getYumlRelationsType($relations,$branche){
126 129
 		$myClass=$this->getShortClassName($this->class);
127 130
 		$yumlRelations=[];
Please login to merge, or discard this patch.
Unused Use Statements   -2 removed lines patch added patch discarded remove patch
@@ -3,8 +3,6 @@
 block discarded – undo
3 3
 namespace micro\utils\yuml;
4 4
 
5 5
 use micro\orm\OrmUtils;
6
-use micro\orm\parser\Reflexion;
7
-use micro\utils\StrUtils;
8 6
 
9 7
 /**
10 8
  * @author jc
Please login to merge, or discard this patch.