Passed
Push — master ( 6042d7...377078 )
by Mihail
04:38
created
Apps/View/Admin/default/content/content_update.php 1 patch
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -42,9 +42,9 @@  discard block
 block discarded – undo
42 42
 foreach (\App::$Properties->get('languages') as $lang) {
43 43
     $generalItems[] = [
44 44
         'type' => 'tab',
45
-        'text' => __('Lang') . ': ' . Str::upperCase($lang),
46
-        'content' => $form->field('title.' . $lang, 'text', ['class' => 'form-control'], __('Please, enter the title of your material for current language locale'), 'content/form/tab_content_update') .
47
-            $form->field('text.' . $lang, 'textarea', ['class' => 'form-control wysiwyg', 'rows' => 7, 'html' => true], null, 'content/form/tab_content_update'),
45
+        'text' => __('Lang').': '.Str::upperCase($lang),
46
+        'content' => $form->field('title.'.$lang, 'text', ['class' => 'form-control'], __('Please, enter the title of your material for current language locale'), 'content/form/tab_content_update').
47
+            $form->field('text.'.$lang, 'textarea', ['class' => 'form-control wysiwyg', 'rows' => 7, 'html' => true], null, 'content/form/tab_content_update'),
48 48
         'html' => true,
49 49
         'active' => $lang === \App::$Request->getLanguage(),
50 50
         '!secure' => true
@@ -52,10 +52,10 @@  discard block
 block discarded – undo
52 52
 
53 53
     $propertiesItems[] = [
54 54
         'type' => 'tab',
55
-        'text' => __('Lang') . ': ' . Str::upperCase($lang),
56
-        'content' => $form->field('metaTitle.' . $lang, 'text', ['class' => 'form-control'], __('Enter meta param title for page title. Recoomended: 50-70 characters')) .
57
-            $form->field('metaKeywords.' . $lang, 'text', ['class' => 'form-control'], __('Enter meta param keywords for this content, separated by comma. Example: home, door, dog')) .
58
-            $form->field('metaDescription.' . $lang, 'text', ['class' => 'form-control'], __('Enter meta param description for this content. Recommended is 100-150 characters')),
55
+        'text' => __('Lang').': '.Str::upperCase($lang),
56
+        'content' => $form->field('metaTitle.'.$lang, 'text', ['class' => 'form-control'], __('Enter meta param title for page title. Recoomended: 50-70 characters')).
57
+            $form->field('metaKeywords.'.$lang, 'text', ['class' => 'form-control'], __('Enter meta param keywords for this content, separated by comma. Example: home, door, dog')).
58
+            $form->field('metaDescription.'.$lang, 'text', ['class' => 'form-control'], __('Enter meta param description for this content. Recommended is 100-150 characters')),
59 59
         'html' => true,
60 60
         '!secure' => true,
61 61
         'active' => $lang === \App::$Request->getLanguage()
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
     <div class="dropzone dropzone-previews" id="ffcms-dropzone"></div>
91 91
 </div>
92 92
 <div class="col-md-4">
93
-    ' . $form->field('poster', 'select', ['options' => [__('Not selected...')], 'class' => 'form-control'], __('Select image from gallery as a poster for this content')) . '
93
+    ' . $form->field('poster', 'select', ['options' => [__('Not selected...')], 'class' => 'form-control'], __('Select image from gallery as a poster for this content')).'
94 94
 </div>
95 95
 </div><br/><br/>';
96 96
 ?>
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
103 103
         ['type' => 'tab', 'text' => __('Gallery'), 'content' => $galleryTab, 'html' => true, '!secure' => true],
104 104
         ['type' => 'tab', 'text' => __('Other'), 'content' => $otherTab, 'html' => true, '!secure' => true]
105 105
     ]
106
-]);?>
106
+]); ?>
107 107
 
108 108
 <?= $form->field('galleryFreeId', 'hidden') ?>
109 109
 <?= $form->submitButton(__('Save'), ['class' => 'btn btn-primary']) ?>&nbsp;
@@ -112,14 +112,14 @@  discard block
 block discarded – undo
112 112
 
113 113
 <?php
114 114
 // load max length display plugin
115
-\App::$Alias->setCustomLibrary('js', \App::$Alias->currentViewUrl . '/assets/js/plugins/maxlength.js');
115
+\App::$Alias->setCustomLibrary('js', \App::$Alias->currentViewUrl.'/assets/js/plugins/maxlength.js');
116 116
 // load datapicker plugin
117
-\App::$Alias->setCustomLibrary('css', \App::$Alias->currentViewUrl . '/assets/css/plugins/datapick/datapick.css');
118
-\App::$Alias->setCustomLibrary('js', \App::$Alias->currentViewUrl . '/assets/js/plugins/datapick.js');
117
+\App::$Alias->setCustomLibrary('css', \App::$Alias->currentViewUrl.'/assets/css/plugins/datapick/datapick.css');
118
+\App::$Alias->setCustomLibrary('js', \App::$Alias->currentViewUrl.'/assets/js/plugins/datapick.js');
119 119
 // load jquery-upload plugin
