Skip to content

Commit 1ad38c4

Browse files
committed
Update carrier repository by adding the table name as a const
1 parent 7005ce8 commit 1ad38c4

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

classes/Repository/CarrierRepository.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@
2222

2323
class CarrierRepository
2424
{
25+
const TABLE_NAME = 'carrier';
26+
2527
/**
2628
* findByCarrierId
2729
*
@@ -33,7 +35,7 @@ public function findByCarrierId($carrierId)
3335
{
3436
return \Db::getInstance()->getValue(
3537
'SELECT name
36-
FROM `' . _DB_PREFIX_ . 'carrier`
38+
FROM `' . _DB_PREFIX_ . self::TABLE_NAME . '`
3739
WHERE id_carrier = ' . (int) $carrierId
3840
);
3941
}

0 commit comments

Comments
 (0)