Browse Source

made getIdExpression private

ausi 13 năm trước cách đây
mục cha
commit
959fe6ea04

+ 3 - 3
lib/Gedmo/Tree/Entity/Repository/NestedTreeRepository.php

@@ -1075,12 +1075,12 @@ class NestedTreeRepository extends AbstractTreeRepository
      * @param integer|string $id
      * @return string
      */
-    public function getIdExpression($id)
+    private function getIdExpression($id)
     {
-        if(is_string($id)){
+        if (is_string($id)) {
             $id = $this->_em->getExpressionBuilder()->literal($id);
         }
-        if($id === null){
+        if ($id === null) {
             $id = 'NULL';
         }
         return (string)$id;

+ 3 - 3
lib/Gedmo/Tree/Strategy/ORM/Nested.php

@@ -94,12 +94,12 @@ class Nested implements Strategy
      * @param EntityManager $em
      * @return string
      */
-    public function getIdExpression($id, EntityManager $em)
+    private function getIdExpression($id, EntityManager $em)
     {
-        if(is_string($id)){
+        if (is_string($id)) {
             $id = $em->getExpressionBuilder()->literal($id);
         }
-        if($id === null){
+        if ($id === null) {
             $id = 'NULL';
         }
         return (string)$id;