@@ -143,6 +143,10 @@ discard block |
||
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 |
||
154 | 158 | } |
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 |
||
302 | 309 | '; |
303 | 310 | } |
304 | 311 | |
312 | + /** |
|
313 | + * @param string $appName |
|
314 | + */ |
|
305 | 315 | protected function renderConfigFile($appName) |
306 | 316 | { |
307 | 317 | return <<<EOD |
@@ -520,6 +530,9 @@ discard block |
||
520 | 530 | return false; |
521 | 531 | } |
522 | 532 | |
533 | + /** |
|
534 | + * @param string $app_dir |
|
535 | + */ |
|
523 | 536 | protected function getActiveRecordConfig($app_dir) |
524 | 537 | { |
525 | 538 | if (false === ($xml = $this->getXmlFile($app_dir))) { |
@@ -537,6 +550,9 @@ discard block |
||
537 | 550 | return false; |
538 | 551 | } |
539 | 552 | |
553 | + /** |
|
554 | + * @param string $app_dir |
|
555 | + */ |
|
540 | 556 | protected function getOutputFile($app_dir, $namespace) |
541 | 557 | { |
542 | 558 | if (is_file($namespace) && strpos($namespace, $app_dir) === 0) { |
@@ -596,6 +612,9 @@ discard block |
||
596 | 612 | return $prop; |
597 | 613 | } |
598 | 614 | |
615 | + /** |
|
616 | + * @param string $class |
|
617 | + */ |
|
599 | 618 | protected function generateClass($properties, $tablename, $class) |
600 | 619 | { |
601 | 620 | $props = implode("\n", $properties); |
@@ -691,6 +710,9 @@ discard block |
||
691 | 710 | return true; |
692 | 711 | } |
693 | 712 | |
713 | + /** |
|
714 | + * @param string $l |
|
715 | + */ |
|
694 | 716 | public function generate($l) |
695 | 717 | { |
696 | 718 | $input = explode(" ", trim($l)); |
@@ -734,6 +756,9 @@ discard block |
||
734 | 756 | return false; |
735 | 757 | } |
736 | 758 | |
759 | + /** |
|
760 | + * @param string $app_dir |
|
761 | + */ |
|
737 | 762 | protected function getActiveRecordConfig($app_dir) |
738 | 763 | { |
739 | 764 | if (false === ($xml = $this->getXmlFile($app_dir))) { |
@@ -111,7 +111,7 @@ discard block |
||
111 | 111 | |
112 | 112 | /** |
113 | 113 | * @param string $key a key identifying a value to be cached |
114 | - * @return sring a key generated from the provided key which ensures the uniqueness across applications |
|
114 | + * @return string a key generated from the provided key which ensures the uniqueness across applications |
|
115 | 115 | */ |
116 | 116 | protected function generateUniqueKey($key) |
117 | 117 | { |
@@ -146,7 +146,7 @@ discard block |
||
146 | 146 | * @param mixed $value the value to be cached |
147 | 147 | * @param int $expire the number of seconds in which the cached value will expire. 0 means never expire. |
148 | 148 | * @param ICacheDependency $dependency dependency of the cached item. If the dependency changes, the item is labeled invalid. |
149 | - * @return bool true if the value is successfully stored into cache, false otherwise |
|
149 | + * @return null|boolean true if the value is successfully stored into cache, false otherwise |
|
150 | 150 | */ |
151 | 151 | public function set($id, $value, $expire = 0, $dependency = null) |
152 | 152 | { |
@@ -283,7 +283,7 @@ discard block |
||
283 | 283 | * Deletes the value with the specified key from cache |
284 | 284 | * This method is required by the interface \ArrayAccess. |
285 | 285 | * @param string $id the key of the value to be deleted |
286 | - * @return bool if no error happens during deletion |
|
286 | + * @return boolean|null if no error happens during deletion |
|
287 | 287 | */ |
288 | 288 | public function offsetUnset($id) |
289 | 289 | { |
@@ -103,7 +103,7 @@ discard block |
||
103 | 103 | /** |
104 | 104 | * Returns the item with the specified key. |
105 | 105 | * This overrides the parent implementation by converting the key to lower case first if CaseSensitive is false. |
106 | - * @param mixed $key the key |
|
106 | + * @param string $key the key |
|
107 | 107 | * @return mixed the element at the offset, null if no element is found at the offset |
108 | 108 | */ |
109 | 109 | public function itemAt($key) |
@@ -115,7 +115,7 @@ discard block |
||
115 | 115 | /** |
116 | 116 | * Adds an item into the map. |
117 | 117 | * This overrides the parent implementation by converting the key to lower case first if CaseSensitive is false. |
118 | - * @param mixed $key |
|
118 | + * @param string $key |
|
119 | 119 | * @param mixed $value |
120 | 120 | */ |
121 | 121 | public function add($key, $value) |
@@ -126,7 +126,7 @@ discard block |
||
126 | 126 | /** |
127 | 127 | * Removes an item from the map by its key. |
128 | 128 | * This overrides the parent implementation by converting the key to lower case first if CaseSensitive is false. |
129 | - * @param mixed $key the key of the item to be removed |
|
129 | + * @param string $key the key of the item to be removed |
|
130 | 130 | * @return mixed the removed value, null if no such key exists. |
131 | 131 | */ |
132 | 132 | public function remove($key) |
@@ -68,7 +68,7 @@ |
||
68 | 68 | } |
69 | 69 | |
70 | 70 | /** |
71 | - * @param mixed $value original data source |
|
71 | + * @param \Traversable $value original data source |
|
72 | 72 | */ |
73 | 73 | public function setDataSource($value) |
74 | 74 | { |
@@ -289,7 +289,7 @@ |
||
289 | 289 | } |
290 | 290 | |
291 | 291 | /** |
292 | - * @return Iterator iterator |
|
292 | + * @return \ArrayIterator iterator |
|
293 | 293 | */ |
294 | 294 | public function getIterator() |
295 | 295 | { |
@@ -84,7 +84,7 @@ discard block |
||
84 | 84 | * Initializes the list with an array or an iterable object. |
85 | 85 | * @param null|array|Iterator $data the intial data. Default is null, meaning no initial data. |
86 | 86 | * @param bool $readOnly whether the list is read-only |
87 | - * @param numeric $defaultPriority the default priority of items without specified priorities. |
|
87 | + * @param integer $defaultPriority the default priority of items without specified priorities. |
|
88 | 88 | * @param int $precision the precision of the numeric priorities |
89 | 89 | * @throws TInvalidDataTypeException If data is not null and is neither an array nor an iterator. |
90 | 90 | */ |
@@ -146,7 +146,7 @@ discard block |
||
146 | 146 | |
147 | 147 | /** |
148 | 148 | * This must be called internally or when instantiated. |
149 | - * @param numeric $value sets the default priority of inserted items without a specified priority |
|
149 | + * @param integer $value sets the default priority of inserted items without a specified priority |
|
150 | 150 | */ |
151 | 151 | protected function setDefaultPriority($value) |
152 | 152 | { |
@@ -173,7 +173,7 @@ discard block |
||
173 | 173 | /** |
174 | 174 | * Returns an iterator for traversing the items in the list. |
175 | 175 | * This method is required by the interface \IteratorAggregate. |
176 | - * @return Iterator an iterator for traversing the items in the list. |
|
176 | + * @return \ArrayIterator an iterator for traversing the items in the list. |
|
177 | 177 | */ |
178 | 178 | public function getIterator() |
179 | 179 | { |
@@ -386,7 +386,7 @@ discard block |
||
386 | 386 | /** |
387 | 387 | * Removes an item from the priority list. |
388 | 388 | * The list will search for the item. The first matching item found will be removed from the list. |
389 | - * @param mixed $item item the item to be removed. |
|
389 | + * @param callable $item item the item to be removed. |
|
390 | 390 | * @param null|bool|float $priority priority of item to remove. without this parameter it defaults to false. |
391 | 391 | * A value of false means any priority. null will be filled in with the default priority. |
392 | 392 | * @throws TInvalidDataValueException If the item does not exist |
@@ -630,7 +630,7 @@ discard block |
||
630 | 630 | |
631 | 631 | /** |
632 | 632 | * Combines the map elements which have a priority below the parameter value |
633 | - * @param numeric $priority the cut-off priority. All items of priority less than this are returned. |
|
633 | + * @param integer $priority the cut-off priority. All items of priority less than this are returned. |
|
634 | 634 | * @param bool $inclusive whether or not the input cut-off priority is inclusive. Default: false, not inclusive. |
635 | 635 | * @return array the array of priorities keys with values of arrays of items that are below a specified priority. |
636 | 636 | * The priorities are sorted so important priorities, lower numerics, are first. |
@@ -650,7 +650,7 @@ discard block |
||
650 | 650 | |
651 | 651 | /** |
652 | 652 | * Combines the map elements which have a priority above the parameter value |
653 | - * @param numeric $priority the cut-off priority. All items of priority greater than this are returned. |
|
653 | + * @param integer $priority the cut-off priority. All items of priority greater than this are returned. |
|
654 | 654 | * @param bool $inclusive whether or not the input cut-off priority is inclusive. Default: true, inclusive. |
655 | 655 | * @return array the array of priorities keys with values of arrays of items that are above a specified priority. |
656 | 656 | * The priorities are sorted so important priorities, lower numerics, are first. |
@@ -160,7 +160,7 @@ discard block |
||
160 | 160 | } |
161 | 161 | |
162 | 162 | /** |
163 | - * @return TDataGatewayCommand |
|
163 | + * @return \Prado\Data\DataGateway\TDataGatewayCommand |
|
164 | 164 | */ |
165 | 165 | protected function getCommandBuilder() |
166 | 166 | { |
@@ -168,7 +168,7 @@ discard block |
||
168 | 168 | } |
169 | 169 | |
170 | 170 | /** |
171 | - * @return TDataGatewayCommand |
|
171 | + * @return \Prado\Data\DataGateway\TDataGatewayCommand |
|
172 | 172 | */ |
173 | 173 | protected function getForeignCommandBuilder() |
174 | 174 | { |
@@ -227,6 +227,7 @@ discard block |
||
227 | 227 | * @param array $foreignKeys field names |
228 | 228 | * @param array $indexValues field values |
229 | 229 | * @param array $sourceKeys source table column names. |
230 | + * @return \Prado\Data\DataGateway\TDataGatewayCommand |
|
230 | 231 | */ |
231 | 232 | public function createCommand($criteria, $foreignKeys, $indexValues, $sourceKeys) |
232 | 233 | { |
@@ -344,6 +345,9 @@ discard block |
||
344 | 345 | return $this->getCommandBuilder()->onExecuteCommand($command, $command->execute()) > 0; |
345 | 346 | } |
346 | 347 | |
348 | + /** |
|
349 | + * @param TActiveRecord $obj |
|
350 | + */ |
|
347 | 351 | private function updateAssociationTable($obj, $fkObjects, $builder) |
348 | 352 | { |
349 | 353 | $source = $this->getSourceRecordValues($obj); |
@@ -104,7 +104,7 @@ discard block |
||
104 | 104 | } |
105 | 105 | |
106 | 106 | /** |
107 | - * @return TActiveRecord current Active Record instance |
|
107 | + * @return \Prado\Data\ActiveRecord\TActiveRecord current Active Record instance |
|
108 | 108 | */ |
109 | 109 | protected function getCurrentRecord() |
110 | 110 | { |
@@ -133,7 +133,7 @@ discard block |
||
133 | 133 | |
134 | 134 | /** |
135 | 135 | * Instantiate the external edit renderer. |
136 | - * @param TActiveRecord $record record to be edited |
|
136 | + * @param \Prado\Data\ActiveRecord\TActiveRecord $record record to be edited |
|
137 | 137 | * @param string $classPath external edit renderer class name. |
138 | 138 | * @throws TConfigurationException raised when renderer is not an |
139 | 139 | * instance of IScaffoldEditRenderer. |
@@ -261,7 +261,7 @@ discard block |
||
261 | 261 | |
262 | 262 | /** |
263 | 263 | * Create the default scaffold editor control factory. |
264 | - * @param TActiveRecord $record record instance. |
|
264 | + * @param \Prado\Data\ActiveRecord\TActiveRecord $record record instance. |
|
265 | 265 | * @return TScaffoldInputBase scaffold editor control factory. |
266 | 266 | */ |
267 | 267 | protected function getScaffoldInputBuilder($record) |
@@ -329,7 +329,7 @@ discard block |
||
329 | 329 | /** |
330 | 330 | * Gets the current Db connection, the connection object is obtained from |
331 | 331 | * the TActiveRecordManager if connection is currently null. |
332 | - * @return TDbConnection current db connection for this object. |
|
332 | + * @return \Prado\Data\TDbConnection current db connection for this object. |
|
333 | 333 | */ |
334 | 334 | public function getDbConnection() |
335 | 335 | { |
@@ -582,7 +582,7 @@ discard block |
||
582 | 582 | * $finder->find($criteria); //the 2nd parameter for find() is ignored. |
583 | 583 | * </code> |
584 | 584 | * |
585 | - * @param string|TActiveRecordCriteria $criteria SQL condition or criteria object. |
|
585 | + * @param TSqlCriteria $criteria SQL condition or criteria object. |
|
586 | 586 | * @param mixed $parameters parameter values. |
587 | 587 | * @return TActiveRecord matching record object. Null if no result is found. |
588 | 588 | */ |
@@ -1065,7 +1065,7 @@ discard block |
||
1065 | 1065 | |
1066 | 1066 | /** |
1067 | 1067 | * Return record data as JSON |
1068 | - * @return JSON |
|
1068 | + * @return string |
|
1069 | 1069 | * @since 3.2.4 |
1070 | 1070 | */ |
1071 | 1071 | public function toJSON() |