Passed
Push — master ( 28a360...d194a0 )
by Mihail
11:20
created
Apps/Model/Console/ArchBuilder.php 2 patches
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -10,6 +10,9 @@
 block discarded – undo
10 10
 {
11 11
     public $message;
12 12
 
13
+    /**
14
+     * @param string $type
15
+     */
13 16
     public function createObject($name, $type)
14 17
     {
15 18
         $singleName = false;
Please login to merge, or discard this patch.
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -29,8 +29,8 @@  discard block
 block discarded – undo
29 29
         $objectTemplate = null;
30 30
 
31 31
         if ($singleName) {
32
-            $objectDirPath = root . '/Apps/' . $type . '/';
33
-            $objectNamespace = 'Apps\\' . $type;
32
+            $objectDirPath = root.'/Apps/'.$type.'/';
33
+            $objectNamespace = 'Apps\\'.$type;
34 34
             $objectName = ucfirst($name);
35 35
         } else {
36 36
             $split = explode('/', $name);
@@ -47,46 +47,46 @@  discard block
 block discarded – undo
47 47
             }
48 48
             
49 49
             if ($type === 'Widget') {
50
-                $objectDirPath = root . '/Widgets/' . $workground;
51
-                $objectNamespace = 'Widgets\\' . $workground;
50
+                $objectDirPath = root.'/Widgets/'.$workground;
51
+                $objectNamespace = 'Widgets\\'.$workground;
52 52
             } else {
53
-                $objectDirPath = root . '/Apps/' . $type . '/' . $workground;
54
-                $objectNamespace = 'Apps\\' . $type . '\\' . $workground;
53
+                $objectDirPath = root.'/Apps/'.$type.'/'.$workground;
54
+                $objectNamespace = 'Apps\\'.$type.'\\'.$workground;
55 55
             }
56 56
             
57 57
             if (false !== $subName) {
58
-                $objectDirPath .= '/' . implode('/', $subName);
59
-                $objectNamespace .= '\\' . implode('\\', $subName);
58
+                $objectDirPath .= '/'.implode('/', $subName);
59
+                $objectNamespace .= '\\'.implode('\\', $subName);
60 60
             }
61 61
 
62 62
 
63 63
             // try to find workground-based controller
64
-            if (File::exist('/Private/Carcase/' . $workground . '/' . $type . '.tphp')) {
65
-                $objectTemplate = File::read('/Private/Carcase/' . $workground . '/' . $type . '.tphp');
64
+            if (File::exist('/Private/Carcase/'.$workground.'/'.$type.'.tphp')) {
65
+                $objectTemplate = File::read('/Private/Carcase/'.$workground.'/'.$type.'.tphp');
66 66
             }
67 67
         }
68 68
 
69 69
         if (!Directory::exist($objectDirPath) && !Directory::create($objectDirPath)) {
70
-            $this->message = 'Directory could not be created: ' . $objectDirPath;
70
+            $this->message = 'Directory could not be created: '.$objectDirPath;
71 71
             return false;
72 72
         }
73 73
 
74 74
         if ($objectTemplate === null) {
75
-            $objectTemplate = File::read('/Private/Carcase/' . $type . '.tphp');
75
+            $objectTemplate = File::read('/Private/Carcase/'.$type.'.tphp');
76 76
             if (false === $objectTemplate) {
77
-                $this->message = 'Php template file is not founded: /Private/Carcase/' . $type . '.tphp';
77
+                $this->message = 'Php template file is not founded: /Private/Carcase/'.$type.'.tphp';
78 78
                 return false;
79 79
             }
80 80
         }
81 81
 
82 82
         $objectContent = Str::replace(['%namespace%', '%name%'], [$objectNamespace, $objectName], $objectTemplate);
83
-        $objectFullPath = $objectDirPath . '/' . $objectName . '.php';
83
+        $objectFullPath = $objectDirPath.'/'.$objectName.'.php';
84 84
         if (File::exist($objectFullPath)) {
85
-            $this->message = $type . ' is always exist: ' . $objectFullPath;
85
+            $this->message = $type.' is always exist: '.$objectFullPath;
86 86
             return false;
87 87
         }
88 88
         File::write($objectFullPath, $objectContent);
89
-        $this->message = $type . ' template was created: [' . $objectName . '] in path: ' . Str::replace(root, '', $objectDirPath);
89
+        $this->message = $type.' template was created: ['.$objectName.'] in path: '.Str::replace(root, '', $objectDirPath);
90 90
         return true;
91 91
     }
92 92
 }
