Skip to content

Commit

Permalink
chore: updating styles manually (cs-fixer)
Browse files Browse the repository at this point in the history
  • Loading branch information
rNoz committed Dec 21, 2024
1 parent 4bb79d0 commit 23a8190
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
9 changes: 5 additions & 4 deletions lib/DAV/Browser/Plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}

Expand Down Expand Up @@ -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 = "<section><h1>Nodes (" . $numSubNodes . ")</h1>\n";
$html = '<section><h1>Nodes ('.$numSubNodes.")</h1>\n";
$html .= '<table class="nodeTable">';

foreach ($subNodes as $subPath => $subProps) {
Expand Down Expand Up @@ -388,6 +388,7 @@ protected function generateNodesSection($subNodes, $numSubNodes)

$html .= '</table>';
$html .= '</section>';

return $html;
}

Expand Down
10 changes: 5 additions & 5 deletions tests/Sabre/DAV/Browser/PluginTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 23a8190

Please sign in to comment.