These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more
1 | <?php |
||
2 | |||
3 | use Illuminate\Support\Facades\Schema; |
||
4 | use Illuminate\Database\Schema\Blueprint; |
||
5 | use Illuminate\Database\Migrations\Migration; |
||
6 | |||
7 | class CreateMojoPaymentDetailsTable extends Migration |
||
8 | { |
||
9 | /** |
||
10 | * Run the migrations. |
||
11 | * |
||
12 | * @return void |
||
13 | */ |
||
14 | public function up() |
||
15 | { |
||
16 | Schema::create('mojo_payment_details', function (Blueprint $table) { |
||
17 | $table->increments('id'); |
||
18 | $table->integer('user_id')->unsigned(); |
||
19 | $table->foreign('user_id')->references('id')->on('users'); |
||
0 ignored issues
–
show
|
|||
20 | $table->string('buyer_email'); |
||
21 | $table->string('buyer_name'); |
||
22 | $table->string('buyer_phone'); |
||
23 | $table->string('currency'); |
||
24 | $table->string('amount'); |
||
25 | $table->string('fees'); |
||
26 | $table->string('longurl'); |
||
27 | $table->string('payment_id'); |
||
28 | $table->string('payment_request_id'); |
||
29 | $table->string('purpose'); |
||
30 | $table->string('shorturl')->nullable(); |
||
31 | $table->string('request_status'); |
||
32 | $table->string('payment_status'); |
||
33 | $table->timestamps(); |
||
34 | }); |
||
35 | } |
||
36 | |||
37 | /** |
||
38 | * Reverse the migrations. |
||
39 | * |
||
40 | * @return void |
||
41 | */ |
||
42 | public function down() |
||
43 | { |
||
44 | Schema::dropIfExists('mojo_payment_details'); |
||
45 | } |
||
46 | } |
||
47 |
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: