| Conditions | 1 |
| Paths | 1 |
| Total Lines | 12 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 40 | public function run(User $user) |
||
| 41 | { |
||
| 42 | |||
| 43 | // create the new record with pending status |
||
| 44 | $timeTracker = new TimeTracker(); |
||
| 45 | $timeTracker->open_at = Carbon::now(); |
||
|
|
|||
| 46 | $timeTracker->status = TimeTracker::PENDING; |
||
| 47 | $timeTracker->user()->associate($user); |
||
| 48 | $timeTracker = $this->timeTrackerRepository->create($timeTracker->toArray()); |
||
| 49 | |||
| 50 | return $timeTracker; |
||
| 51 | } |
||
| 52 | } |
||
| 53 |
Since your code implements the magic setter
_set, this function will be called for any write access on an undefined variable. You can add the@propertyannotation to your class or interface to document the existence of this variable.Since the property has write access only, you can use the @property-write annotation instead.
Of course, you may also just have mistyped another name, in which case you should fix the error.
See also the PhpDoc documentation for @property.