mirror of
https://github.com/nextcloud/server.git
synced 2026-02-20 00:12:30 -05:00
Merge pull request #43532 from nextcloud/chore/remove-dead-code
fix(files): Remove dead code from files controllers
This commit is contained in:
commit
8bcc55b5da
2 changed files with 2 additions and 23 deletions
|
|
@ -115,26 +115,6 @@ class ViewController extends Controller {
|
|||
$this->viewConfig = $viewConfig;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $appName
|
||||
* @param string $scriptName
|
||||
* @return string
|
||||
*/
|
||||
protected function renderScript($appName, $scriptName) {
|
||||
$content = '';
|
||||
$appPath = \OC_App::getAppPath($appName);
|
||||
$scriptPath = $appPath . '/' . $scriptName;
|
||||
if (file_exists($scriptPath)) {
|
||||
// TODO: sanitize path / script name ?
|
||||
ob_start();
|
||||
include $scriptPath;
|
||||
$content = ob_get_contents();
|
||||
@ob_end_clean();
|
||||
}
|
||||
|
||||
return $content;
|
||||
}
|
||||
|
||||
/**
|
||||
* FIXME: Replace with non static code
|
||||
*
|
||||
|
|
|
|||
|
|
@ -71,9 +71,9 @@ class ViewControllerTest extends TestCase {
|
|||
private $eventDispatcher;
|
||||
/** @var ViewController|\PHPUnit\Framework\MockObject\MockObject */
|
||||
private $viewController;
|
||||
/** @var IUser */
|
||||
/** @var IUser|\PHPUnit\Framework\MockObject\MockObject */
|
||||
private $user;
|
||||
/** @var IUserSession */
|
||||
/** @var IUserSession|\PHPUnit\Framework\MockObject\MockObject */
|
||||
private $userSession;
|
||||
/** @var IAppManager|\PHPUnit\Framework\MockObject\MockObject */
|
||||
private $appManager;
|
||||
|
|
@ -135,7 +135,6 @@ class ViewControllerTest extends TestCase {
|
|||
])
|
||||
->setMethods([
|
||||
'getStorageInfo',
|
||||
'renderScript'
|
||||
])
|
||||
->getMock();
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue