Completed
Push — php-cs-fixer ( b6f93e...b9836a )
by Fabio
07:15
created
bin/prado-cli.php 1 patch
Doc Comments   +25 added lines patch added patch discarded remove patch
@@ -143,6 +143,10 @@  discard block
 block discarded – undo
143 143
 	 */
144 144
 	abstract public function performAction($args);
145 145
 
146
+	/**
147
+	 * @param string $dir
148
+	 * @param integer $mask
149
+	 */
146 150
 	protected function createDirectory($dir, $mask)
147 151
 	{
148 152
 		if(!is_dir($dir))
@@ -154,6 +158,9 @@  discard block
 block discarded – undo
154 158
 			chmod($dir, $mask);
155 159
 	}
156 160
 
161
+	/**
162
+	 * @param string $filename
163
+	 */
157 164
 	protected function createFile($filename, $content)
158 165
 	{
159 166
 		if(!is_file($filename))
@@ -302,6 +309,9 @@  discard block
 block discarded – undo
302 309
 ';
303 310
 	}
304 311
 
312
+	/**
313
+	 * @param string $appName
314
+	 */
305 315
 	protected function renderConfigFile($appName)
306 316
 	{
307 317
 		return <<<EOD
@@ -515,6 +525,9 @@  discard block
 block discarded – undo
515 525
 		return false;
516 526
 	}
517 527
 
528
+	/**
529
+	 * @param string $app_dir
530
+	 */
518 531
 	protected function getActiveRecordConfig($app_dir)
519 532
 	{
520 533
 		if(false === ($xml = $this->getXmlFile($app_dir)))
@@ -530,6 +543,9 @@  discard block
 block discarded – undo
530 543
 		return false;
531 544
 	}
532 545
 
546
+	/**
547
+	 * @param string $app_dir
548
+	 */
533 549
 	protected function getOutputFile($app_dir, $namespace)
534 550
 	{
535 551
 		if(is_file($namespace) && strpos($namespace, $app_dir) === 0)
@@ -591,6 +607,9 @@  discard block
 block discarded – undo
591 607
 		return $prop;
592 608
 	}
593 609
 
610
+	/**
611
+	 * @param string $class
612
+	 */
594 613
 	protected function generateClass($properties, $tablename, $class)
595 614
 	{
596 615
 		$props = implode("\n", $properties);
@@ -686,6 +705,9 @@  discard block
 block discarded – undo
686 705
 		return true;
687 706
 	}
688 707
 
708
+	/**
709
+	 * @param string $l
710
+	 */
689 711
 	public function generate($l)
690 712
 	{
691 713
 		$input = explode(" ", trim($l));
@@ -724,6 +746,9 @@  discard block
 block discarded – undo
724 746
 		return false;
725 747
 	}
726 748
 
749
+	/**
750
+	 * @param string $app_dir
751
+	 */
727 752
 	protected function getActiveRecordConfig($app_dir) {
728 753
 		if (false === ($xml = $this->getXmlFile($app_dir)))
729 754
 			return false;
Please login to merge, or discard this patch.
framework/Caching/ICache.php 1 patch
Doc Comments   +1 added lines patch added patch discarded remove patch
@@ -47,6 +47,7 @@
 block discarded – undo
47 47
 	 * @param mixed the value to be cached
48 48
 	 * @param integer the number of seconds in which the cached value will expire. 0 means never expire.
49 49
 	 * @param ICacheDependency dependency of the cached item. If the dependency changes, the item is labelled invalid.
50
+	 * @param string $id
50 51
 	 * @return boolean true if the value is successfully stored into cache, false otherwise
51 52
 	 */
52 53
 	public function add($id, $value, $expire = 0, $dependency = null);
Please login to merge, or discard this patch.
framework/Caching/TCache.php 1 patch
Doc Comments   +9 added lines, -3 removed lines patch added patch discarded remove patch
@@ -110,7 +110,7 @@  discard block
 block discarded – undo
110 110
 
111 111
 	/**
112 112
 	 * @param string a key identifying a value to be cached
113
-	 * @return sring a key generated from the provided key which ensures the uniqueness across applications
113
+	 * @return string a key generated from the provided key which ensures the uniqueness across applications
114 114
 	 */
115 115
 	protected function generateUniqueKey($key)
116 116
 	{
@@ -144,7 +144,7 @@  discard block
 block discarded – undo
144 144
 	 * @param mixed the value to be cached
145 145
 	 * @param integer the number of seconds in which the cached value will expire. 0 means never expire.
146 146
 	 * @param ICacheDependency dependency of the cached item. If the dependency changes, the item is labeled invalid.
147
-	 * @return boolean true if the value is successfully stored into cache, false otherwise
147
+	 * @return null|boolean true if the value is successfully stored into cache, false otherwise
148 148
 	 */
149 149
 	public function set($id, $value, $expire = 0, $dependency = null)
150 150
 	{
@@ -202,6 +202,7 @@  discard block
 block discarded – undo
202 202
 	 * in {@link get()} already. So only the implementation of data retrieval
203 203
 	 * is needed.
204 204
 	 * @param string a unique key identifying the cached value
205
+	 * @param string $key
205 206
 	 * @return string the value stored in cache, false if the value is not in the cache or expired.
206 207
 	 */
207 208
 	abstract protected function getValue($key);
@@ -216,6 +217,8 @@  discard block
 block discarded – undo
216 217
 	 * @param string the key identifying the value to be cached
217 218
 	 * @param string the value to be cached
218 219
 	 * @param integer the number of seconds in which the cached value will expire. 0 means never expire.
220
+	 * @param string $key
221
+	 * @param integer $expire
219 222
 	 * @return boolean true if the value is successfully stored into cache, false otherwise
220 223
 	 */
221 224
 	abstract protected function setValue($key, $value, $expire);
@@ -230,6 +233,8 @@  discard block
 block discarded – undo
230 233
 	 * @param string the key identifying the value to be cached
231 234
 	 * @param string the value to be cached
232 235
 	 * @param integer the number of seconds in which the cached value will expire. 0 means never expire.
236
+	 * @param string $key
237
+	 * @param integer $expire
233 238
 	 * @return boolean true if the value is successfully stored into cache, false otherwise
234 239
 	 */
235 240
 	abstract protected function addValue($key, $value, $expire);
@@ -238,6 +243,7 @@  discard block
 block discarded – undo
238 243
 	 * Deletes a value with the specified key from cache
239 244
 	 * This method should be implemented by child classes to delete the data from actual cache storage.
240 245
 	 * @param string the key of the value to be deleted
246
+	 * @param string $key
241 247
 	 * @return boolean if no error happens during deletion
242 248
 	 */
243 249
 	abstract protected function deleteValue($key);
@@ -281,7 +287,7 @@  discard block
 block discarded – undo
281 287
 	 * Deletes the value with the specified key from cache
282 288
 	 * This method is required by the interface \ArrayAccess.
283 289
 	 * @param string the key of the value to be deleted
284
-	 * @return boolean if no error happens during deletion
290
+	 * @return boolean|null if no error happens during deletion
285 291
 	 */
286 292
 	public function offsetUnset($id)
287 293
 	{
Please login to merge, or discard this patch.
framework/Caching/TDirectoryCacheDependency.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -124,6 +124,7 @@  discard block
 block discarded – undo
124 124
 	 * By default, it always returns true, meaning the file should be checked.
125 125
 	 * You may override this method to check only certain files.
126 126
 	 * @param string the name of the file that may be checked for dependency.
127
+	 * @param string $fileName
127 128
 	 * @return boolean whether this file should be checked.
128 129
 	 */
129 130
 	protected function validateFile($fileName)
@@ -137,6 +138,7 @@  discard block
 block discarded – undo
137 138
 	 * By default, it always returns true, meaning the subdirectory should be checked.
138 139
 	 * You may override this method to check only certain subdirectories.
139 140
 	 * @param string the name of the subdirectory that may be checked for dependency.
141
+	 * @param string $directory
140 142
 	 * @return boolean whether this subdirectory should be checked.
141 143
 	 */
142 144
 	protected function validateDirectory($directory)
@@ -150,6 +152,7 @@  discard block
 block discarded – undo
150 152
 	 * {@link setRecursiveCheck RecursiveCheck} is set true.
151 153
 	 * @param string the directory name
152 154
 	 * @param int level of the recursion
155
+	 * @param string $directory
153 156
 	 * @return array list of file modification time indexed by the file path
154 157
 	 */
155 158
 	protected function generateTimestamps($directory, $level = 0)
Please login to merge, or discard this patch.
framework/Caching/TEtcdCache.php 1 patch
Doc Comments   +2 added lines patch added patch discarded remove patch
@@ -206,6 +206,8 @@
 block discarded – undo
206 206
    * @param string the HTTP method for the request (GET,PUT,DELETE)
207 207
    * @param string the the key to perform the action on (includes the directory)
208 208
    * @param array the additional post data to send with the request
209
+   * @param string $method
210
+   * @param string $key
209 211
    * @return \stdClass the response from the etcd instance
210 212
    */
211 213
   protected function request($method, $key, $value = []) {
Please login to merge, or discard this patch.
framework/Collections/TPriorityMap.php 1 patch
Doc Comments   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -119,6 +119,7 @@  discard block
 block discarded – undo
119 119
 
120 120
 	/**
121 121
 	 * @param boolean whether this list is read-only or not
122
+	 * @param boolean $value
122 123
 	 */
123 124
 	protected function setReadOnly($value)
124 125
 	{
@@ -136,6 +137,7 @@  discard block
 block discarded – undo
136 137
 	/**
137 138
 	 * This must be called internally or when instantiated.
138 139
 	 * @param numeric sets the default priority of inserted items without a specified priority
140
+	 * @param integer $value
139 141
 	 */
140 142
 	protected function setDefaultPriority($value)
141 143
 	{
@@ -153,6 +155,7 @@  discard block
 block discarded – undo
153 155
 	/**
154 156
 	 * This must be called internally or when instantiated.
155 157
 	 * @param integer The precision of numeric priorities.
158
+	 * @param integer $value
156 159
 	 */
157 160
 	protected function setPrecision($value)
158 161
 	{
@@ -162,7 +165,7 @@  discard block
 block discarded – undo
162 165
 	/**
163 166
 	 * Returns an iterator for traversing the items in the map.
164 167
 	 * This method is required by the interface \IteratorAggregate.
165
-	 * @return Iterator an iterator for traversing the items in the map.
168
+	 * @return \ArrayIterator an iterator for traversing the items in the map.
166 169
 	 */
167 170
 	public function getIterator()
168 171
 	{
@@ -343,7 +346,7 @@  discard block
 block discarded – undo
343 346
 	 * @param mixed key
344 347
 	 * @param mixed value
345 348
 	 * @param numeric|null priority, default: null, filled in with default priority
346
-	 * @return numeric priority at which the pair was added
349
+	 * @return string priority at which the pair was added
347 350
 	 * @throws TInvalidOperationException if the map is read-only
348 351
 	 */
349 352
 	public function add($key, $value, $priority = null)
Please login to merge, or discard this patch.
framework/Data/ActiveRecord/Relations/TActiveRecordRelationContext.php 1 patch
Doc Comments   +5 added lines, -1 removed lines patch added patch discarded remove patch
@@ -36,6 +36,9 @@  discard block
 block discarded – undo
36 36
 	private $_relation; //data from an entry of TActiveRecord::$RELATION
37 37
 	private $_fkeys;
38 38
 
39
+	/**
40
+	 * @param TActiveRecord $record
41
+	 */
39 42
 	public function __construct($record, $property = null, $relation = null)
40 43
 	{
41 44
 		$this->_record = $record;
@@ -169,6 +172,7 @@  discard block
 block discarded – undo
169 172
 	 * An instance of TActiveRecordHasOne, TActiveRecordBelongsTo, TActiveRecordHasMany,
170 173
 	 * or TActiveRecordHasManyAssocation will be returned.
171 174
 	 * @param TActiveRecordCriteria search criteria
175
+	 * @param \Prado\Data\DataGateway\TSqlCriteria $criteria
172 176
 	 * @return TActiveRecordRelation record relationship handler instnace.
173 177
 	 * @throws TActiveRecordException if property is not defined or missing.
174 178
 	 */
@@ -197,7 +201,7 @@  discard block
 block discarded – undo
197 201
 	}
198 202
 
199 203
 	/**
200
-	 * @return TActiveRecordRelationCommand
204
+	 * @return boolean
201 205
 	 */
202 206
 	public function updateAssociatedRecords($updateBelongsTo = false)
203 207
 	{
Please login to merge, or discard this patch.
framework/Data/ActiveRecord/Scaffold/InputBuilder/TScaffoldInputBase.php 1 patch
Doc Comments   +8 added lines patch added patch discarded remove patch
@@ -52,6 +52,10 @@  discard block
 block discarded – undo
52 52
 		}
53 53
 	}
54 54
 
55
+	/**
56
+	 * @param \Prado\Data\ActiveRecord\Scaffold\TScaffoldEditView $parent
57
+	 * @param \Prado\Data\ActiveRecord\TActiveRecord $record
58
+	 */
55 59
 	public function createScaffoldInput($parent, $item, $column, $record)
56 60
 	{
57 61
 		$this->_parent = $parent;
@@ -68,6 +72,10 @@  discard block
 block discarded – undo
68 72
 		$label->setForControl(self::DEFAULT_ID);
69 73
 	}
70 74
 
75
+	/**
76
+	 * @param \Prado\Data\ActiveRecord\Scaffold\TScaffoldEditView $parent
77
+	 * @param \Prado\Data\ActiveRecord\TActiveRecord $record
78
+	 */
71 79
 	public function loadScaffoldInput($parent, $item, $column, $record)
72 80
 	{
73 81
 		$this->_parent = $parent;
Please login to merge, or discard this patch.
framework/Data/ActiveRecord/TActiveRecord.php 1 patch
Doc Comments   +10 added lines, -2 removed lines patch added patch discarded remove patch
@@ -324,7 +324,7 @@  discard block
 block discarded – undo
324 324
 	/**
325 325
 	 * Gets the current Db connection, the connection object is obtained from
326 326
 	 * the TActiveRecordManager if connection is currently null.
327
-	 * @return TDbConnection current db connection for this object.
327
+	 * @return \Prado\Data\TDbConnection current db connection for this object.
328 328
 	 */
329 329
 	public function getDbConnection()
330 330
 	{
@@ -511,6 +511,7 @@  discard block
 block discarded – undo
511 511
 	 * Delete multiple records using a criteria.
512 512
 	 * @param string|TActiveRecordCriteria SQL condition or criteria object.
513 513
 	 * @param mixed parameter values.
514
+	 * @param TSqlCriteria $criteria
514 515
 	 * @return int number of records deleted.
515 516
 	 */
516 517
 	public function deleteAll($criteria = null, $parameters = [])
@@ -577,6 +578,7 @@  discard block
 block discarded – undo
577 578
 	 *
578 579
 	 * @param string|TActiveRecordCriteria SQL condition or criteria object.
579 580
 	 * @param mixed parameter values.
581
+	 * @param TSqlCriteria $criteria
580 582
 	 * @return TActiveRecord matching record object. Null if no result is found.
581 583
 	 */
582 584
 	public function find($criteria, $parameters = [])
@@ -593,6 +595,7 @@  discard block
 block discarded – undo
593 595
 	 *
594 596
 	 * @param string|TActiveRecordCriteria SQL condition or criteria object.
595 597
 	 * @param mixed parameter values.
598
+	 * @param TSqlCriteria $criteria
596 599
 	 * @return array matching record objects. Empty array if no result is found.
597 600
 	 */
598 601
 	public function findAll($criteria = null, $parameters = [])
@@ -706,6 +709,7 @@  discard block
 block discarded – undo
706 709
 	 * Find the number of records.
707 710
 	 * @param string|TActiveRecordCriteria SQL condition or criteria object.
708 711
 	 * @param mixed parameter values.
712
+	 * @param TActiveRecordCriteria $criteria
709 713
 	 * @return int number of records.
710 714
 	 */
711 715
 	public function count($criteria = null, $parameters = [])
@@ -721,6 +725,7 @@  discard block
 block discarded – undo
721 725
 	 * value equal to the $property value.
722 726
 	 * @param string relationship/property name corresponding to keys in $RELATION array.
723 727
 	 * @param array method call arguments.
728
+	 * @param string $name
724 729
 	 * @return TActiveRecordRelation, null if the context or the handler doesn't exist
725 730
 	 */
726 731
 	protected function getRelationHandler($name, $args = [])
@@ -945,6 +950,7 @@  discard block
 block discarded – undo
945 950
 	 * Raised before the record attempt to insert its data into the database.
946 951
 	 * To prevent the insert operation, set the TActiveRecordChangeEventParameter::IsValid parameter to false.
947 952
 	 * @param TActiveRecordChangeEventParameter event parameter to be passed to the event handlers
953
+	 * @param TActiveRecordChangeEventParameter $param
948 954
 	 */
949 955
 	public function onInsert($param)
950 956
 	{
@@ -955,6 +961,7 @@  discard block
 block discarded – undo
955 961
 	 * Raised before the record attempt to delete its data from the database.
956 962
 	 * To prevent the delete operation, set the TActiveRecordChangeEventParameter::IsValid parameter to false.
957 963
 	 * @param TActiveRecordChangeEventParameter event parameter to be passed to the event handlers
964
+	 * @param TActiveRecordChangeEventParameter $param
958 965
 	 */
959 966
 	public function onDelete($param)
960 967
 	{
@@ -965,6 +972,7 @@  discard block
 block discarded – undo
965 972
 	 * Raised before the record attempt to update its data in the database.
966 973
 	 * To prevent the update operation, set the TActiveRecordChangeEventParameter::IsValid parameter to false.
967 974
 	 * @param TActiveRecordChangeEventParameter event parameter to be passed to the event handlers
975
+	 * @param TActiveRecordChangeEventParameter $param
968 976
 	 */
969 977
 	public function onUpdate($param)
970 978
 	{
@@ -1048,7 +1056,7 @@  discard block
 block discarded – undo
1048 1056
 	
1049 1057
 		/**
1050 1058
 		 * Return record data as JSON
1051
-		 * @return JSON
1059
+		 * @return string
1052 1060
 		 * @since 3.2.4
1053 1061
 		 */
1054 1062
 		public function toJSON(){
Please login to merge, or discard this patch.