Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minor cleanup and docstrings #90

Merged
merged 1 commit into from
Oct 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@

/** @var \Icinga\Application\Modules\Module $this */

use Icinga\Module\Toplevelview\ViewConfig;
use Icinga\Web\Url;

$this->providePermission('toplevelview/edit', $this->translate('Allow the user to edit Top Level Views'));

$this->provideRestriction(
Expand Down
3 changes: 2 additions & 1 deletion library/Toplevelview/Model/View.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
use Icinga\Module\Toplevelview\Tree\TLVTree;

/**
* View represents a single Top Level View
* View represents a single Top Level View.
* It contains the actual Tree and metadata.
*/
class View
{
Expand Down
1 change: 1 addition & 0 deletions library/Toplevelview/Tree/TLVIcingaNode.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
use Icinga\Exception\NotImplementedError;

/**
* Leaf nodes that fetch data from the database are TLVIcingaNodes.
* @codeCoverageIgnore
*/
class TLVIcingaNode extends TLVTreeNode
Expand Down
8 changes: 8 additions & 0 deletions library/Toplevelview/Tree/TLVTreeNode.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ class TLVTreeNode extends TreeNode
*/
protected $type = 'node';

/**
* @var string
*/
protected $key = null;

/**
Expand Down Expand Up @@ -48,6 +51,11 @@ class TLVTreeNode extends TreeNode
*/
protected $properties = array();

/**
* Determine if this node is a leaf
*
* @var bool
*/
protected static $canHaveChildren = true;

/**
Expand Down
4 changes: 4 additions & 0 deletions library/Toplevelview/Util/Str.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,14 @@

namespace Icinga\Module\Toplevelview\Util;

/**
* Str is a small helper class for working with strings
*/
class Str
{
/**
* Str::limit method truncates the given string to the specified length.
* Used in cases where CSS text-overflow cannot be used.
*
* @param string $str
* @param int $len
Expand Down