Merge pull request #20384 from nextcloud/techdebt/lowercase-keywords
Use php keywords in lowercase
This commit is contained in:
commit
64510932b8
|
@ -26,7 +26,7 @@ namespace OCA\DAV\Tests\unit\CalDAV\ResourceBooking;
|
||||||
|
|
||||||
use OCA\DAV\CalDAV\ResourceBooking\ResourcePrincipalBackend;
|
use OCA\DAV\CalDAV\ResourceBooking\ResourcePrincipalBackend;
|
||||||
|
|
||||||
Class ResourcePrincipalBackendTest extends AbstractPrincipalBackendTest {
|
class ResourcePrincipalBackendTest extends AbstractPrincipalBackendTest {
|
||||||
protected function setUp(): void {
|
protected function setUp(): void {
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
|
|
||||||
|
|
|
@ -26,7 +26,7 @@ namespace OCA\DAV\Tests\unit\CalDAV\ResourceBooking;
|
||||||
|
|
||||||
use OCA\DAV\CalDAV\ResourceBooking\RoomPrincipalBackend;
|
use OCA\DAV\CalDAV\ResourceBooking\RoomPrincipalBackend;
|
||||||
|
|
||||||
Class RoomPrincipalBackendTest extends AbstractPrincipalBackendTest {
|
class RoomPrincipalBackendTest extends AbstractPrincipalBackendTest {
|
||||||
protected function setUp(): void {
|
protected function setUp(): void {
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
|
|
||||||
|
|
|
@ -135,7 +135,7 @@ class UserStoragesController extends StoragesController {
|
||||||
$backendOptions,
|
$backendOptions,
|
||||||
$mountOptions
|
$mountOptions
|
||||||
);
|
);
|
||||||
if ($newStorage instanceOf DataResponse) {
|
if ($newStorage instanceof DataResponse) {
|
||||||
return $newStorage;
|
return $newStorage;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -184,7 +184,7 @@ class UserStoragesController extends StoragesController {
|
||||||
$backendOptions,
|
$backendOptions,
|
||||||
$mountOptions
|
$mountOptions
|
||||||
);
|
);
|
||||||
if ($storage instanceOf DataResponse) {
|
if ($storage instanceof DataResponse) {
|
||||||
return $storage;
|
return $storage;
|
||||||
}
|
}
|
||||||
$storage->setId($id);
|
$storage->setId($id);
|
||||||
|
|
|
@ -121,7 +121,7 @@ class DeletedShareAPIController extends OCSController {
|
||||||
}
|
}
|
||||||
|
|
||||||
$result['path'] = $userFolder->getRelativePath($node->getPath());
|
$result['path'] = $userFolder->getRelativePath($node->getPath());
|
||||||
if ($node instanceOf \OCP\Files\Folder) {
|
if ($node instanceof \OCP\Files\Folder) {
|
||||||
$result['item_type'] = 'folder';
|
$result['item_type'] = 'folder';
|
||||||
} else {
|
} else {
|
||||||
$result['item_type'] = 'file';
|
$result['item_type'] = 'file';
|
||||||
|
|
|
@ -289,7 +289,7 @@ abstract class AbstractMapping {
|
||||||
* @return bool true on success, false when at least one row was not
|
* @return bool true on success, false when at least one row was not
|
||||||
* deleted
|
* deleted
|
||||||
*/
|
*/
|
||||||
public function clearCb(Callable $preCallback, Callable $postCallback): bool {
|
public function clearCb(callable $preCallback, callable $postCallback): bool {
|
||||||
$picker = $this->dbc->getQueryBuilder();
|
$picker = $this->dbc->getQueryBuilder();
|
||||||
$picker->select('owncloud_name')
|
$picker->select('owncloud_name')
|
||||||
->from($this->getTableName());
|
->from($this->getTableName());
|
||||||
|
|
|
@ -70,7 +70,7 @@ class SetupController {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(isset($post['install']) AND $post['install']=='true') {
|
if(isset($post['install']) and $post['install']=='true') {
|
||||||
// We have to launch the installation process :
|
// We have to launch the installation process :
|
||||||
$e = $this->setupHelper->install($post);
|
$e = $this->setupHelper->install($post);
|
||||||
$errors = ['errors' => $e];
|
$errors = ['errors' => $e];
|
||||||
|
@ -141,7 +141,7 @@ class SetupController {
|
||||||
$directoryIsSet = isset($post['directory']);
|
$directoryIsSet = isset($post['directory']);
|
||||||
$adminAccountIsSet = isset($post['adminlogin']);
|
$adminAccountIsSet = isset($post['adminlogin']);
|
||||||
|
|
||||||
if ($dbIsSet AND $directoryIsSet AND $adminAccountIsSet) {
|
if ($dbIsSet and $directoryIsSet and $adminAccountIsSet) {
|
||||||
$post['install'] = 'true';
|
$post['install'] = 'true';
|
||||||
}
|
}
|
||||||
$post['dbIsSet'] = $dbIsSet;
|
$post['dbIsSet'] = $dbIsSet;
|
||||||
|
|
|
@ -54,13 +54,13 @@ script('core', [
|
||||||
</p>
|
</p>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
|
|
||||||
<?php if(!$_['directoryIsSet'] OR !$_['dbIsSet'] OR count($_['errors']) > 0): ?>
|
<?php if(!$_['directoryIsSet'] or !$_['dbIsSet'] or count($_['errors']) > 0): ?>
|
||||||
<fieldset id="advancedHeader">
|
<fieldset id="advancedHeader">
|
||||||
<legend><a id="showAdvanced" tabindex="0" href="#"><?php p($l->t( 'Storage & database' )); ?><img src="<?php print_unescaped(image_path('', 'actions/caret-white.svg')); ?>" /></a></legend>
|
<legend><a id="showAdvanced" tabindex="0" href="#"><?php p($l->t( 'Storage & database' )); ?><img src="<?php print_unescaped(image_path('', 'actions/caret-white.svg')); ?>" /></a></legend>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
|
||||||
<?php if(!$_['directoryIsSet'] OR count($_['errors']) > 0): ?>
|
<?php if(!$_['directoryIsSet'] or count($_['errors']) > 0): ?>
|
||||||
<fieldset id="datadirField">
|
<fieldset id="datadirField">
|
||||||
<div id="datadirContent">
|
<div id="datadirContent">
|
||||||
<label for="directory"><?php p($l->t( 'Data folder' )); ?></label>
|
<label for="directory"><?php p($l->t( 'Data folder' )); ?></label>
|
||||||
|
@ -72,7 +72,7 @@ script('core', [
|
||||||
</fieldset>
|
</fieldset>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
|
||||||
<?php if(!$_['dbIsSet'] OR count($_['errors']) > 0): ?>
|
<?php if(!$_['dbIsSet'] or count($_['errors']) > 0): ?>
|
||||||
<fieldset id='databaseBackend'>
|
<fieldset id='databaseBackend'>
|
||||||
<?php if($_['hasMySQL'] or $_['hasPostgreSQL'] or $_['hasOracle'])
|
<?php if($_['hasMySQL'] or $_['hasPostgreSQL'] or $_['hasOracle'])
|
||||||
$hasOtherDB = true; else $hasOtherDB =false; //other than SQLite ?>
|
$hasOtherDB = true; else $hasOtherDB =false; //other than SQLite ?>
|
||||||
|
@ -149,7 +149,7 @@ script('core', [
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
|
||||||
<?php if(!$_['dbIsSet'] OR count($_['errors']) > 0): ?>
|
<?php if(!$_['dbIsSet'] or count($_['errors']) > 0): ?>
|
||||||
<fieldset id="sqliteInformation" class="warning">
|
<fieldset id="sqliteInformation" class="warning">
|
||||||
<legend><?php p($l->t('Performance warning'));?></legend>
|
<legend><?php p($l->t('Performance warning'));?></legend>
|
||||||
<p><?php p($l->t('You chose SQLite as database.'));?></p>
|
<p><?php p($l->t('You chose SQLite as database.'));?></p>
|
||||||
|
|
|
@ -146,7 +146,7 @@ namespace OC {
|
||||||
* @return IAddressBook[]
|
* @return IAddressBook[]
|
||||||
* @since 16.0.0
|
* @since 16.0.0
|
||||||
*/
|
*/
|
||||||
public function getUserAddressBooks(): Array {
|
public function getUserAddressBooks(): array {
|
||||||
$this->loadAddressBooks();
|
$this->loadAddressBooks();
|
||||||
return $this->addressBooks;
|
return $this->addressBooks;
|
||||||
}
|
}
|
||||||
|
|
|
@ -53,7 +53,7 @@ abstract class Backend implements \OCP\GroupInterface {
|
||||||
*/
|
*/
|
||||||
public function getSupportedActions() {
|
public function getSupportedActions() {
|
||||||
$actions = 0;
|
$actions = 0;
|
||||||
foreach($this->possibleActions AS $action => $methodName) {
|
foreach($this->possibleActions as $action => $methodName) {
|
||||||
if(method_exists($this, $methodName)) {
|
if(method_exists($this, $methodName)) {
|
||||||
$actions |= $action;
|
$actions |= $action;
|
||||||
}
|
}
|
||||||
|
|
|
@ -285,7 +285,7 @@ class Group implements IGroup {
|
||||||
public function countDisabled() {
|
public function countDisabled() {
|
||||||
$users = false;
|
$users = false;
|
||||||
foreach ($this->backends as $backend) {
|
foreach ($this->backends as $backend) {
|
||||||
if($backend instanceOf ICountDisabledInGroup) {
|
if($backend instanceof ICountDisabledInGroup) {
|
||||||
if($users === false) {
|
if($users === false) {
|
||||||
//we could directly add to a bool variable, but this would
|
//we could directly add to a bool variable, but this would
|
||||||
//be ugly
|
//be ugly
|
||||||
|
|
|
@ -50,7 +50,7 @@ class CryptoSessionData implements \ArrayAccess, ISession {
|
||||||
protected $sessionValues;
|
protected $sessionValues;
|
||||||
/** @var bool */
|
/** @var bool */
|
||||||
protected $isModified = false;
|
protected $isModified = false;
|
||||||
CONST encryptedSessionName = 'encrypted_session_data';
|
const encryptedSessionName = 'encrypted_session_data';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param ISession $session
|
* @param ISession $session
|
||||||
|
|
|
@ -68,7 +68,7 @@ abstract class Backend implements UserInterface {
|
||||||
*/
|
*/
|
||||||
public function getSupportedActions() {
|
public function getSupportedActions() {
|
||||||
$actions = 0;
|
$actions = 0;
|
||||||
foreach($this->possibleActions AS $action => $methodName) {
|
foreach($this->possibleActions as $action => $methodName) {
|
||||||
if(method_exists($this, $methodName)) {
|
if(method_exists($this, $methodName)) {
|
||||||
$actions |= $action;
|
$actions |= $action;
|
||||||
}
|
}
|
||||||
|
|
|
@ -367,7 +367,7 @@ class OC_Helper {
|
||||||
$it = new RecursiveIteratorIterator($aIt);
|
$it = new RecursiveIteratorIterator($aIt);
|
||||||
|
|
||||||
while ($it->valid()) {
|
while ($it->valid()) {
|
||||||
if (((isset($index) AND ($it->key() == $index)) OR !isset($index)) AND ($it->current() == $needle)) {
|
if (((isset($index) and ($it->key() == $index)) or !isset($index)) and ($it->current() == $needle)) {
|
||||||
return $aIt->key();
|
return $aIt->key();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -80,7 +80,7 @@ class OC_User {
|
||||||
\OC::$server->getUserManager()->registerBackend($backend);
|
\OC::$server->getUserManager()->registerBackend($backend);
|
||||||
} else {
|
} else {
|
||||||
// You'll never know what happens
|
// You'll never know what happens
|
||||||
if (null === $backend OR !is_string($backend)) {
|
if (null === $backend or !is_string($backend)) {
|
||||||
$backend = 'database';
|
$backend = 'database';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue