Completed
Pull Request — master (#264)
by Robbie
13:29
created
code/controller/TranslatableCMSMainExtension.php 1 patch
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -12,7 +12,6 @@
 block discarded – undo
12 12
 use SilverStripe\Forms\FormAction;
13 13
 use SilverStripe\Forms\HiddenField;
14 14
 use SilverStripe\Forms\LiteralField;
15
-use SilverStripe\Forms\HTMLEditor\HTMLEditorConfig;
16 15
 use SilverStripe\i18n\i18n;
17 16
 use SilverStripe\ORM\DataObject;
18 17
 use SilverStripe\Security\Member;
Please login to merge, or discard this patch.
code/forms/TemporaryInlineFormAction.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@
 block discarded – undo
32 32
 
33 33
     /**
34 34
      * @param array $properties
35
-     * @return HTMLText
35
+     * @return DBField
36 36
      */
37 37
     public function Field($properties = [])
38 38
     {
Please login to merge, or discard this patch.
code/model/Translatable.php 2 patches
Doc Comments   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -326,7 +326,7 @@  discard block
 block discarded – undo
326 326
      * any database records (like pages), as this locale will be attached
327 327
      * to all new records.
328 328
      *
329
-     * @param $locale String
329
+     * @param string $locale String
330 330
      * @throws InvalidArgumentException if the locale is not valid
331 331
      */
332 332
     public static function set_default_locale($locale)
@@ -360,7 +360,6 @@  discard block
 block discarded – undo
360 360
      * to "auto-filter" all SELECT queries by this language.
361 361
      * See {@link disable_locale_filter()} on how to override this behaviour temporarily.
362 362
      *
363
-     * @param string $lang New reading language.
364 363
      */
365 364
     public static function set_current_locale($locale)
366 365
     {
@@ -408,8 +407,6 @@  discard block
 block discarded – undo
408 407
      * @param string $join A single join clause.  This can be used for filtering, only 1
409 408
      *               instance of each DataObject will be returned.
410 409
      * @param string $limit A limit expression to be inserted into the LIMIT clause.
411
-     * @param string $containerClass The container class to return the results in.
412
-     * @param string $having A filter to be inserted into the HAVING clause.
413 410
      * @return mixed The objects matching the conditions.
414 411
      */
415 412
     public static function get_by_locale($class, $locale, $filter = '', $sort = '', $join = "", $limit = "")
@@ -596,7 +593,7 @@  discard block
 block discarded – undo
596 593
      * Check if a given SQLSelect filters on the Locale field
597 594
      *
598 595
      * @param SQLSelect $query
599
-     * @return boolean
596
+     * @return boolean|null
600 597
      */
601 598
     protected function filtersOnLocale($query)
602 599
     {
@@ -1640,7 +1637,7 @@  discard block
 block discarded – undo
1640 1637
     }
1641 1638
 
1642 1639
     /**
1643
-     * @return boolean
1640
+     * @return null|false
1644 1641
      */
1645 1642
     public function canEdit($member)
1646 1643
     {
Please login to merge, or discard this patch.
Unused Use Statements   -6 removed lines patch added patch discarded remove patch
@@ -10,14 +10,12 @@  discard block
 block discarded – undo
10 10
 use SilverStripe\Control\Controller;
11 11
 use SilverStripe\Core\Config\Config;
12 12
 use SilverStripe\Core\Convert;
13
-use SilverStripe\Core\ClassInfo;
14 13
 use SilverStripe\Forms\FieldList;
15 14
 use SilverStripe\Forms\HeaderField;
16 15
 use SilverStripe\Forms\HiddenField;
17 16
 use SilverStripe\Forms\LiteralField;
18 17
 use SilverStripe\Forms\Tab;
19 18
 use SilverStripe\i18n\i18n;
20
-use SilverStripe\i18n\Data\Intl\IntlLocales;
21 19
 use SilverStripe\ORM\ArrayList;
22 20
 use SilverStripe\ORM\DataExtension;
23 21
 use SilverStripe\ORM\DataObject;
@@ -33,10 +31,6 @@  discard block
 block discarded – undo
33 31
 use SilverStripe\Translatable\Forms\LanguageDropdownField;
34 32
 use SilverStripe\Translatable\Model\Translatable;
35 33
 use SilverStripe\Versioned\Versioned;
36
-
37
-
38
-
39
-
40 34
 use SilverStripe\Translatable\Forms\TemporaryInlineFormAction;
41 35
 
42 36
 /**
Please login to merge, or discard this patch.
tests/unit/TranslatableTest.php 2 patches
Doc Comments   +6 added lines patch added patch discarded remove patch
@@ -84,6 +84,9 @@  discard block
 block discarded – undo
84 84
         parent::tearDown();
85 85
     }
86 86
 
87
+    /**
88
+     * @param string $message
89
+     */
87 90
     protected function assertArrayEqualsAfterSort($expected, $actual, $message = null)
88 91
     {
89 92
         sort($expected);
@@ -274,6 +277,9 @@  discard block
 block discarded – undo
274 277
         );
275 278
     }
276 279
 
280
+    /**
281
+     * @param DataObject|null $node
282
+     */
277 283
     public function assertClass($class, $node)
278 284
     {
279 285
         $this->assertNotNull($node);
Please login to merge, or discard this patch.
Unused Use Statements   -3 removed lines patch added patch discarded remove patch
@@ -12,19 +12,16 @@
 block discarded – undo
12 12
 use SilverStripe\Core\Config\Config;
13 13
 use SilverStripe\Core\Convert;
14 14
 use SilverStripe\Dev\FunctionalTest;
15
-use SilverStripe\Dev\TestOnly;
16 15
 use SilverStripe\Forms\DropdownField;
17 16
 use SilverStripe\Forms\LookupField;
18 17
 use SilverStripe\Forms\ReadonlyField;
19 18
 use SilverStripe\Forms\TextField;
20
-use SilverStripe\ORM\DataExtension;
21 19
 use SilverStripe\ORM\DataObject;
22 20
 use SilverStripe\Security\Group;
23 21
 use SilverStripe\Security\Member;
24 22
 use SilverStripe\SiteConfig\SiteConfig;
25 23
 use SilverStripe\Translatable\Model\Translatable;
26 24
 use SilverStripe\Translatable\Tests\Stub\EveryoneCanPublish;
27
-use SilverStripe\Translatable\Tests\Stub\TranslatableTestData;
28 25
 use SilverStripe\Translatable\Tests\Stub\TranslatableTestDataObject;
29 26
 use SilverStripe\Translatable\Tests\Stub\TranslatableTestExtension;
30 27
 use SilverStripe\Translatable\Tests\Stub\TranslatableTestOneByLocaleDataObject;
Please login to merge, or discard this patch.