120
-\App::$Alias->setCustomLibrary('css', \App::$Alias->scriptUrl . '/vendor/bower/dropzone/dist/min/dropzone.min.css');
121
-\App::$Alias->setCustomLibrary('css', \App::$Alias->scriptUrl . '/vendor/bower/dropzone/dist/min/basic.min.css');
122
-\App::$Alias->setCustomLibrary('js', \App::$Alias->scriptUrl . '/vendor/bower/dropzone/dist/min/dropzone.min.js');
120
+\App::$Alias->setCustomLibrary('css', \App::$Alias->scriptUrl.'/vendor/bower/dropzone/dist/min/dropzone.min.css');
121
+\App::$Alias->setCustomLibrary('css', \App::$Alias->scriptUrl.'/vendor/bower/dropzone/dist/min/basic.min.css');
122
+\App::$Alias->setCustomLibrary('js', \App::$Alias->scriptUrl.'/vendor/bower/dropzone/dist/min/dropzone.min.js');
123 123
 ?>
124 124
 
125 125
 <script>
@@ -216,7 +216,7 @@  discard block
 block discarded – undo
216 216
             var DropzoneFiles = [];
217 217
             $('#ffcms-dropzone').dropzone({
218 218
                 url: script_url+'/api/content/galleryupload/<?= $model->galleryFreeId ?>?lang='+script_lang,
219
-                dictDefaultMessage: '<?= __('Drop files here to upload in gallery') . '<br />' . __('(or click here)') ?>',
219
+                dictDefaultMessage: '<?= __('Drop files here to upload in gallery').'<br />'.__('(or click here)') ?>',
220 220
                 acceptedFiles: ".jpeg,.jpg,.png,.gif,.webp",
221 221
                 addRemoveLinks: true,
222 222
                 removedfile: function (file) { // file remove click, lets try to remove file from server & make visual changes
Please login to merge, or discard this patch.
Apps/ActiveRecord/App.php 2 patches
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
 
49 49
     /**
50 50
      * @deprecated
51
-     * @return \Illuminate\Database\Eloquent\Collection|mixed
51
+     * @return \Illuminate\Database\Eloquent\Collection
52 52
      * @throws SyntaxException
53 53
      */
54 54
     public static function getAll()
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
      * Get single row by defined type and sys_name with query caching
79 79
      * @param string $type
80 80
      * @param string|array $sys_name
81
-     * @return mixed|null
81
+     * @return App
82 82
      * @throws SyntaxException
83 83
      */
84 84
     public static function getItem($type, $sys_name)
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
      */
38 38
     public static function all($columns = ['*'])
39 39
     {
40
-        $cacheName = 'activercord.app.all.' . implode('.', $columns);
40
+        $cacheName = 'activercord.app.all.'.implode('.', $columns);
41 41
         $records = MemoryObject::instance()->get($cacheName);
42 42
         if ($records === null) {
43 43
             $records = parent::all($columns);
@@ -175,16 +175,16 @@  discard block
 block discarded – undo
175 175
      */
176 176
     public function getScriptVersion()
177 177
     {
178
-        $class = 'Apps\Controller\Admin\\' . $this->sys_name;
178
+        $class = 'Apps\Controller\Admin\\'.$this->sys_name;
179 179
         if (!class_exists($class)) {
180 180
             return false;
181 181
         }
182 182
 
183
-        if (!defined($class . '::VERSION')) {
183
+        if (!defined($class.'::VERSION')) {
184 184
             return false;
185 185
         }
186 186
 
187
-        return constant($class . '::VERSION');
187
+        return constant($class.'::VERSION');
188 188
     }
189 189
 
190 190
 }
191 191
\ No newline at end of file
Please login to merge, or discard this patch.
Apps/ActiveRecord/Role.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
      */
27 27
     public static function all($columns = ['*'])
28 28
     {
29
-        $cacheName = 'activerecords.role.all.' . implode('.', $columns);
29
+        $cacheName = 'activerecords.role.all.'.implode('.', $columns);
30 30
         $records = MemoryObject::instance()->get($cacheName);
31 31
         if ($records === null) {
32 32
             $records = parent::all($columns);
@@ -43,12 +43,12 @@  discard block
 block discarded – undo
43 43
      */
44 44
     public static function get($role_id)
45 45
     {
46
-        $role = MainApp::$Memory->get('user.role.cache.' . $role_id);
46
+        $role = MainApp::$Memory->get('user.role.cache.'.$role_id);
47 47
 
48 48
         // not founded in cache
49 49
         if ($role === null) {
50 50
             $role = self::find($role_id);
51
-            MainApp::$Memory->set('user.role.cache.' . $role_id, $role);
51
+            MainApp::$Memory->set('user.role.cache.'.$role_id, $role);
52 52
         }
53 53
         return $role;
54 54
     }
Please login to merge, or discard this patch.
Apps/ActiveRecord/ProfileField.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@
 block discarded – undo
28 28
      */
29 29
     public static function all($columns = ['*'])
30 30
     {
31
-        $cacheName = 'activerecord.profilefield.all.' . implode('.', $columns);
31
+        $cacheName = 'activerecord.profilefield.all.'.implode('.', $columns);
32 32
         $records = MemoryObject::instance()->get($cacheName);
33 33
         if ($records === null) {
34 34
             $records = parent::all($columns);
Please login to merge, or discard this patch.
Apps/Model/Admin/Comments/FormCommentUpdate.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@
 block discarded – undo
19 19
 
20 20
     /**
21 21
      * FormCommentUpdate constructor. Pass record inside the model.
22
-     * @param \Apps\ActiveRecord\CommentPost|\Apps\ActiveRecord\CommentAnswer $record
22
+     * @param \Ffcms\Core\Arch\ActiveModel $record
23 23
      */
24 24
     public function __construct($record, $type = 'comment')
25 25
     {
Please login to merge, or discard this patch.
Apps/Controller/Admin/Content.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
     public function actionIndex()
44 44
     {
45 45
         // set current page and offset
46
-        $page = (int)$this->request->query->get('page');
46
+        $page = (int) $this->request->query->get('page');
47 47
         $offset = $page * self::ITEM_PER_PAGE;
48 48
 
49 49
         $query = null;
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
         } elseif ($type === 'moderate') { // only items on moderate
55 55
             $query = ContentEntity::where('display', '=', 0);
56 56
         } elseif (Obj::isLikeInt($type)) { // sounds like category id ;)
57
-            $query = ContentEntity::where('category_id', '=', (int)$type);
57
+            $query = ContentEntity::where('category_id', '=', (int) $type);
58 58
         } else {
59 59
             $query = new ContentEntity();
60 60
             $type = 'all';
@@ -268,7 +268,7 @@  discard block
 block discarded – undo
268 268
     public function actionCategoryupdate($id = null)
269 269
     {
270 270
         // get owner id for new rows
271
-        $parentId = (int)$this->request->query->get('parent');
271
+        $parentId = (int) $this->request->query->get('parent');
272 272
 
273 273
         // get relation and pass to model
274 274
         $record = ContentCategory::findOrNew($id);
Please login to merge, or discard this patch.
Apps/Controller/Admin/Contenttag.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@
 block discarded – undo
35 35
         
36 36
         // render view output
37 37
         return $this->view->render('index', [
38
-           'model' => $model
38
+            'model' => $model
39 39
         ]);
40 40
     }
41 41
 }
42 42
\ No newline at end of file
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
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
         $search = \Apps\ActiveRecord\App::getItem('widget', $controller);
88 88
 
89 89
         // check what we got
90
-        if ($search === null || (int)$search->id < 1) {
90
+        if ($search === null || (int) $search->id < 1) {
91 91
             throw new NotFoundException('Widget is not founded');
92 92
         }
93 93
 
@@ -121,7 +121,7 @@  discard block
 block discarded – undo
121 121
         $record = \Apps\ActiveRecord\App::where('sys_name', '=', $controllerName)->where('type', '=', 'widget')->first();
122 122
 
123 123
         // check if widget admin controller exists
124
-        if ($record === null || (int)$record->id < 1) {
124
+        if ($record === null || (int) $record->id < 1) {
125 125
             throw new ForbiddenException('Widget is not founded');
126 126
         }
127 127
 
Please login to merge, or discard this patch.
Apps/Model/Admin/Feedback/FormAnswerAdd.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -37,9 +37,9 @@
 block discarded – undo
37 37
         $record->save();
38 38
 
39 39
         // add user notification
40
-        if ((int)$this->_post->user_id > 0 && $this->_userId !== (int)$this->_post->user_id) {
41
-            $notify = new EntityAddNotification((int)$this->_post->user_id);
42
-            $uri = '/feedback/read/' . $this->_post->id . '/' . $this->_post->hash . '#feedback-answer-' . $record->id;
40
+        if ((int) $this->_post->user_id > 0 && $this->_userId !== (int) $this->_post->user_id) {
41
+            $notify = new EntityAddNotification((int) $this->_post->user_id);
42
+            $uri = '/feedback/read/'.$this->_post->id.'/'.$this->_post->hash.'#feedback-answer-'.$record->id;
43 43
 
44 44
             $notify->add($uri, EntityAddNotification::MSG_ADD_FEEDBACKANSWER, [
45 45
                 'snippet' => Text::snippet($this->message, 50),
Please login to merge, or discard this patch.