Completed
Pull Request — master (#70)
by
unknown
02:44
created
app/modules/Publication/Model/Publication.php 1 patch
Indentation   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -62,14 +62,14 @@  discard block
 block discarded – undo
62 62
 
63 63
     public function validation()
64 64
     {
65
-      $validator = new Validation();
66
-      $validator->add('slug', new UniquenessValidator(
67
-          [
68
-              "model"   => $this,
69
-              "message" => $this->getDi()->get('helper')->translate("Publishcation with slug is already exists")
70
-          ]
71
-      ));
72
-      return $this->validate($validator);
65
+        $validator = new Validation();
66
+        $validator->add('slug', new UniquenessValidator(
67
+            [
68
+                "model"   => $this,
69
+                "message" => $this->getDi()->get('helper')->translate("Publishcation with slug is already exists")
70
+            ]
71
+        ));
72
+        return $this->validate($validator);
73 73
     }
74 74
 
75 75
     public function afterValidation()
@@ -93,8 +93,8 @@  discard block
 block discarded – undo
93 93
     public static function findCachedBySlug($slug)
94 94
     {
95 95
         $slugRecord = Translate\PublicationTranslate::findFirst([
96
-          "key = 'slug' and value = '$slug'",
97
-          'cache' => [
96
+            "key = 'slug' and value = '$slug'",
97
+            'cache' => [
98 98
             'key'      => self::cacheSlugKey($slug),
99 99
             'lifetime' => 60
100 100
         ]]);
@@ -103,8 +103,8 @@  discard block
 block discarded – undo
103 103
             'conditions' => 'id = :idPost:',
104 104
             'bind' => ['idPost' => $slugRecord->foreign_id],
105 105
             'cache' => [
106
-              'key'       => self::cacheSlugKey($slug . 'original'),
107
-              'lifetime'  => 60
106
+                'key'       => self::cacheSlugKey($slug . 'original'),
107
+                'lifetime'  => 60
108 108
             ]
109 109
         ]);
110 110
 
Please login to merge, or discard this patch.
app/modules/Application/Mvc/Helper/LangSwitcher.php 1 patch
Upper-Lower-Casing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -82,8 +82,8 @@
 block discarded – undo
82 82
         // query moudle entity id.
83 83
         $query = "key = 'slug' and value = '$curSLug'";
84 84
         $modelName = \Phalcon\Text::camelize($module);
85
-        $modelTranslateName = "{$modelName}Translate";
86
-        $translateModel = "{$modelName}\Model\Translate\\{$modelName}Translate";
85
+        $modelTranslateName = "{$modelName}translate";
86
+        $translateModel = "{$modelName}\Model\Translate\\{$modelName}translate";
87 87
         $slugRecord = $translateModel::findFirst([$query]);
88 88
         // query all slug.
89 89
         $mlSlug = $translateModel::findFirst([
Please login to merge, or discard this patch.
app/modules/Page/Model/Page.php 1 patch
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -54,14 +54,14 @@
 block discarded – undo
54 54
 
55 55
     public function validation()
56 56
     {
57
-      $validator = new Validation();
58
-      $validator->add('slug', new UniquenessValidator(
59
-          [
60
-              "model"   => $this,
61
-              "message" => $this->getDi()->get('helper')->translate("Page with slug is already exists")
62
-          ]
63
-      ));
64
-      return $this->validate($validator);
57
+        $validator = new Validation();
58
+        $validator->add('slug', new UniquenessValidator(
59
+            [
60
+                "model"   => $this,
61
+                "message" => $this->getDi()->get('helper')->translate("Page with slug is already exists")
62
+            ]
63
+        ));
64
+        return $this->validate($validator);
65 65
     }
66 66
 
67 67
     public static function findCachedBySlug($slug)
Please login to merge, or discard this patch.