]> source.dussan.org Git - nextcloud-server.git/commitdiff
Use lowercase true, false and null constants 20169/head
authorChristoph Wurst <christoph@winzerhof-wurst.at>
Wed, 25 Mar 2020 20:53:04 +0000 (21:53 +0100)
committerChristoph Wurst <christoph@winzerhof-wurst.at>
Wed, 25 Mar 2020 20:53:04 +0000 (21:53 +0100)
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
13 files changed:
apps/dav/lib/Connector/Sabre/AnonymousOptionsPlugin.php
apps/dav/lib/Connector/Sabre/FilesPlugin.php
build/integration/features/bootstrap/Sharing.php
lib/private/Contacts/ContactsMenu/ContactsStore.php
lib/private/Files/Cache/Wrapper/CacheJail.php
lib/private/Template/JSCombiner.php
lib/private/legacy/util.php
lib/public/Util.php
tests/lib/Avatar/UserAvatarTest.php
tests/lib/DB/LegacyDBTest.php
tests/lib/Files/Stream/EncryptionTest.php
tests/lib/Mail/MessageTest.php
tests/lib/TagsTest.php

index e0aa19c50b3f7639c892eba0b8c28f4aaaf0d200..de414e3aa2ffff3da04ec17a73acc5a19aaa5ba9 100644 (file)
@@ -53,7 +53,7 @@ class AnonymousOptionsPlugin extends ServerPlugin {
         * @return bool
         */
        public function isRequestInRoot($path) {
-               return $path === '' || (is_string($path) && strpos($path, '/') === FALSE);
+               return $path === '' || (is_string($path) && strpos($path, '/') === false);
        }
 
        /**
index 459d2ffa324c94c7593c22ac326f12d1cf9629d2..498058f7c037580f8129ef746436dd9f300d5610 100644 (file)
@@ -397,7 +397,7 @@ class FilesPlugin extends ServerPlugin {
 
                        $propFind->handle(self::CHECKSUMS_PROPERTYNAME, function() use ($node) {
                                $checksum = $node->getChecksum();
-                               if ($checksum === NULL || $checksum === '') {
+                               if ($checksum === null || $checksum === '') {
                                        return null;
                                }
 
index 66b15436438f4f9158e57116cf1012060c360b32..3d6ca27f2aa3c9833076731515f5787ad07d5c31 100644 (file)
@@ -327,14 +327,14 @@ trait Sharing {
                                        return $this->isExpectedUrl((string)$element->$field, "index.php/s/");
                                }
                                elseif ((string)$element->$field == $contentExpected){
-                                       return True;
+                                       return true;
                                }
                                else{
                                        print($element->$field);
                                }
                        }
 
-                       return False;
+                       return false;
                } else {
                        if ($contentExpected == "A_TOKEN"){
                                        return (strlen((string)$data->$field) == 15);
@@ -346,9 +346,9 @@ trait Sharing {
                                        return $this->isExpectedUrl((string)$data->$field, "index.php/s/");
                        }
                        elseif ($data->$field == $contentExpected){
-                                       return True;
+                                       return true;
                        }
-                       return False;
+                       return false;
                }
        }
 
@@ -358,7 +358,7 @@ trait Sharing {
         * @param string $filename
         */
        public function checkSharedFileInResponse($filename){
-               Assert::assertEquals(True, $this->isFieldInResponse('file_target', "/$filename"));
+               Assert::assertEquals(true, $this->isFieldInResponse('file_target', "/$filename"));
        }
 
        /**
@@ -367,7 +367,7 @@ trait Sharing {
         * @param string $filename
         */
        public function checkSharedFileNotInResponse($filename){
-               Assert::assertEquals(False, $this->isFieldInResponse('file_target', "/$filename"));
+               Assert::assertEquals(false, $this->isFieldInResponse('file_target', "/$filename"));
        }
 
        /**
@@ -376,7 +376,7 @@ trait Sharing {
         * @param string $user
         */
        public function checkSharedUserInResponse($user){
-               Assert::assertEquals(True, $this->isFieldInResponse('share_with', "$user"));
+               Assert::assertEquals(true, $this->isFieldInResponse('share_with', "$user"));
        }
 
        /**
@@ -385,17 +385,17 @@ trait Sharing {
         * @param string $user
         */
        public function checkSharedUserNotInResponse($user){
-               Assert::assertEquals(False, $this->isFieldInResponse('share_with', "$user"));
+               Assert::assertEquals(false, $this->isFieldInResponse('share_with', "$user"));
        }
 
        public function isUserOrGroupInSharedData($userOrGroup, $permissions = null){
                $data = simplexml_load_string($this->response->getBody())->data[0];
                foreach($data as $element) {
                        if ($element->share_with == $userOrGroup && ($permissions === null || $permissions == $element->permissions)){
-                               return True;
+                               return true;
                        }
                }
-               return False;
+               return false;
        }
 
        /**
@@ -424,7 +424,7 @@ trait Sharing {
                        $this->createShare($user1, $filepath, 0, $user2, null, null, $permissions);
                }
                $this->response = $client->get($fullUrl, $options);
-               Assert::assertEquals(True, $this->isUserOrGroupInSharedData($user2, $permissions));
+               Assert::assertEquals(true, $this->isUserOrGroupInSharedData($user2, $permissions));
        }
 
        /**
@@ -453,7 +453,7 @@ trait Sharing {
                        $this->createShare($user, $filepath, 1, $group, null, null, $permissions);
                }
                $this->response = $client->get($fullUrl, $options);
-               Assert::assertEquals(True, $this->isUserOrGroupInSharedData($group, $permissions));
+               Assert::assertEquals(true, $this->isUserOrGroupInSharedData($group, $permissions));
        }
 
        /**
index 9efa42b9a4d5758f7804cf5e4609446cbb3eed0a..9dfc803c49e319aa5ea1ba58a951da42d1a412aa 100644 (file)
@@ -159,7 +159,7 @@ class ContactsStore implements IContactsStore {
                        if ($ownGroupsOnly && $entry->getProperty('isLocalSystemBook') === true) {
                                $uid = $this->userManager->get($entry->getProperty('UID'));
 
-                               if ($uid === NULL) {
+                               if ($uid === null) {
                                        return false;
                                }
 
index 6f951f978ad2d67982cd86fa24926a3a8e6503dd..92601e38d13eef72902ca0a791cf923d56ab9e03 100644 (file)
@@ -241,7 +241,7 @@ class CacheJail extends CacheWrapper {
                $results = $this->getCache()->searchQuery($simpleQuery);
                $results = $this->formatSearchResults($results);
 
-               $limit = $query->getLimit() === 0 ? NULL : $query->getLimit();
+               $limit = $query->getLimit() === 0 ? null : $query->getLimit();
                $results = array_slice($results, $query->getOffset(), $limit);
 
                return $results;
index a6908ce8071ef72ab2b6ed8cc018b03811748b2e..83fc717c9c5e483840ab5a24db083cc37740b1bf 100644 (file)
@@ -133,7 +133,7 @@ class JSCombiner {
 
                        $deps = json_decode($deps, true);
 
-                       if ($deps === NULL) {
+                       if ($deps === null) {
                                return false;
                        }
 
index bf0a1b9bb2026556b27e068b1ba42efcc772e362..63edf34e029988425827bf5cfef0fa8ea55af04a 100644 (file)
@@ -795,7 +795,7 @@ class OC_Util {
                                // is_writable doesn't work for NFS mounts, so try to write a file and check if it exists.
                                $testFile = sprintf('%s/%s.tmp', $CONFIG_DATADIRECTORY, uniqid('data_dir_writability_test_'));
                                $handle = fopen($testFile, 'w');
-                               if (!$handle || fwrite($handle, 'Test write operation') === FALSE) {
+                               if (!$handle || fwrite($handle, 'Test write operation') === false) {
                                        $permissionsHint = $l->t('Permissions can usually be fixed by giving the webserver write access to the root directory. See %s.',
                                                [$urlGenerator->linkToDocs('admin-dir_permissions')]);
                                        $errors[] = [
index 544808f5ecec7ce1864ce3d2ab993649ee3b20e4..74a4b18f5d4c8fcea94c203b24ea3dec3af50fd2 100644 (file)
@@ -260,7 +260,7 @@ class Util {
                $host_name = \OC::$server->getRequest()->getServerHost();
                // strip away port number (if existing)
                $colon_pos = strpos($host_name, ':');
-               if ($colon_pos != FALSE) {
+               if ($colon_pos != false) {
                        $host_name = substr($host_name, 0, $colon_pos);
                }
                return $host_name;
index 43e325b09412c26609c100e03449967539fe1662..ed0a32dab6fd4f9d44f7b39a39bd785730ce10e3 100644 (file)
@@ -70,7 +70,7 @@ class UserAvatarTest extends \Test\TestCase {
                                return false;
                        }));
 
-               $data = NULL;
+               $data = null;
                $file->method('putContent')
                        ->with($this->callback(function ($d) use (&$data) {
                                $data = $d;
index 200afac3f9af1dd9cc26c6f82fb561885e58e1a2..ce7ef0a3a6303070aa992e9c04fe3a68918bb392 100644 (file)
@@ -16,7 +16,7 @@ use OC_DB;
  * @group DB
  */
 class LegacyDBTest extends \Test\TestCase {
-       protected $backupGlobals = FALSE;
+       protected $backupGlobals = false;
 
        protected static $schema_file;
        protected $test_prefix;
index fd5e8c6ca9d6b70ddaab3181336b50e23c128897..e2213365d5f7fe8b0b26e6f69087ccc95c7ae9b1 100644 (file)
@@ -205,9 +205,9 @@ class EncryptionTest extends \Test\TestCase {
                $fileName = tempnam("/tmp", "FOO");
                $stream = $this->getStream($fileName, 'w+', 0);
                $this->assertEquals(6, fwrite($stream, 'foobar'));
-               $this->assertEquals(TRUE, rewind($stream));
+               $this->assertEquals(true, rewind($stream));
                $this->assertEquals('foobar', fread($stream, 100));
-               $this->assertEquals(TRUE, rewind($stream));
+               $this->assertEquals(true, rewind($stream));
                $this->assertEquals(3, fwrite($stream, 'bar'));
                fclose($stream);
 
index ab62cfcfdcbedbd63086479575a4cc1188d922c9..4d61504cd9756359a99766ae9a4f9cf4aa1806d9 100644 (file)
@@ -36,7 +36,7 @@ class MessageTest extends TestCase {
         */
        public function getMailAddressProvider() {
                return array(
-                       array(NULL, array()),
+                       array(null, array()),
                        array(array('lukas@owncloud.com' => 'Lukas Reschke'), array('lukas@owncloud.com' => 'Lukas Reschke')),
                );
        }
index db0a77f68f0416335050fe4baa1806ec8868b618..ab717b4cc2f95eb3a59c1d6ca7d3968d55892616 100644 (file)
@@ -36,7 +36,7 @@ class TagsTest extends \Test\TestCase {
        protected $user;
        /** @var \OCP\IUserSession */
        protected $userSession;
-       protected $backupGlobals = FALSE;
+       protected $backupGlobals = false;
        /** @var \OC\Tagging\TagMapper */
        protected $tagMapper;
        /** @var \OCP\ITagManager */