93 93
\ No newline at end of file
Please login to merge, or discard this patch.
Apps/Model/Admin/User/FormUserUpdate.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -98,7 +98,7 @@
 block discarded – undo
98 98
                 if ($this->newpassword !== null && Str::length($this->newpassword) >= 3) {
99 99
                     $this->_user->password = App::$Security->password_hash($this->newpassword);
100 100
                 }
101
-            } elseif($property === 'approve_token') {
101
+            } elseif ($property === 'approve_token') {
102 102
                 if ($value == "1") {
103 103
                     $this->_user->approve_token = '0';
104 104
                 } else {
Please login to merge, or discard this patch.
Apps/Model/Front/Profile/FormIgnoreAdd.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -52,7 +52,7 @@
 block discarded – undo
52 52
     public function save()
53 53
     {
54 54
         // check if target is myself or always exist in block list
55
-        if ($this->_user->getId() === (int)$this->id || Blacklist::have($this->_user->getId(), $this->id)) {
55
+        if ($this->_user->getId() === (int) $this->id || Blacklist::have($this->_user->getId(), $this->id)) {
56 56
             return false;
57 57
         }
58 58
 
Please login to merge, or discard this patch.
Apps/View/Admin/default/application/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' => $app->getLocaleName()]],
32 32
             [['text' => __('System name')], ['text' => $app->sys_name]],
33 33
             [['text' => __('Last update')], ['text' => Date::convertToDatetime($app->updated_at, DATE::FORMAT_TO_SECONDS)]],
34
-            [['text' => __('Status')], ['text' => ((int)$app->disabled === 0) ? 'On' : 'Off'], 'property' => ['class' =>  ((int)$app->disabled === 0) ? 'alert-success' : 'alert-danger']]
34
+            [['text' => __('Status')], ['text' => ((int) $app->disabled === 0) ? 'On' : 'Off'], 'property' => ['class' =>  ((int) $app->disabled === 0) ? 'alert-success' : 'alert-danger']]
35 35
         ]
36 36
     ]
37 37
 ]); ?>
Please login to merge, or discard this patch.
Apps/View/Admin/default/user/_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.
Private/Config/Permissions.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
1 1
 <?php 
2 2
 
3
-return array (
3
+return array(
4 4
   0 => 'global/write',
5 5
   1 => 'global/modify',
6 6
   2 => 'global/file',
Please login to merge, or discard this patch.
Apps/View/Admin/default/content/_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/profile/_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/Admin/Main/EntityDeleteRoute.php 2 patches
Doc Comments   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -18,9 +18,9 @@
 block discarded – undo
18 18
 
19 19
     /**
20 20
      * EntityDeleteRoute constructor. Pass parameters from controller
21
-     * @param null $type
22
-     * @param null $loader
23
-     * @param null $source
21
+     * @param string $type
22
+     * @param string $loader
23
+     * @param string $source
24 24
      */
25 25
     public function __construct($type = null, $loader = null, $source = null)
26 26
     {
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -48,7 +48,7 @@
 block discarded – undo
48 48
 
49 49
         // prepare source path
50 50
         if ($this->type === 'Alias') {
51
-            $this->source = '/' . trim($this->source, '/');
51
+            $this->source = '/'.trim($this->source, '/');
52 52
         } else {
53 53
             $this->source = ucfirst($this->source);
54 54
         }
Please login to merge, or discard this patch.