Passed
Push — master ( 10220a...9ad793 )
by Mihail
05:11
created
Apps/Model/Admin/Application/FormTurn.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@
 block discarded – undo
12 12
     {
13 13
         $status = $object->disabled;
14 14
 
15
-        $object->disabled = (int)!$status; // magic inside: bool to int and reverse - 0 => 1, 1 => 0
15
+        $object->disabled = (int) !$status; // magic inside: bool to int and reverse - 0 => 1, 1 => 0
16 16
         $object->save();
17 17
     }
18 18
 }
19 19
\ No newline at end of file
Please login to merge, or discard this patch.
Apps/View/Admin/default/widget/turn.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@
 block discarded – undo
31 31
             [['text' => __('Name')], ['text' => $widget->getLocaleName()]],
32 32
             [['text' => __('System name')], ['text' => $widget->sys_name]],
33 33
             [['text' => __('Last update')], ['text' => Date::convertToDatetime($widget->updated_at, DATE::FORMAT_TO_SECONDS)]],
34
-            [['text' => __('Status')], ['text' => ((int)$widget->disabled === 0) ? 'On' : 'Off'], 'property' => ['class' =>  ((int)$widget->disabled === 0) ? 'alert-success' : 'alert-danger']]
34
+            [['text' => __('Status')], ['text' => ((int) $widget->disabled === 0) ? 'On' : 'Off'], 'property' => ['class' =>  ((int) $widget->disabled === 0) ? 'alert-success' : 'alert-danger']]
35 35
         ]
36 36
     ]
37 37
 ]); ?>
Please login to merge, or discard this patch.
Apps/Controller/Admin/Widget.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
         $search = \Apps\ActiveRecord\App::getItem('app', $controller);
72 72
 
73 73
         // check what we got
74
-        if ($search === null || (int)$search->id < 1) {
74
+        if ($search === null || (int) $search->id < 1) {
75 75
             throw new ForbiddenException('App is not founded');
76 76
         }
77 77
 
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
 
97 97
         $search = \Apps\ActiveRecord\App::where('sys_name', '=', $controllerName)->where('type', '=', 'app')->first();
98 98
 
99
-        if ($search === null || (int)$search->id < 1) {
99
+        if ($search === null || (int) $search->id < 1) {
100 100
             throw new ForbiddenException('App is not founded');
101 101
         }
102 102
 
Please login to merge, or discard this patch.
Apps/View/Admin/default/comments/_tabs.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -9,4 +9,4 @@
 block discarded – undo
9 9
         ['type' => 'link', 'text' => __('Group management'), 'link' => ['user/grouplist']],
10 10
         ['type' => 'link', 'text' => __('Settings'), 'link' => ['user/settings']]
11 11
     ]
12
-]);?>
13 12
\ No newline at end of file
13
+]); ?>
14 14
\ No newline at end of file
Please login to merge, or discard this patch.
Apps/Model/Front/Feedback/FormFeedbackAdd.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@
 block discarded – undo
20 20
 
21 21
     public function __construct($captcha = true)
22 22
     {
23
-        $this->_useCaptcha = (bool)$captcha;
23
+        $this->_useCaptcha = (bool) $captcha;
24 24
         parent::__construct();
25 25
     }
26 26
 
Please login to merge, or discard this patch.
Apps/View/Admin/default/feedback/_tabs.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -9,4 +9,4 @@
 block discarded – undo
9 9
         ['type' => 'link', 'text' => __('Group management'), 'link' => ['user/grouplist']],
10 10
         ['type' => 'link', 'text' => __('Settings'), 'link' => ['user/settings']]
11 11
     ]
12
-]);?>
13 12
\ No newline at end of file
13
+]); ?>
14 14
\ No newline at end of file
Please login to merge, or discard this patch.
Apps/View/Admin/default/comments/delete.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -32,8 +32,8 @@
 block discarded – undo
32 32
 foreach ($records as $item) {
33 33
     $message = Str::sub(\App::$Security->strip_tags($item->message), 0, 50);
34 34
     $author = Simplify::parseUserNick($item->user_id, $item->guest_name);
35
-    if ((int)$item->user_id > 0) {
36
-        $author = Url::link(['user/update', (int)$item->user_id], $author);
35
+    if ((int) $item->user_id > 0) {
36
+        $author = Url::link(['user/update', (int) $item->user_id], $author);
37 37
     }
38 38
     
39 39
     
Please login to merge, or discard this patch.
Apps/Model/Api/Content/ContentRatingChange.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
         App::$Session->set('content.rate.ignore', $ignored);
65 65
         
66 66
         // save rating changes to database
67
-        switch($this->_type) {
67
+        switch ($this->_type) {
68 68
             case 'plus':
69 69
                 $this->_content->rating += 1;
70 70
                 break;
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
         $this->_content->save();
77 77
         
78 78
         // update content author rating
79
-        $authorId = (int)$this->_content->author_id;
79
+        $authorId = (int) $this->_content->author_id;
80 80
         if ($authorId > 0 && App::$User->isExist($authorId)) {
81 81
             $authorObject = App::$User->identity($authorId);
82 82
             if ($authorObject !== null) {
Please login to merge, or discard this patch.
Apps/Model/Admin/Newcontent/FormSettings.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -30,8 +30,8 @@  discard block
 block discarded – undo
30 30
     public function before()
31 31
     {
32 32
         $this->categories = Serialize::decode($this->_configs['categories']);
33
-        $this->count = (int)$this->_configs['count'];
34
-        $this->cache = (int)$this->_configs['cache'];
33
+        $this->count = (int) $this->_configs['count'];
34
+        $this->cache = (int) $this->_configs['cache'];
35 35
     }
36 36
 
37 37
     /**
@@ -64,8 +64,8 @@  discard block
 block discarded – undo
64 64
     public function getResult()
65 65
     {
66 66
         return [
67
-            'count' => (int)$this->count,
68
-            'cache' => (int)$this->cache,
67
+            'count' => (int) $this->count,
68
+            'cache' => (int) $this->cache,
69 69
             'categories' => Serialize::encode($this->categories)
70 70
         ];
71 71
     }
Please login to merge, or discard this patch.