Browse Source

Add type for property.

ADmad 4 years ago
parent
commit
d3f1b86bc8

+ 1 - 1
src/ORM/Locator/LocatorAwareTrait.php

@@ -30,7 +30,7 @@ trait LocatorAwareTrait
      *
      * @var string|null
      */
-    protected $defaultTable = null;
+    protected ?string $defaultTable = null;
 
     /**
      * Table locator instance

+ 1 - 1
tests/test_app/TestApp/Controller/ArticlesController.php

@@ -23,5 +23,5 @@ class ArticlesController extends Controller
     /**
      * @var string
      */
-    protected $defaultTable = ArticlesTable::class;
+    protected ?string $defaultTable = ArticlesTable::class;
 }

+ 1 - 1
tests/test_app/TestApp/Controller/WithDefaultTableController.php

@@ -22,5 +22,5 @@ class WithDefaultTableController extends Controller
     /**
      * @var string|null
      */
-    protected $defaultTable = 'Posts';
+    protected ?string $defaultTable = 'Posts';
 }