From 23a81907f4d9520ed2bff53751ea0ab572e902e2 Mon Sep 17 00:00:00 2001 From: rNoz Date: Sat, 21 Dec 2024 18:53:43 +0100 Subject: [PATCH] chore: updating styles manually (cs-fixer) --- lib/DAV/Browser/Plugin.php | 9 +++++---- tests/Sabre/DAV/Browser/PluginTest.php | 10 +++++----- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/lib/DAV/Browser/Plugin.php b/lib/DAV/Browser/Plugin.php index 977a19c4a9..2da36b8da0 100644 --- a/lib/DAV/Browser/Plugin.php +++ b/lib/DAV/Browser/Plugin.php @@ -275,8 +275,8 @@ public function generateDirectoryIndex($path) ]); $numSubNodes = count($subNodes); if ($numSubNodes && $numSubNodes <= $maxNodesAtTopSection) { - $html .= $this->generateNodesSection($subNodes, $numSubNodes); - $numSubNodes = 0; + $html .= $this->generateNodesSection($subNodes, $numSubNodes); + $numSubNodes = 0; } } @@ -329,13 +329,13 @@ public function generateDirectoryIndex($path) * Generates the Nodes section block of HTML. * * @param array $subNodes - * @param int $numSubNodes + * @param int $numSubNodes * * @return string */ protected function generateNodesSection($subNodes, $numSubNodes) { - $html = "

Nodes (" . $numSubNodes . ")

\n"; + $html = '

Nodes ('.$numSubNodes.")

\n"; $html .= ''; foreach ($subNodes as $subPath => $subProps) { @@ -388,6 +388,7 @@ protected function generateNodesSection($subNodes, $numSubNodes) $html .= '
'; $html .= '
'; + return $html; } diff --git a/tests/Sabre/DAV/Browser/PluginTest.php b/tests/Sabre/DAV/Browser/PluginTest.php index ac4c5e8459..4cd0791cab 100644 --- a/tests/Sabre/DAV/Browser/PluginTest.php +++ b/tests/Sabre/DAV/Browser/PluginTest.php @@ -4,10 +4,10 @@ namespace Sabre\DAV\Browser; -use Sabre\DAV\Xml\Property\GetLastModified; use DateTime; use Sabre\DAV; use Sabre\HTTP; +use Sabre\DAV\Xml\Property\GetLastModified; class PluginTest extends DAV\AbstractServerTestCase { @@ -241,19 +241,19 @@ public function testCollectionNodesOrder() $file1 = [ '{DAV:}getlastmodified' => $day1, - 'displayPath' => 'file1' + 'displayPath' => 'file1', ]; $file1_clon = [ '{DAV:}getlastmodified' => $day1, - 'displayPath' => 'file1' + 'displayPath' => 'file1', ]; $file2 = [ '{DAV:}getlastmodified' => $day1, - 'displayPath' => 'file2' + 'displayPath' => 'file2', ]; $file2_newer = [ '{DAV:}getlastmodified' => $day2, - 'displayPath' => 'file2' + 'displayPath' => 'file2', ]; // Case 1: Newer node should come before older node