1 | <?php |
||
20 | class Enrollment extends Model implements Transformable |
||
21 | { |
||
22 | //afegim model stateful per als models que volem qeu tinguin estat, com en el name per als noms. Afegir columna state ala migracio de l'objecte(i ens dira com esta l'objecte de la taula(open,closed,etc), es configurable. state amb nullabel si pot ser que no es guarde |
||
23 | use TransformableTrait,Nameable, RecordsActivity;//StatefulTrait; |
||
24 | |||
25 | //public $timestamps = false; |
||
|
|||
26 | //all camps |
||
27 | protected $fillable = ['id','name','validated','finished', 'user_id', 'study_id','course_id','classroom_id']; |
||
28 | //TODO: mirar estats (enrollment). Implementar i definir estats(exemple porta(esborrany,valida,feta). |
||
29 | //TODO: Necessari vàlid i no. |
||
30 | //TODO: Afegir rutes minim a un Model. |
||
31 | |||
32 | protected $events = [ |
||
33 | 'created' => EnrollmentCreated::class |
||
34 | ]; |
||
35 | |||
36 | /** |
||
37 | * @return \Illuminate\Database\Eloquent\Relations\BelongsTo |
||
38 | */ |
||
39 | public function user() |
||
43 | |||
44 | /** |
||
45 | * @return \Illuminate\Database\Eloquent\Relations\HasOne |
||
46 | */ |
||
47 | public function classroom() |
||
51 | |||
52 | public function course() |
||
56 | |||
57 | public function study() |
||
61 | |||
62 | |||
63 | // /** |
||
64 | // * @return \Illuminate\Database\Eloquent\Relations\HasOne |
||
65 | // */ |
||
66 | // public function enrollment() |
||
67 | // { |
||
68 | // return $this->hasOne("Scool\EnrollmentMobile\Classroom"); |
||
69 | // } |
||
70 | } |
||
71 |
Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.
The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.
This check looks for comments that seem to be mostly valid code and reports them.