@@ -86,9 +86,9 @@ class ViewBuilder
8686 * @throws FailedToProcessConfigException If the config could not be processed.
8787 */
8888 public function __construct (
89- ConfigInterface $ config = null ,
90- ViewFinder $ viewFinder = null ,
91- EngineFinder $ engineFinder = null
89+ ? ConfigInterface $ config = null ,
90+ ? ViewFinder $ viewFinder = null ,
91+ ? EngineFinder $ engineFinder = null
9292 ) {
9393 $ this ->processConfig ($ this ->getConfig ($ config ));
9494 $ this ->viewFinder = $ viewFinder ?? $ this ->getViewFinder ();
@@ -107,7 +107,7 @@ public function __construct(
107107 * @return View Instance of the requested view.
108108 * @throws FailedToInstantiateView If the view could not be instantiated.
109109 */
110- public function create (string $ view , $ type = null ): View
110+ public function create (string $ view , ? string $ type = null ): View
111111 {
112112 if (!array_key_exists ($ view , $ this ->viewPathCache )) {
113113 $ uri = $ this ->scanLocations ([$ view ]);
@@ -287,7 +287,7 @@ protected function getFinder($key)
287287 * @return View Resolved View object.
288288 * @throws FailedToInstantiateView If the view type could not be resolved.
289289 */
290- protected function resolveType ($ type , string $ uri , Engine $ engine = null ): View
290+ protected function resolveType ($ type , string $ uri , ? Engine $ engine = null ): View
291291 {
292292 $ configKey = [static ::VIEW_FINDER_KEY , 'Views ' , $ type ];
293293
@@ -332,6 +332,6 @@ protected function getConfig($config = []): ConfigInterface
332332 ? ConfigFactory::createFromArray (array_merge_recursive ($ defaults ->getArrayCopy (), $ config ->getArrayCopy ()))
333333 : $ defaults ;
334334
335- return $ config ->getSubConfig ('BrightNucleus\View ' );
335+ return $ config ->getSubConfig ('BrightNucleus \\ View ' );
336336 }
337337}
0 commit comments