Completed
Push — master ( 8664c2...3fbe19 )
by Nic
13:41
created
src/Elements/ElementBlogPosts.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -66,22 +66,22 @@  discard block
 block discarded – undo
66 66
      */
67 67
     public function getCMSFields()
68 68
     {
69
-        $this->beforeUpdateCMSFields(function (FieldList $fields) {
69
+        $this->beforeUpdateCMSFields(function(FieldList $fields) {
70 70
             $fields->dataFieldByName('Content')
71 71
                 ->setRows(8);
72 72
 
73 73
             $fields->dataFieldByName('Limit')
74
-                ->setTitle(_t(__CLASS__ . 'LimitLabel', 'Posts to show'));
74
+                ->setTitle(_t(__CLASS__.'LimitLabel', 'Posts to show'));
75 75
 
76 76
             if (class_exists(Blog::class)) {
77 77
                 $fields->insertBefore(
78 78
                     $fields->dataFieldByName('BlogID')
79
-                        ->setTitle(_t(__CLASS__ . 'BlogLabel', 'Featured Blog'))
79
+                        ->setTitle(_t(__CLASS__.'BlogLabel', 'Featured Blog'))
80 80
                         ->setEmptyString(''),
81 81
                     'Limit'
82 82
                 );
83 83
 
84
-                $dataSource = function ($val) {
84
+                $dataSource = function($val) {
85 85
                     if ($val) {
86 86
                         return Blog::get()->byID($val)->Categories()->map('ID', 'Title');
87 87
                     }
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
                 $fields->insertAfter(
92 92
                     'BlogID',
93 93
                     DependentDropdownField::create('CategoryID', _t(
94
-                        __CLASS__ . 'CategoryLabel',
94
+                        __CLASS__.'CategoryLabel',
95 95
                         'Category'
96 96
                     ), $dataSource)
97 97
                         ->setDepends($fields->dataFieldByName('BlogID'))
@@ -126,9 +126,9 @@  discard block
 block discarded – undo
126 126
     {
127 127
         $count = $this->getPostsList()->count();
128 128
         $label = _t(
129
-            BlogPost::class . '.PLURALS',
129
+            BlogPost::class.'.PLURALS',
130 130
             'A Blog Post|{count} Blog Posts',
131
-            [ 'count' => $count ]
131
+            ['count' => $count]
132 132
         );
133 133
         return DBField::create_field('HTMLText', $label)->Summary(20);
134 134
     }
@@ -148,6 +148,6 @@  discard block
 block discarded – undo
148 148
      */
149 149
     public function getType()
150 150
     {
151
-        return _t(__CLASS__ . '.BlockType', 'Blog Posts');
151
+        return _t(__CLASS__.'.BlockType', 'Blog Posts');
152 152
     }
153 153
 }
Please login to merge, or discard this patch.
tests/Elements/ElementBlogPostsTest.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
         $this->assertEquals(
29 29
             $object->getSummary(),
30 30
             _t(
31
-                BlogPost::class . 'PLURALS',
31
+                BlogPost::class.'PLURALS',
32 32
                 'A Blog Post|{count} Blog Posts',
33 33
                 ['count' => $count]
34 34
             )
Please login to merge, or discard this patch.