| Conditions | 1 |
| Paths | 1 |
| Total Lines | 19 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 14 | public function up() |
||
| 15 | { |
||
| 16 | Schema::create('mpesa_stk_callbacks', function (Blueprint $table) { |
||
| 17 | $table->increments('id'); |
||
| 18 | $table->string('MerchantRequestID')->index(); |
||
| 19 | $table->string('CheckoutRequestID')->index(); |
||
| 20 | $table->integer('ResultCode'); |
||
| 21 | $table->string('ResultDesc'); |
||
| 22 | $table->double('Amount', 10, 2)->nullable(); |
||
| 23 | $table->string('MpesaReceiptNumber')->nullable(); |
||
| 24 | $table->string('Balance')->nullable()->nullable(); |
||
| 25 | $table->string('TransactionDate')->nullable(); |
||
| 26 | $table->string('PhoneNumber')->nullable(); |
||
| 27 | $table->timestamps(); |
||
| 28 | $table->foreign('CheckoutRequestID') |
||
|
|
|||
| 29 | ->references('CheckoutRequestID') |
||
| 30 | ->on('mpesa_stk_requests')->onDelete('cascade')->onUpdate('cascade'); |
||
| 31 | }); |
||
| 32 | } |
||
| 33 | |||
| 44 |
It seems like the method you are trying to call exists only in some of the possible types.
Let’s take a look at an example:
Available Fixes
Add an additional type-check:
Only allow a single type to be passed if the variable comes from a parameter: