File tree Expand file tree Collapse file tree 3 files changed +29
-6
lines changed Expand file tree Collapse file tree 3 files changed +29
-6
lines changed Original file line number Diff line number Diff line change @@ -222,5 +222,28 @@ function createTable ($name, $data) {
222222 exit ;
223223}
224224
225+ if (!user::byId (1 ) instanceof user)
226+ echo "wrong return type1 " ;
227+
228+ if (!is_array (user::ArrayBuilder ()->byId (1 )))
229+ echo "wrong return type2 " ;
230+
231+ if (!is_array (product::join ('user ' )->orderBy ('products.id ' , 'desc ' )->get (2 )))
232+ echo "wrong return type2 " ;
233+
234+ if (!is_array (product::orderBy ('products.id ' , 'desc ' )->join ('user ' )->get (2 )))
235+ echo "wrong return type2 " ;
236+
237+ $ u = new user ;
238+ if (!$ u ->byId (1 ) instanceof user)
239+ echo "wrong return type2 " ;
240+
241+ $ p = new product ;
242+ if (!is_array ($ p ->join ('user ' )->orderBy ('products.id ' , 'desc ' )->get (2 )))
243+ echo "wrong return type2 " ;
244+
245+ if (!is_array ($ p ->orderBy ('products.id ' , 'desc ' )->join ('user ' )->get (2 )))
246+ echo "wrong return type2 " ;
247+
225248echo "All done " ;
226249?>
Original file line number Diff line number Diff line change 44/**
55 * To make IDEs autocomplete happy
66 *
7- * @property string id
8- * @property string userid
9- * @property string customerId
7+ * @property int id
8+ * @property int userid
9+ * @property int customerId
1010 * @property string productName
1111 */
1212class product extends dbObject {
Original file line number Diff line number Diff line change 44/**
55 * To make IDEs autocomplete happy
66 *
7- * @property string id
7+ * @property int id
88 * @property string login
9- * @property string active
9+ * @property bool active
1010 * @property string customerId
1111 * @property string firstName
1212 * @property string lastName
1313 * @property string password
1414 * @property string createdAt
1515 * @property string updatedAt
1616 * @property string expires
17- * @property string loginCount
17+ * @property int loginCount
1818 */
1919class user extends dbObject {
2020 protected $ dbTable = "users " ;
You can’t perform that action at this time.
0 commit comments