migrations/m160706_223500_vote_updates.php
TODO found Open
Open
//TODO: check these command and fix migration
- Exclude checks
Avoid using short method names like m160706_223500_vote_updates::up(). The configured minimum method name length is 3. Open
Open
public function up()
{
$this->createIndex('vote_target_user_idx', '{{%vote}}', ['entity', 'target_id', 'user_id'], false);
$this->alterColumn('{{%vote}}', 'value', $this->boolean()->notNull());
- Read upRead up
- Exclude checks
ShortMethodName
Since: 0.2
Detects when very short method names are used.
Example
class ShortMethod {
public function a( $index ) { // Violation
}
}
Source https://phpmd.org/rules/naming.html#shortmethodname
The class m160706_223500_vote_updates is not named in CamelCase. Open
Open
class m160706_223500_vote_updates extends Migration
{
public function up()
{
$this->createIndex('vote_target_user_idx', '{{%vote}}', ['entity', 'target_id', 'user_id'], false);
- Read upRead up
- Exclude checks
CamelCaseClassName
Since: 0.2
It is considered best practice to use the CamelCase notation to name classes.
Example
class class_name {
}