Class method
ViewAcceptedOrders()
doesn't comply with the PSR standard14class SupplierOrdersController extends Controller
15{
16
17 public function ViewAcceptedOrders()18 {
19 $order = new PharmacyOrderModel;
20 $med = new MedicineModel;
Class method
Orders()
doesn't comply with the PSR standard103 }
104 }
105
106 public function Orders(Request $request)107 {
108 if ($_SESSION['userType'] == 'supplier') {
109
Description
As per PSR-1, class methods must be declared in the camelCase
.
It is recommended that you follow PSR standards while developing PHP applications so the code is consistent and can be easily maintained.
Bad practice
class User
{
// invalid: class methods can't be defined in PascalCase
public function GetUser(): array
{
// method implementation here
}
}
Recommended
class User
{
public function getUser(): array
{
// method implementation here
}
}