diff --git a/apps/dav/lib/Connector/Sabre/AnonymousOptionsPlugin.php b/apps/dav/lib/Connector/Sabre/AnonymousOptionsPlugin.php index e0aa19c50b3f7..de414e3aa2fff 100644 --- a/apps/dav/lib/Connector/Sabre/AnonymousOptionsPlugin.php +++ b/apps/dav/lib/Connector/Sabre/AnonymousOptionsPlugin.php @@ -53,7 +53,7 @@ public function initialize(\Sabre\DAV\Server $server) { * @return bool */ public function isRequestInRoot($path) { - return $path === '' || (is_string($path) && strpos($path, '/') === FALSE); + return $path === '' || (is_string($path) && strpos($path, '/') === false); } /** diff --git a/apps/dav/lib/Connector/Sabre/FilesPlugin.php b/apps/dav/lib/Connector/Sabre/FilesPlugin.php index 459d2ffa324c9..498058f7c0375 100644 --- a/apps/dav/lib/Connector/Sabre/FilesPlugin.php +++ b/apps/dav/lib/Connector/Sabre/FilesPlugin.php @@ -397,7 +397,7 @@ public function handleGetProperties(PropFind $propFind, \Sabre\DAV\INode $node) $propFind->handle(self::CHECKSUMS_PROPERTYNAME, function() use ($node) { $checksum = $node->getChecksum(); - if ($checksum === NULL || $checksum === '') { + if ($checksum === null || $checksum === '') { return null; } diff --git a/build/integration/features/bootstrap/Sharing.php b/build/integration/features/bootstrap/Sharing.php index 66b15436438f4..3d6ca27f2aa3c 100644 --- a/build/integration/features/bootstrap/Sharing.php +++ b/build/integration/features/bootstrap/Sharing.php @@ -327,14 +327,14 @@ public function isFieldInResponse($field, $contentExpected){ 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 @@ public function isFieldInResponse($field, $contentExpected){ 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 @@ public function isFieldInResponse($field, $contentExpected){ * @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 @@ public function checkSharedFileInResponse($filename){ * @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 @@ public function checkSharedFileNotInResponse($filename){ * @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 @@ public function checkSharedUserInResponse($user){ * @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 @@ public function assureFileIsShared($entry, $filepath, $user1, $user2, $withPerms $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 @@ public function assureFileIsSharedWithGroup($entry, $filepath, $user, $group, $w $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)); } /** diff --git a/lib/private/Contacts/ContactsMenu/ContactsStore.php b/lib/private/Contacts/ContactsMenu/ContactsStore.php index 9efa42b9a4d57..9dfc803c49e31 100644 --- a/lib/private/Contacts/ContactsMenu/ContactsStore.php +++ b/lib/private/Contacts/ContactsMenu/ContactsStore.php @@ -159,7 +159,7 @@ private function filterContacts(IUser $self, if ($ownGroupsOnly && $entry->getProperty('isLocalSystemBook') === true) { $uid = $this->userManager->get($entry->getProperty('UID')); - if ($uid === NULL) { + if ($uid === null) { return false; } diff --git a/lib/private/Files/Cache/Wrapper/CacheJail.php b/lib/private/Files/Cache/Wrapper/CacheJail.php index 6f951f978ad2d..92601e38d13ee 100644 --- a/lib/private/Files/Cache/Wrapper/CacheJail.php +++ b/lib/private/Files/Cache/Wrapper/CacheJail.php @@ -241,7 +241,7 @@ public function searchQuery(ISearchQuery $query) { $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; diff --git a/lib/private/Template/JSCombiner.php b/lib/private/Template/JSCombiner.php index a6908ce8071ef..83fc717c9c5e4 100644 --- a/lib/private/Template/JSCombiner.php +++ b/lib/private/Template/JSCombiner.php @@ -133,7 +133,7 @@ protected function isCached($fileName, ISimpleFolder $folder) { $deps = json_decode($deps, true); - if ($deps === NULL) { + if ($deps === null) { return false; } diff --git a/lib/private/legacy/util.php b/lib/private/legacy/util.php index bf0a1b9bb2026..63edf34e02998 100644 --- a/lib/private/legacy/util.php +++ b/lib/private/legacy/util.php @@ -795,7 +795,7 @@ public static function checkServer(\OC\SystemConfig $config) { // 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[] = [ diff --git a/lib/public/Util.php b/lib/public/Util.php index 544808f5ecec7..74a4b18f5d4c8 100644 --- a/lib/public/Util.php +++ b/lib/public/Util.php @@ -260,7 +260,7 @@ public static function getServerHostName() { $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; diff --git a/tests/lib/Avatar/UserAvatarTest.php b/tests/lib/Avatar/UserAvatarTest.php index 43e325b09412c..ed0a32dab6fd4 100644 --- a/tests/lib/Avatar/UserAvatarTest.php +++ b/tests/lib/Avatar/UserAvatarTest.php @@ -70,7 +70,7 @@ public function testGetNoAvatar() { return false; })); - $data = NULL; + $data = null; $file->method('putContent') ->with($this->callback(function ($d) use (&$data) { $data = $d; diff --git a/tests/lib/DB/LegacyDBTest.php b/tests/lib/DB/LegacyDBTest.php index 200afac3f9af1..ce7ef0a3a6303 100644 --- a/tests/lib/DB/LegacyDBTest.php +++ b/tests/lib/DB/LegacyDBTest.php @@ -16,7 +16,7 @@ * @group DB */ class LegacyDBTest extends \Test\TestCase { - protected $backupGlobals = FALSE; + protected $backupGlobals = false; protected static $schema_file; protected $test_prefix; diff --git a/tests/lib/Files/Stream/EncryptionTest.php b/tests/lib/Files/Stream/EncryptionTest.php index fd5e8c6ca9d6b..e2213365d5f7f 100644 --- a/tests/lib/Files/Stream/EncryptionTest.php +++ b/tests/lib/Files/Stream/EncryptionTest.php @@ -205,9 +205,9 @@ public function testRewind() { $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); diff --git a/tests/lib/Mail/MessageTest.php b/tests/lib/Mail/MessageTest.php index ab62cfcfdcbed..4d61504cd9756 100644 --- a/tests/lib/Mail/MessageTest.php +++ b/tests/lib/Mail/MessageTest.php @@ -36,7 +36,7 @@ public function mailAddressProvider() { */ public function getMailAddressProvider() { return array( - array(NULL, array()), + array(null, array()), array(array('lukas@owncloud.com' => 'Lukas Reschke'), array('lukas@owncloud.com' => 'Lukas Reschke')), ); } diff --git a/tests/lib/TagsTest.php b/tests/lib/TagsTest.php index db0a77f68f041..ab717b4cc2f95 100644 --- a/tests/lib/TagsTest.php +++ b/tests/lib/TagsTest.php @@ -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 */