Remove typehints for database template methods.

Instead check the CmsObject class inheritence in the methods. Fixes #4376
This commit is contained in:
Ben Thomson 2019-06-09 23:33:38 +08:00
parent 6d283829c0
commit a777c44cb4
No known key found for this signature in database
GPG Key ID: B2BAFACC5ED68F87
1 changed files with 12 additions and 4 deletions

View File

@ -441,11 +441,11 @@ class Index extends Controller
/**
* Get the response to return in an AJAX request that updates a template
*
* @param CmsObject $template The template that has been affected
* @param object $template The template that has been affected
* @param string $type The type of template being affected
* @return array $result;
*/
protected function getUpdateResponse(CmsObject $template, string $type)
protected function getUpdateResponse($template, string $type)
{
$result = [
'templatePath' => $template->fileName,
@ -483,8 +483,12 @@ class Index extends Controller
* @param CmsObject $template
* @return boolean
*/
protected function canCommitTemplate(CmsObject $template)
protected function canCommitTemplate($template)
{
if ($template instanceof Cms\Contracts\CmsObject === false) {
return false;
}
$result = false;
if (Config::get('app.debug', false) &&
@ -504,8 +508,12 @@ class Index extends Controller
* @param CmsObject $template
* @return boolean
*/
protected function canResetTemplate(CmsObject $template)
protected function canResetTemplate($template)
{
if ($template instanceof Cms\Contracts\CmsObject === false) {
return false;
}
$result = false;
if (Theme::databaseLayerEnabled()) {