Merge pull request #7075 from nextcloud/remove-unused-variables

Remove unused variables
This commit is contained in:
Roeland Jago Douma 2017-11-07 16:18:40 +01:00 committed by GitHub
commit f55732a18f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 7 additions and 26 deletions

View File

@ -164,7 +164,7 @@ class SystemPrincipalBackend extends AbstractBackend {
* @return array * @return array
*/ */
function getGroupMembership($principal) { function getGroupMembership($principal) {
list($prefix, $name) = \Sabre\Uri\split($principal); list($prefix, ) = \Sabre\Uri\split($principal);
if ($prefix === 'principals/system') { if ($prefix === 'principals/system') {
$principal = $this->getPrincipalByPath($principal); $principal = $this->getPrincipalByPath($principal);

View File

@ -201,7 +201,7 @@ XML;
</nc:calendar-search> </nc:calendar-search>
XML; XML;
$result = $this->parse($xml); $this->parse($xml);
} }
/** /**

View File

@ -81,7 +81,7 @@ class SyncServiceTest extends TestCase {
$logger = $this->getMockBuilder(ILogger::class)->disableOriginalConstructor()->getMock(); $logger = $this->getMockBuilder(ILogger::class)->disableOriginalConstructor()->getMock();
$accountManager = $this->getMockBuilder(AccountManager::class)->disableOriginalConstructor()->getMock(); $accountManager = $this->getMockBuilder(AccountManager::class)->disableOriginalConstructor()->getMock();
$ss = new SyncService($backend, $userManager, $logger, $accountManager); $ss = new SyncService($backend, $userManager, $logger, $accountManager);
$book = $ss->ensureSystemAddressBookExists('principals/users/adam', 'contacts', []); $ss->ensureSystemAddressBookExists('principals/users/adam', 'contacts', []);
} }
public function testUpdateAndDeleteUser() { public function testUpdateAndDeleteUser() {

View File

@ -78,9 +78,6 @@
this._detailFileInfoViews = []; this._detailFileInfoViews = [];
this._dirty = true; this._dirty = true;
// uncomment to add some dummy tabs for testing
//this._addTestTabs();
}, },
_onClose: function(event) { _onClose: function(event) {
@ -102,21 +99,6 @@
this.selectTab(tabId); this.selectTab(tabId);
}, },
_addTestTabs: function() {
for (var j = 0; j < 2; j++) {
var testView = new OCA.Files.DetailTabView({id: 'testtab' + j});
testView.index = j;
testView.getLabel = function() { return 'Test tab ' + this.index; };
testView.render = function() {
this.$el.empty();
for (var i = 0; i < 100; i++) {
this.$el.append('<div>Test tab ' + this.index + ' row ' + i + '</div>');
}
};
this._tabViews.push(testView);
}
},
template: function(vars) { template: function(vars) {
if (!this._template) { if (!this._template) {
this._template = Handlebars.compile(TEMPLATE); this._template = Handlebars.compile(TEMPLATE);

View File

@ -66,7 +66,6 @@ $(document).ready(function() {
}, },
reload: function() { reload: function() {
var tagName = OC.TAG_FAVORITE;
this.showMask(); this.showMask();
if (this._reloadCall) { if (this._reloadCall) {
this._reloadCall.abort(); this._reloadCall.abort();

View File

@ -322,7 +322,7 @@ class Scan extends Base {
* @return string * @return string
*/ */
protected function formatExecTime() { protected function formatExecTime() {
list($secs, $tens) = explode('.', sprintf("%.1f", ($this->execTime))); list($secs, ) = explode('.', sprintf("%.1f", ($this->execTime)));
# if you want to have microseconds add this: . '.' . $tens; # if you want to have microseconds add this: . '.' . $tens;
return date('H:i:s', $secs); return date('H:i:s', $secs);

View File

@ -260,7 +260,7 @@ class ScanAppData extends Base {
* @return string * @return string
*/ */
protected function formatExecTime() { protected function formatExecTime() {
list($secs, $tens) = explode('.', sprintf("%.1f", ($this->execTime))); list($secs, ) = explode('.', sprintf("%.1f", ($this->execTime)));
# if you want to have microseconds add this: . '.' . $tens; # if you want to have microseconds add this: . '.' . $tens;
return date('H:i:s', $secs); return date('H:i:s', $secs);

View File

@ -340,7 +340,7 @@ class OC_Files {
* *
* @param int $size file size in bytes * @param int $size file size in bytes
* @param array $files override '.htaccess' and '.user.ini' locations * @param array $files override '.htaccess' and '.user.ini' locations
* @return bool false on failure, size on success * @return bool|int false on failure, size on success
*/ */
public static function setUploadLimit($size, $files = []) { public static function setUploadLimit($size, $files = []) {
//don't allow user to break his config //don't allow user to break his config

View File

@ -244,7 +244,7 @@ abstract class Mapper {
} }
} }
$result = $query->execute(); $query->execute();
return $query; return $query;
} }