@@ -460,7 +460,7 @@ public static function loadCollection(xPDO & $xpdo, $className, $criteria= null,
460460 if (!$ className = $ xpdo ->loadClass ($ className )) return $ objCollection ;
461461 $ rows = false ;
462462 $ fromCache = false ;
463- $ collectionCaching = (integer ) $ xpdo ->getOption (xPDO::OPT_CACHE_DB_COLLECTIONS , array (), 1 );
463+ $ collectionCaching = (int ) $ xpdo ->getOption (xPDO::OPT_CACHE_DB_COLLECTIONS , array (), 1 );
464464 if (!is_object ($ criteria )) {
465465 $ criteria = $ xpdo ->getCriteria ($ className , $ criteria , $ cacheFlag );
466466 }
@@ -516,7 +516,7 @@ public static function loadCollectionGraph(xPDO & $xpdo, $className, $graph, $cr
516516 $ query ->bindGraph ($ graph );
517517 $ rows = array ();
518518 $ fromCache = false ;
519- $ collectionCaching = (integer ) $ xpdo ->getOption (xPDO::OPT_CACHE_DB_COLLECTIONS , array (), 1 );
519+ $ collectionCaching = (int ) $ xpdo ->getOption (xPDO::OPT_CACHE_DB_COLLECTIONS , array (), 1 );
520520 if ($ collectionCaching > 0 && $ xpdo ->_cacheEnabled && $ cacheFlag ) {
521521 $ rows = $ xpdo ->fromCache ($ query );
522522 $ fromCache = !empty ($ rows );
@@ -797,7 +797,7 @@ public function set($k, $v= null, $vType= '') {
797797 //type validation
798798 $ phptype = $ this ->_fieldMeta [$ k ]['phptype ' ];
799799 $ dbtype = $ this ->_fieldMeta [$ k ]['dbtype ' ];
800- $ allowNull = isset ($ this ->_fieldMeta [$ k ]['null ' ]) ? (boolean ) $ this ->_fieldMeta [$ k ]['null ' ] : true ;
800+ $ allowNull = isset ($ this ->_fieldMeta [$ k ]['null ' ]) ? (bool ) $ this ->_fieldMeta [$ k ]['null ' ] : true ;
801801 if ($ v === null ) {
802802 if ($ allowNull ) {
803803 $ this ->_fields [$ k ]= null ;
@@ -813,7 +813,7 @@ public function set($k, $v= null, $vType= '') {
813813 $ ts = false ;
814814 if (preg_match ('/int/i ' , $ dbtype )) {
815815 if (strtolower ($ vType ) == 'integer ' || is_int ($ v ) || $ v == '0 ' ) {
816- $ ts = (integer ) $ v ;
816+ $ ts = (int ) $ v ;
817817 } else {
818818 $ ts = strtotime ($ v );
819819 }
@@ -842,7 +842,7 @@ public function set($k, $v= null, $vType= '') {
842842 case 'date ' :
843843 if (preg_match ('/int/i ' , $ dbtype )) {
844844 if (strtolower ($ vType ) == 'integer ' || is_int ($ v ) || $ v == '0 ' ) {
845- $ ts = (integer ) $ v ;
845+ $ ts = (int ) $ v ;
846846 } else {
847847 $ ts = strtotime ($ v );
848848 }
@@ -974,7 +974,7 @@ public function get($k, $format = null, $formatTemplate= null) {
974974 if ($ value !== null ) {
975975 switch ($ fieldType ) {
976976 case 'boolean ' :
977- $ value = (boolean ) $ value ;
977+ $ value = (bool ) $ value ;
978978 break ;
979979 case 'integer ' :
980980 $ value = intval ($ value );
@@ -1707,8 +1707,8 @@ public function remove(array $ancestors= array ()) {
17071707 array (
17081708 xPDO::OPT_CACHE_KEY => $ this ->getOption ('cache_db_key ' , null , 'db ' ),
17091709 xPDO::OPT_CACHE_HANDLER => $ this ->getOption (xPDO::OPT_CACHE_DB_HANDLER , null , $ this ->getOption (xPDO::OPT_CACHE_HANDLER , null , 'xPDO \\Cache \\xPDOFileCache ' )),
1710- xPDO::OPT_CACHE_FORMAT => (integer ) $ this ->getOption ('cache_db_format ' , null , $ this ->getOption (xPDO::OPT_CACHE_FORMAT , null , xPDOCacheManager::CACHE_PHP )),
1711- xPDO::OPT_CACHE_EXPIRES => (integer ) $ this ->getOption (xPDO::OPT_CACHE_DB_EXPIRES , null , $ this ->getOption (xPDO::OPT_CACHE_EXPIRES , null , 0 )),
1710+ xPDO::OPT_CACHE_FORMAT => (int ) $ this ->getOption ('cache_db_format ' , null , $ this ->getOption (xPDO::OPT_CACHE_FORMAT , null , xPDOCacheManager::CACHE_PHP )),
1711+ xPDO::OPT_CACHE_EXPIRES => (int ) $ this ->getOption (xPDO::OPT_CACHE_DB_EXPIRES , null , $ this ->getOption (xPDO::OPT_CACHE_EXPIRES , null , 0 )),
17121712 xPDO::OPT_CACHE_PREFIX => $ this ->getOption ('cache_db_prefix ' , null , xPDOCacheManager::CACHE_DIR )
17131713 )
17141714 );
@@ -2402,7 +2402,7 @@ public function setDirty($key= '') {
24022402 * the database.
24032403 */
24042404 public function isNew () {
2405- return (boolean ) $ this ->_new ;
2405+ return (bool ) $ this ->_new ;
24062406 }
24072407
24082408 /**
@@ -2481,7 +2481,7 @@ protected function _setRaw($key, $val) {
24812481 case 'int ' :
24822482 case 'integer ' :
24832483 case 'boolean ' :
2484- $ this ->_fields [$ key ] = (integer ) $ val ;
2484+ $ this ->_fields [$ key ] = (int ) $ val ;
24852485 $ set = true ;
24862486 break ;
24872487 case 'float ' :
@@ -2519,7 +2519,7 @@ protected function _setRaw($key, $val) {
25192519 case 'datetime ' :
25202520 case 'timestamp ' :
25212521 if (preg_match ('/int/i ' , $ dbtype )) {
2522- $ this ->_fields [$ key ] = (integer ) $ val ;
2522+ $ this ->_fields [$ key ] = (int ) $ val ;
25232523 $ set = true ;
25242524 break ;
25252525 }
0 commit comments