File tree Expand file tree Collapse file tree 1 file changed +18
-6
lines changed Expand file tree Collapse file tree 1 file changed +18
-6
lines changed Original file line number Diff line number Diff line change @@ -140,7 +140,7 @@ public function defaults($value)
140
140
*/
141
141
public function exists ()
142
142
{
143
- $ this ->context -> assertTrue (
143
+ $ this ->assertTrue (
144
144
$ this ->table ->hasColumn ($ this ->name ), "The table column ` {$ this ->name }` does not exist. "
145
145
);
146
146
@@ -154,11 +154,9 @@ public function exists()
154
154
*/
155
155
public function increments ()
156
156
{
157
- $ this ->integer ()->context ->assertTrue (
158
- $ this ->get ('autoincrement ' ), "The column {$ this ->name } is not auto-incremented. "
159
- );
160
-
161
- return $ this ->primary ();
157
+ return $ this ->integer ()
158
+ ->assertTrue ($ this ->get ('autoincrement ' ), "The column {$ this ->name } is not auto-incremented. " )
159
+ ->primary ();
162
160
}
163
161
164
162
/**
@@ -272,6 +270,20 @@ protected function assertColumn($method, $args)
272
270
throw new \Exception ("The database table column assertion {$ method } does not exist. " );
273
271
}
274
272
273
+ /**
274
+ * Assert a condition is true alias.
275
+ *
276
+ * @param bool $condition
277
+ * @param string $message
278
+ * @return $this
279
+ */
280
+ protected function assertTrue ($ condition , $ message )
281
+ {
282
+ $ this ->context ->assertTrue ($ condition , $ message );
283
+
284
+ return $ this ;
285
+ }
286
+
275
287
/**
276
288
* Assert a key is a unique index.
277
289
*
You can’t perform that action at this time.
0 commit comments