Skip to content

Commit 1207ad5

Browse files
fix: duplicate variable name
1 parent 7c6fa2d commit 1207ad5

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

src/abstract/controller.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ abstract class Controller {
1212
private $data;
1313

1414
/** Model Class Object */
15-
private $model;
15+
protected $model;
1616

1717
/** Abstract Function for Set Model Class Object */
1818
abstract protected function setModel();

src/api/category/controller.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,15 @@
77

88
class Controller extends AbstractController {
99

10-
public function __construct(private Model $model) {
10+
public function __construct(private Model $_model) {
1111
parent::__construct();
1212
}
1313

1414
protected function setModel() {
15-
return $this->model;
15+
return $this->_model;
1616
}
1717

1818
protected function setData() {
19-
return $this->model->findAll();
19+
return $this->_model->findAll();
2020
}
2121
}

src/api/user/controller.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,15 @@
77

88
class Controller extends AuthController {
99

10-
public function __construct(protected Model $model) {
10+
public function __construct(protected Model $_model) {
1111
parent::__construct();
1212
}
1313

1414
protected function setModel() {
15-
return $this->model;
15+
return $this->_model;
1616
}
1717

1818
protected function setData() {
19-
return $this->model->findAll();
19+
return $this->_model->findAll();
2020
}
2121
}

0 commit comments

Comments
 (0)