| Conditions | 1 |
| Paths | 1 |
| Total Lines | 22 |
| Code Lines | 15 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 27 | protected function populateStub($name, $stub, $migrations) |
||
| 28 | { |
||
| 29 | $stub = str_replace('DummyClass', $this->getClassName($name), $stub); |
||
| 30 | |||
| 31 | $up = collect($migrations)->map(function ($migration) { |
||
| 32 | return <<<UP |
||
| 33 | Schema::table('{$migration['table']}', function (Blueprint \$table) { |
||
| 34 | \$table->string('{$migration['column']}', {$migration['length']})->nullable(); |
||
| 35 | }); |
||
| 36 | UP; |
||
| 37 | })->implode(PHP_EOL); |
||
| 38 | |||
| 39 | $down = collect($migrations)->map(function ($migration) { |
||
| 40 | return <<<DOWN |
||
| 41 | Schema::table('{$migration['table']}', function (Blueprint \$table) { |
||
| 42 | \$table->dropColumn('{$migration['column']}'); |
||
| 43 | }); |
||
| 44 | DOWN; |
||
| 45 | })->implode(PHP_EOL); |
||
| 46 | |||
| 47 | return str_replace(['up_placeholder', 'down_placeholder'], [$up, $down], $stub); |
||
| 48 | } |
||
| 49 | } |
||
| 50 |
This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.
Consider the following example. The parameter
$italyis not defined by the methodfinale(...).The most likely cause is that the parameter was removed, but the annotation was not.