Skip to content

Commit 1415d38

Browse files
committed
Revert "Make sure propel generates correct doc block"
This reverts commit b9bdf26.
1 parent 6adeded commit 1415d38

File tree

5 files changed

+281
-296
lines changed

5 files changed

+281
-296
lines changed

lib/vendor/propel-generator/classes/propel/engine/builder/om/php5/PHP5BasicObjectBuilder.php

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -346,7 +346,7 @@ protected function addTemporalAccessor(&$script, $col)
346346
* ".$col->getDescription()."
347347
* @param string \$format The date/time format string (either date()-style or strftime()-style).
348348
* If format is NULL, then the integer unix timestamp will be returned.
349-
* @return false|int|string|null Formatted date/time value as string or integer unix timestamp (if format is NULL).
349+
* @return mixed Formatted date/time value as string or integer unix timestamp (if format is NULL).
350350
* @throws PropelException - if unable to convert the date/time to timestamp.
351351
*/
352352
public function get$cfc(\$format = ".var_export($defaultfmt, true)."";
@@ -399,7 +399,7 @@ protected function addGenericAccessor(&$script, $col)
399399
/**
400400
* Get the [$clo] column value.
401401
* ".$col->getDescription()."
402-
* @return ".$col->getPhpNative(). $col->isNotNull() ? "" : "|null
402+
* @return ".$col->getPhpNative()."
403403
*/
404404
public function get$cfc(";
405405
if ($col->isLazyLoad()) $script .= "\$con = null";
@@ -500,12 +500,12 @@ protected function addMutatorOpen(&$script, Column $col)
500500
* ".$col->getDescription()."
501501
* @param ".$col->getPhpNative()." \$v new value
502502
* @return void";
503-
503+
504504
if ($throwsPropelException){
505505
$script .= "
506506
* @throws PropelException";
507507
}
508-
508+
509509
$script .= "
510510
*/
511511
public function set$cfc(\$v)
@@ -635,10 +635,10 @@ protected function addDefaultMutator(&$script, Column $col)
635635
}
636636

637637
$this->addMutatorOpen($script, $col);
638-
638+
639639
// Perform some smart checking here to handle possible type discrepancies
640640
// between the passed-in value and the value from the DB
641-
641+
642642
if ($col->getPhpNative() === "int") {
643643
$script .= "
644644
// Since the native PHP type for this column is integer,
@@ -656,7 +656,7 @@ protected function addDefaultMutator(&$script, Column $col)
656656
}
657657
";
658658
}
659-
659+
660660
$script .= "
661661
if (\$this->$clo !== \$v";
662662
if ($defaultValue !== null) {
@@ -811,8 +811,7 @@ protected function addToArray(&$script)
811811
*
812812
* @param string \$keyType One of the class type constants TYPE_PHPNAME,
813813
* TYPE_COLNAME, TYPE_FIELDNAME, TYPE_NUM
814-
* @return array an associative array containing the field names (as keys) and field values
815-
* @throws PropelException
814+
* @return mixed[string] an associative array containing the field names (as keys) and field values
816815
*/
817816
public function toArray(\$keyType = BasePeer::TYPE_PHPNAME)
818817
{
@@ -840,7 +839,6 @@ protected function addGetByName(&$script)
840839
* one of the class type constants TYPE_PHPNAME,
841840
* TYPE_COLNAME, TYPE_FIELDNAME, TYPE_NUM
842841
* @return mixed Value of field.
843-
* @throws PropelException
844842
*/
845843
public function getByName(\$name, \$type = BasePeer::TYPE_PHPNAME)
846844
{
@@ -896,7 +894,6 @@ protected function addSetByName(&$script)
896894
* one of the class type constants TYPE_PHPNAME,
897895
* TYPE_COLNAME, TYPE_FIELDNAME, TYPE_NUM
898896
* @return void
899-
* @throws PropelException
900897
*/
901898
public function setByName(\$name, \$value, \$type = BasePeer::TYPE_PHPNAME)
902899
{
@@ -917,7 +914,6 @@ protected function addSetByPosition(&$script)
917914
* @param int \$pos position in xml schema
918915
* @param mixed \$value field value
919916
* @return void
920-
* @throws PropelException
921917
*/
922918
public function setByPosition(\$pos, \$value)
923919
{
@@ -957,7 +953,6 @@ protected function addFromArray(&$script)
957953
* @param array \$arr An array to populate the object from.
958954
* @param string \$keyType The type of keys the array uses.
959955
* @return void
960-
* @throws PropelException
961956
*/
962957
public function fromArray(\$arr, \$keyType = BasePeer::TYPE_PHPNAME)
963958
{

lib/vendor/propel-generator/classes/propel/engine/builder/om/php5/PHP5BasicPeerBuilder.php

Lines changed: 12 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -406,14 +406,14 @@ public function addInheritanceColumnConstants(&$script)
406406
/** A key representing a particular subclass */
407407
const CLASSKEY_".strtoupper($child->getKey())." = '" . $child->getKey() . "';
408408
";
409-
409+
410410
if (strtoupper($child->getClassname()) != strtoupper($child->getKey())) {
411411
$script .= "
412412
/** A key representing a particular subclass */
413413
const CLASSKEY_".strtoupper($child->getClassname())." = '" . $child->getKey() . "';
414414
";
415415
}
416-
416+
417417
$script .= "
418418
/** A class that can be returned by this peer. */
419419
const CLASSNAME_".strtoupper($child->getKey())." = '". $childBuilder->getClasspath() . "';
@@ -530,8 +530,6 @@ protected function addDoCount(&$script)
530530
* @param boolean \$distinct Whether to select only distinct columns (You can also set DISTINCT modifier in Criteria).
531531
* @param Connection \$con
532532
* @return int Number of matching rows.
533-
* @throws PropelException
534-
* @throws SQLException
535533
*/
536534
public static function doCount(Criteria \$criteria, \$distinct = false, \$con = null)
537535
{
@@ -574,9 +572,9 @@ protected function addDoSelectOne(&$script)
574572
*
575573
* @param Criteria \$criteria object used to create the SELECT statement.
576574
* @param Connection \$con
577-
* @return ".$this->getTable()->getPhpName()."|null
578-
* @throws PropelException
579-
* @throws SQLException
575+
* @return ".$this->getTable()->getPhpName()."
576+
* @throws PropelException Any exceptions caught during processing will be
577+
* rethrown wrapped into a PropelException.
580578
*/
581579
public static function doSelectOne(Criteria \$criteria, \$con = null)
582580
{
@@ -604,8 +602,8 @@ protected function addDoSelect(&$script)
604602
* @param Criteria \$criteria The Criteria object used to build the SELECT statement.
605603
* @param Connection \$con
606604
* @return {$className}[] Array of selected Objects
607-
* @throws PropelException
608-
* @throws SQLException
605+
* @throws PropelException Any exceptions caught during processing will be
606+
* rethrown wrapped into a PropelException.
609607
*/
610608
public static function doSelect(Criteria \$criteria, \$con = null)
611609
{
@@ -669,8 +667,8 @@ protected function addPopulateObjects(&$script)
669667
*
670668
* @param Resultset \$rs
671669
* @return ".$table->getPhpName()."[]
672-
* @throws PropelException
673-
* @throws SQLException
670+
* @throws PropelException Any exceptions caught during processing will be
671+
* rethrown wrapped into a PropelException.
674672
*/
675673
public static function populateObjects(ResultSet \$rs)
676674
{
@@ -1278,7 +1276,6 @@ protected function addDoValidate(&$script)
12781276
* @param mixed \$cols Column name or array of column names.
12791277
*
12801278
* @return mixed TRUE if all columns are valid or the error message of the first invalid column.
1281-
* @throws PropelException
12821279
*/
12831280
public static function doValidate(Base".$table->getPhpName()." \$obj, \$cols = null)
12841281
{
@@ -1332,9 +1329,7 @@ protected function addRetrieveByPK_SinglePK(&$script)
13321329
*
13331330
* @param mixed \$pk the primary key.
13341331
* @param Connection \$con the connection to use
1335-
* @return $className|null
1336-
* @throws PropelException
1337-
* @throws SQLException
1332+
* @return $className
13381333
*/
13391334
public static function ".$this->getRetrieveMethodName()."(\$pk, \$con = null)
13401335
{
@@ -1385,8 +1380,8 @@ protected function addRetrieveByPKs_SinglePK(&$script)
13851380
* @param array \$pks List of primary keys
13861381
* @param Connection \$con the connection to use
13871382
* @return {$className}[]
1388-
* @throws PropelException
1389-
* @throws SQLException
1383+
* @throws PropelException Any exceptions caught during processing will be
1384+
* rethrown wrapped into a PropelException.
13901385
*/
13911386
public static function ".$this->getRetrieveMethodName()."s(\$pks, \$con = null)
13921387
{

lib/vendor/propel-generator/classes/propel/engine/builder/om/php5/PHP5ComplexObjectBuilder.php

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,7 @@ protected function addFKMutator(&$script, ForeignKey $fk)
296296
/**
297297
* Declares an association between this object and a $className object.
298298
*
299-
* @param Base$className|null \$v
299+
* @param Base$className \$v
300300
* @return void
301301
* @throws PropelException
302302
*/
@@ -523,10 +523,9 @@ protected function addRefFKGetJoinMethods(&$script, ForeignKey $refFK)
523523
* api reasonable. You can provide public methods for those you
524524
* actually need in ".$table->getPhpName().".
525525
*
526-
* @param Criteria|null \$criteria
527-
* @param Connection|null \$con
526+
* @param Criteria \$criteria
527+
* @param Connection \$con
528528
* @return ".$className."[] $relCol joined with $relCol2
529-
* @throws PropelException
530529
*/
531530
public function get".$relCol."Join".$relCol2."(Criteria \$criteria = null, Connection \$con = null)
532531
{
@@ -715,6 +714,7 @@ protected function addRefFKCount(&$script, ForeignKey $refFK)
715714
* @param boolean \$distinct
716715
* @param Connection \$con
717716
* @return int The number of $relCol
717+
* @throws PropelException
718718
*/
719719
public function count$relCol(\$criteria = null, \$distinct = false, \$con = null)
720720
{
@@ -769,8 +769,9 @@ protected function addRefFKGet(&$script, ForeignKey $refFK)
769769
* an empty collection or the current collection, the criteria
770770
* is ignored on a new object.
771771
*
772-
* @param Connection|null \$con
773-
* @param Criteria|null \$criteria
772+
* @param Connection \$con
773+
* @param Criteria \$criteria
774+
* @throws PropelException
774775
* @return ".$className."[] $relCol
775776
*/
776777
public function get$relCol(\$criteria = null, \$con = null)

lib/vendor/propel-generator/classes/propel/engine/builder/om/php5/PHP5ComplexPeerBuilder.php

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ protected function addDoSelectJoin(&$script)
9797
// the join table will be aliases when
9898
// this table == foreign table
9999
$alias = $fk->getForeignTableName() == $table->getName() ? 'alias' : null;
100-
100+
101101
$joinClassName = $joinTable->getPhpName();
102102

103103
$thisTableObjectBuilder = OMBuilder::getNewObjectBuilder($table);
@@ -244,8 +244,6 @@ protected function addDoCountJoin(&$script)
244244
* @param boolean \$distinct Whether to select only distinct columns (You can also set DISTINCT modifier in Criteria).
245245
* @param Connection \$con
246246
* @return int Number of matching rows.
247-
* @throws PropelException
248-
* @throws SQLException
249247
*/
250248
public static function doCountJoin".$thisTableObjectBuilder->getFKPhpNameAffix($fk, $plural = false)."(Criteria \$criteria, \$distinct = false, \$con = null)
251249
{
@@ -495,8 +493,6 @@ protected function addDoCountJoinAll(&$script)
495493
* @param boolean \$distinct Whether to select only distinct columns (You can also set DISTINCT modifier in Criteria).
496494
* @param Connection \$con
497495
* @return int Number of matching rows.
498-
* @throws PropelException
499-
* @throws SQLException
500496
*/
501497
public static function doCountJoinAll(Criteria \$criteria, \$distinct = false, \$con = null)
502498
{

0 commit comments

Comments
 (0)