Completed
Push — master ( cfe00b...86682d )
by Jean-Christophe
01:43
created
Ubiquity/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.
Ubiquity/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 Ubiquity\utils\yuml;
4 4
 
5 5
 use Ubiquity\orm\OrmUtils;
6
-use Ubiquity\orm\parser\Reflexion;
7
-use Ubiquity\utils\StrUtils;
8 6
 
9 7
 /**
10 8
  * @author jc
Please login to merge, or discard this patch.
Ubiquity/cache/parser/ControllerParser.php 1 patch
Doc Comments   +10 added lines patch added patch discarded remove patch
@@ -73,6 +73,9 @@  discard block
 block discarded – undo
73 73
 		return "/" . \implode("/", $pathParts);
74 74
 	}
75 75
 
76
+	/**
77
+	 * @param string $prefix
78
+	 */
76 79
 	private static function cleanpath($prefix, $path="") {
77 80
 		if (!StrUtils::endswith($prefix, "/"))
78 81
 			$prefix=$prefix . "/";
@@ -154,6 +157,10 @@  discard block
 block discarded – undo
154 157
 		return [ "path" => $path,"parameters" => $parameters ];
155 158
 	}
156 159
 
160
+	/**
161
+	 * @param integer $index
162
+	 * @param string $paramMatch
163
+	 */
157 164
 	private static function scanParam(&$parameters, &$hasOptional, $matches, $index, $paramMatch, $find, &$path) {
158 165
 		if (isset($matches[1][$index])) {
159 166
 			if ($matches[1][$index] === "...") {
@@ -173,6 +180,9 @@  discard block
 block discarded – undo
173 180
 		}
174 181
 	}
175 182
 
183
+	/**
184
+	 * @param string $path
185
+	 */
176 186
 	private static function createRouteMethod(&$result, $controllerClass, $path, $httpMethods, $method, $parameters, $name, $cache, $duration) {
177 187
 		foreach ( $httpMethods as $httpMethod ) {
178 188
 			$result[$path][$httpMethod]=[ "controller" => $controllerClass,"action" => $method,"parameters" => $parameters,"name" => $name,"cache" => $cache,"duration" => $duration ];
Please login to merge, or discard this patch.
Ubiquity/controllers/Startup.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -144,6 +144,9 @@
 block discarded – undo
144 144
 		self::$config=$config;
145 145
 	}
146 146
 
147
+	/**
148
+	 * @param string[] $needs
149
+	 */
147 150
 	private static function needsKeyInConfigArray(&$result, $array, $needs) {
148 151
 		foreach ( $needs as $need ) {
149 152
 			if (!isset($array[$need]) || StrUtils::isNull($array[$need])) {
Please login to merge, or discard this patch.
Ubiquity/orm/creator/yuml/YumlParser.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -55,6 +55,9 @@
 block discarded – undo
55 55
 		}
56 56
 	}
57 57
 
58
+	/**
59
+	 * @param string $propertiesString
60
+	 */
58 61
 	private function parseProperties($propertiesString,$table){
59 62
 		$properties=\explode(";", $propertiesString);
60 63
 		foreach ($properties as $property){
Please login to merge, or discard this patch.
Ubiquity/orm/DAO.php 1 patch
Doc Comments   +12 added lines, -1 removed lines patch added patch discarded remove patch
@@ -106,6 +106,10 @@  discard block
 block discarded – undo
106 106
 		return $ret;
107 107
 	}
108 108
 
109
+	/**
110
+	 * @param string $class
111
+	 * @param string $part
112
+	 */
109 113
 	private static function setToMember($member, $instance, $value, $class, $part) {
110 114
 		$accessor="set" . ucfirst($member);
111 115
 		if (method_exists($instance, $accessor)) {
@@ -157,6 +161,10 @@  discard block
 block discarded – undo
157 161
 		}
158 162
 	}
159 163
 
164
+	/**
165
+	 * @param string $class
166
+	 * @param ManyToManyParser $parser
167
+	 */
160 168
 	private static function getManyToManyFromArray(&$ret, $instance, $array, $class, $parser) {
161 169
 		$continue=true;
162 170
 		$accessorToMember="get" . ucfirst($parser->getInversedBy());
@@ -229,6 +237,9 @@  discard block
 block discarded – undo
229 237
 		return $objects;
230 238
 	}
231 239
 
240
+	/**
241
+	 * @param \Closure $affectsCallback
242
+	 */
232 243
 	private static function _affectsObjectsFromArray($queries,$objects,$affectsCallback,$useCache=NULL){
233 244
 		foreach ($queries as $key=>$conditions){
234 245
 			list($class,$member,$fkField)=\explode("|", $key);
@@ -328,7 +339,7 @@  discard block
 block discarded – undo
328 339
 	 * Returns the number of objects of $className from the database respecting the condition possibly passed as parameter
329 340
 	 * @param string $className complete classname of the model to load
330 341
 	 * @param string $condition Part following the WHERE of an SQL statement
331
-	 * @return int count of objects
342
+	 * @return string count of objects
332 343
 	 */
333 344
 	public static function count($className, $condition='') {
334 345
 		$tableName=OrmUtils::getTableName($className);
Please login to merge, or discard this patch.
Ubiquity/controllers/Router.php 1 patch
Doc Comments   +15 added lines patch added patch discarded remove patch
@@ -15,6 +15,9 @@  discard block
 block discarded – undo
15 15
 class Router {
16 16
 	private static $routes;
17 17
 
18
+	/**
19
+	 * @return string
20
+	 */
18 21
 	public static function slashPath($path){
19 22
 		if(StrUtils::startswith($path,"/")===false)
20 23
 			$path="/" . $path;
@@ -123,6 +126,9 @@  discard block
 block discarded – undo
123 126
 		return RequestUtils::getUrl(self::getRouteByName($name,$parameters,false));
124 127
 	}
125 128
 
129
+	/**
130
+	 * @return string
131
+	 */
126 132
 	protected static function _getURL($routePath,$params){
127 133
 		$result= \preg_replace_callback('~\((.*?)\)~', function($matches) use (&$params) {
128 134
 			return array_shift($params);
@@ -133,6 +139,9 @@  discard block
 block discarded – undo
133 139
 		return $result;
134 140
 	}
135 141
 
142
+	/**
143
+	 * @param string $name
144
+	 */
136 145
 	protected static function checkRouteName($routeDetails,$name){
137 146
 		if(!isset($routeDetails["name"])){
138 147
 			foreach ($routeDetails as $methodRouteDetail){
@@ -143,6 +152,9 @@  discard block
 block discarded – undo
143 152
 		return isset($routeDetails["name"]) && $routeDetails["name"] == $name;
144 153
 	}
145 154
 
155
+	/**
156
+	 * @param string[] $params
157
+	 */
146 158
 	public static function getRouteUrlParts($routeArray, $params, $cached=false, $duration=NULL,$cachedResponse=true) {
147 159
 		$params=\array_slice($params, 1);
148 160
 		$ctrl=str_replace("\\\\", "\\", $routeArray["details"]["controller"]);
@@ -201,6 +213,9 @@  discard block
 block discarded – undo
201 213
 		self::addRouteToRoutes(self::$routes, $path, $controller, $action, $methods, $name, $cache, $duration);
202 214
 	}
203 215
 
216
+	/**
217
+	 * @param integer $duration
218
+	 */
204 219
 	public static function addRouteToRoutes(&$routesArray, $path, $controller, $action="index", $methods=null, $name="", $cache=false, $duration=null) {
205 220
 		$result=[ ];
206 221
 		if(\class_exists($controller)){
Please login to merge, or discard this patch.