Completed
Branch php7.0 (974637)
by Alexander
03:53
created
app/modules/Cms/Model/Javascript.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,8 +1,8 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
-     * @copyright Copyright (c) 2011 - 2014 Aleksandr Torosh (http://wezoom.net)
4
-     * @author Aleksandr Torosh <[email protected]>
5
-     */
3
+ * @copyright Copyright (c) 2011 - 2014 Aleksandr Torosh (http://wezoom.net)
4
+ * @author Aleksandr Torosh <[email protected]>
5
+ */
6 6
 
7 7
 namespace Cms\Model;
8 8
 
Please login to merge, or discard this patch.
app/modules/Cms/Model/Translate.php 3 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -53,7 +53,7 @@
 block discarded – undo
53 53
     {
54 54
         $save = [];
55 55
         $languages = Language::find();
56
-        foreach($languages as $lang) {
56
+        foreach ($languages as $lang) {
57 57
             $save[$lang->getIso()] = [""=>""];
58 58
         }
59 59
 
Please login to merge, or discard this patch.
Doc Comments   +4 added lines, -1 removed lines patch added patch discarded remove patch
@@ -34,6 +34,9 @@  discard block
 block discarded – undo
34 34
         return $translates[$lang];
35 35
     }
36 36
 
37
+    /**
38
+     * @param string $phrase
39
+     */
37 40
     public function findByPhraseAndLang($phrase, $lang = null)
38 41
     {
39 42
         if (!$lang) {
@@ -97,7 +100,7 @@  discard block
 block discarded – undo
97 100
     }
98 101
 
99 102
     /**
100
-     * @param mixed $phrase
103
+     * @param string $phrase
101 104
      */
102 105
     public function setPhrase($phrase)
103 106
     {
Please login to merge, or discard this patch.
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -7,7 +7,6 @@
 block discarded – undo
7 7
 namespace Cms\Model;
8 8
 
9 9
 use Yona\Mvc\Helper\CmsCache;
10
-use Phalcon\DI;
11 10
 use Phalcon\Mvc\Model;
12 11
 
13 12
 class Translate extends Model
Please login to merge, or discard this patch.
app/modules/Sitemap/Controller/IndexController.php 2 patches
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -15,23 +15,23 @@  discard block
 block discarded – undo
15 15
 
16 16
     public function initialize()
17 17
     {
18
-        $this->cacheViewKey =  HOST_HASH . md5('Sitemap\Model\Sitemap');
18
+        $this->cacheViewKey = HOST_HASH . md5('Sitemap\Model\Sitemap');
19 19
 
20 20
         $this->models = [
21 21
             [
22 22
                 'class' => 'Publication',
23 23
                 'model' => 'Publication',
24 24
                 'where' => "", // preview_inner='0'  ,  etc.
25
-                'getLink' => function($model, $lang){
25
+                'getLink' => function ($model, $lang) {
26 26
                     return $this->langUrlCustom([
27 27
                         'for' => 'publication',
28 28
                         'type' => $model->getTypeSlug(),
29 29
                         'slug' => $model->getSlug()], $lang);
30 30
                 }
31
-            ],[
31
+            ], [
32 32
                 'class' => 'Page',
33 33
                 'model' => 'Page',
34
-                'getLink'      => function($model, $lang){
34
+                'getLink'      => function ($model, $lang) {
35 35
                     return $this->langUrlCustom([
36 36
                         'for' => 'page',
37 37
                         'slug' => $model->getSlug()], $lang);
@@ -43,19 +43,19 @@  discard block
 block discarded – undo
43 43
 
44 44
     public function indexAction()
45 45
     {
46
-        $this->view->setRenderLevel( \Phalcon\Mvc\View::LEVEL_NO_RENDER );
46
+        $this->view->setRenderLevel(\Phalcon\Mvc\View::LEVEL_NO_RENDER);
47 47
         $cache = $this->getDi()->get('cache');
48 48
         $sitemap_xml = $cache->get($this->cacheViewKey);
49 49
 
50
-        if(!$sitemap_xml){
50
+        if (!$sitemap_xml) {
51 51
             $langs = Language::find(['columns' => 'iso,primary']);
52 52
 
53 53
             //link(s) for main-page(s)
54
-            foreach ($langs as $lang){
54
+            foreach ($langs as $lang) {
55 55
                 $suffix = !$lang['primary'] ? $lang['iso'] . '/' : '';
56 56
                 $this->links[] = [
57
-                    'url' => 'http://' . $_SERVER['HTTP_HOST'] .  '/' . $suffix,
58
-                    'updated_at' => date('c',time()),
57
+                    'url' => 'http://' . $_SERVER['HTTP_HOST'] . '/' . $suffix,
58
+                    'updated_at' => date('c', time()),
59 59
                 ];
60 60
             }
61 61
 
@@ -68,9 +68,9 @@  discard block
 block discarded – undo
68 68
                 foreach ($langs as $lang) {
69 69
                     foreach ($rows as $row) {
70 70
                         $row::setCustomLang($lang->iso);
71
-                        if($row->getSlug() !== 'index' && $row->getTitle()){
71
+                        if ($row->getSlug() !== 'index' && $row->getTitle()) {
72 72
                             $this->links[] = [
73
-                                'url'        => 'http://' . $_SERVER['HTTP_HOST'] .  $m['getLink']($row, $lang->iso),
73
+                                'url'        => 'http://' . $_SERVER['HTTP_HOST'] . $m['getLink']($row, $lang->iso),
74 74
                                 'updated_at' => date('c', strtotime($row->getUpdatedAt())),
75 75
                             ];
76 76
                         }
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
 
98 98
     private function getRawXml()
99 99
     {
100
-        $this->view->setRenderLevel( \Phalcon\Mvc\View::LEVEL_ACTION_VIEW );
100
+        $this->view->setRenderLevel(\Phalcon\Mvc\View::LEVEL_ACTION_VIEW);
101 101
         $this->view->links = $this->links;
102 102
         $this->view->start();
103 103
         $this->view->setLayoutsDir('../views/');
Please login to merge, or discard this patch.
Braces   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
                 'class' => 'Publication',
23 23
                 'model' => 'Publication',
24 24
                 'where' => "", // preview_inner='0'  ,  etc.
25
-                'getLink' => function($model, $lang){
25
+                'getLink' => function($model, $lang) {
26 26
                     return $this->langUrlCustom([
27 27
                         'for' => 'publication',
28 28
                         'type' => $model->getTypeSlug(),
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
             ],[
32 32
                 'class' => 'Page',
33 33
                 'model' => 'Page',
34
-                'getLink'      => function($model, $lang){
34
+                'getLink'      => function($model, $lang) {
35 35
                     return $this->langUrlCustom([
36 36
                         'for' => 'page',
37 37
                         'slug' => $model->getSlug()], $lang);
@@ -47,11 +47,11 @@  discard block
 block discarded – undo
47 47
         $cache = $this->getDi()->get('cache');
48 48
         $sitemap_xml = $cache->get($this->cacheViewKey);
49 49
 
50
-        if(!$sitemap_xml){
50
+        if(!$sitemap_xml) {
51 51
             $langs = Language::find(['columns' => 'iso,primary']);
52 52
 
53 53
             //link(s) for main-page(s)
54
-            foreach ($langs as $lang){
54
+            foreach ($langs as $lang) {
55 55
                 $suffix = !$lang['primary'] ? $lang['iso'] . '/' : '';
56 56
                 $this->links[] = [
57 57
                     'url' => 'http://' . $_SERVER['HTTP_HOST'] .  '/' . $suffix,
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
                 foreach ($langs as $lang) {
69 69
                     foreach ($rows as $row) {
70 70
                         $row::setCustomLang($lang->iso);
71
-                        if($row->getSlug() !== 'index' && $row->getTitle()){
71
+                        if($row->getSlug() !== 'index' && $row->getTitle()) {
72 72
                             $this->links[] = [
73 73
                                 'url'        => 'http://' . $_SERVER['HTTP_HOST'] .  $m['getLink']($row, $lang->iso),
74 74
                                 'updated_at' => date('c', strtotime($row->getUpdatedAt())),
Please login to merge, or discard this patch.
app/modules/Admin/Model/AdminUser.php 3 patches
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -145,6 +145,9 @@
 block discarded – undo
145 145
         }
146 146
     }
147 147
 
148
+    /**
149
+     * @param integer $active
150
+     */
148 151
     public function setActive($active)
149 152
     {
150 153
         $this->active = $active;
Please login to merge, or discard this patch.
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -6,7 +6,6 @@
 block discarded – undo
6 6
 
7 7
 namespace Admin\Model;
8 8
 use Phalcon\Validation;
9
-use Phalcon\Validation\Validator\Email as EmailValidator;
10 9
 use Phalcon\Validation\Validator\Uniqueness as UniquenessValidator;
11 10
 use stdClass;
12 11
 
Please login to merge, or discard this patch.
Indentation   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -45,20 +45,20 @@
 block discarded – undo
45 45
     public function validation()
46 46
     {
47 47
 
48
-       $validator = new Validation();
49
-       $validator->add('login', new UniquenessValidator(
50
-           [
51
-               "model"   => $this,
52
-               "message" => $this->getDi()->get('helper')->translate("The Login must be unique")
53
-           ]
54
-       ));
55
-       $validator->add('email', new UniquenessValidator(
56
-           [
57
-               "model"   => $this,
58
-               "message" => $this->getDi()->get('helper')->translate("The Email must be unique")
59
-           ]
60
-       ));
61
-       return $this->validate($validator);
48
+        $validator = new Validation();
49
+        $validator->add('login', new UniquenessValidator(
50
+            [
51
+                "model"   => $this,
52
+                "message" => $this->getDi()->get('helper')->translate("The Login must be unique")
53
+            ]
54
+        ));
55
+        $validator->add('email', new UniquenessValidator(
56
+            [
57
+                "model"   => $this,
58
+                "message" => $this->getDi()->get('helper')->translate("The Email must be unique")
59
+            ]
60
+        ));
61
+        return $this->validate($validator);
62 62
     }
63 63
 
64 64
     public function getId()
Please login to merge, or discard this patch.
app/modules/Cms/Model/Language.php 2 patches
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -35,8 +35,8 @@  discard block
 block discarded – undo
35 35
         $validator = new Validation();
36 36
 
37 37
         /**
38
-        * ISO
39
-        */
38
+         * ISO
39
+         */
40 40
         $validator->add('iso', new Uniqueness([
41 41
             'model' => $this,
42 42
             "message" => "The inputted ISO language is existing"
@@ -47,8 +47,8 @@  discard block
 block discarded – undo
47 47
         ]));
48 48
 
49 49
         /**
50
-        * Name
51
-        */
50
+         * Name
51
+         */
52 52
         $validator->add('name', new Uniqueness([
53 53
             'model' => $this,
54 54
             "message" => "The inputted name is existing"
@@ -59,8 +59,8 @@  discard block
 block discarded – undo
59 59
         ]));
60 60
 
61 61
         /**
62
-        * URL
63
-        */
62
+         * URL
63
+         */
64 64
         $validator->add('url', new Uniqueness([
65 65
             'model' => $this,
66 66
             "message" => "The inputted URL is existing"
Please login to merge, or discard this patch.
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -280,7 +280,7 @@
 block discarded – undo
280 280
     }
281 281
 
282 282
     /**
283
-     * @param mixed $primary
283
+     * @param integer $primary
284 284
      */
285 285
     public function setPrimary($primary)
286 286
     {
Please login to merge, or discard this patch.
app/modules/Image/Storage.php 1 patch
Doc Comments   +6 added lines patch added patch discarded remove patch
@@ -350,6 +350,9 @@  discard block
 block discarded – undo
350 350
         $this->saveImage($image, $originalAbsPath);
351 351
     }
352 352
 
353
+    /**
354
+     * @param string $originalAbsPath
355
+     */
353 356
     private function checkOriginalExists($originalAbsPath)
354 357
     {
355 358
         if (!file_exists($originalAbsPath)) {
@@ -362,6 +365,9 @@  discard block
 block discarded – undo
362 365
         }
363 366
     }
364 367
 
368
+    /**
369
+     * @param string $originalAbsPath
370
+     */
365 371
     private function saveImage($image, $originalAbsPath)
366 372
     {
367 373
         // Если оригинал не заблокирован, блокируем. Это необходимо для предотвращения множественной генерации кеш-файла параллельными запросами
Please login to merge, or discard this patch.
app/modules/Publication/Controller/AdminController.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -146,6 +146,9 @@
 block discarded – undo
146 146
         $this->helper->title($this->helper->at('Unpublishing'), true);
147 147
     }
148 148
 
149
+    /**
150
+     * @param Publication|null $model
151
+     */
149 152
     private function uploadImage($model)
150 153
     {
151 154
         if ($this->request->isPost()) {
Please login to merge, or discard this patch.
app/modules/Publication/Model/Type.php 1 patch
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -249,7 +249,7 @@  discard block
 block discarded – undo
249 249
     }
250 250
 
251 251
     /**
252
-     * @return mixed
252
+     * @return integer
253 253
      */
254 254
     public function getLimit()
255 255
     {
@@ -325,7 +325,7 @@  discard block
 block discarded – undo
325 325
     }
326 326
 
327 327
     /**
328
-     * @param mixed $display_date
328
+     * @param integer $display_date
329 329
      */
330 330
     public function setDisplayDate($display_date)
331 331
     {
Please login to merge, or discard this patch.
app/modules/Seo/Plugin/SeoManager.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -35,6 +35,9 @@
 block discarded – undo
35 35
         }
36 36
     }
37 37
 
38
+    /**
39
+     * @param string|null $url
40
+     */
38 41
     private function matchingUrl($url)
39 42
     {
40 43
         $urls = Manager::urls();
Please login to merge, or discard this patch.