Skip to content

Commit

Permalink
Model: Fix @property annotations
Browse files Browse the repository at this point in the history
  • Loading branch information
nilmerg committed Mar 14, 2024
1 parent ddd7a4f commit 66877a6
Show file tree
Hide file tree
Showing 17 changed files with 33 additions and 19 deletions.
2 changes: 1 addition & 1 deletion library/Icingadb/Model/AcknowledgementHistory.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
* @property ?DateTime $clear_time
* @property ?string $author
* @property ?string $cleared_by
* @property ?int $comment
* @property ?string $comment
* @property ?DateTime $expire_time
* @property ?bool $is_sticky
* @property ?bool $is_persistent
Expand Down
2 changes: 1 addition & 1 deletion library/Icingadb/Model/Checkcommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

/**
* @property string $id
* @property string $zone_id
* @property ?string $zone_id
* @property string $environment_id
* @property string $name_checksum
* @property string $properties_checksum
Expand Down
2 changes: 2 additions & 0 deletions library/Icingadb/Model/CheckcommandArgument.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
* @property string $repeat_key
* @property string $required
* @property ?string $set_if
* @property ?string $separator
* @property string $skip_key
*/
class CheckcommandArgument extends Model
Expand Down Expand Up @@ -50,6 +51,7 @@ public function getColumns()
'repeat_key',
'required',
'set_if',
'separator',
'skip_key'
];
}
Expand Down
2 changes: 1 addition & 1 deletion library/Icingadb/Model/CustomvarFlat.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* @property string $customvar_id
* @property string $flatname_checksum
* @property string $flatname
* @property string $flatvalue
* @property ?string $flatvalue
*/
class CustomvarFlat extends Model
{
Expand Down
4 changes: 3 additions & 1 deletion library/Icingadb/Model/DowntimeHistory.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@
* @property DateTime $scheduled_end_time
* @property DateTime $start_time
* @property DateTime $end_time
* @property string $has_been_cancelled
* @property ?string $scheduled_by
* @property bool $has_been_cancelled
* @property DateTime $trigger_time
* @property ?DateTime $cancel_time
*/
Expand Down Expand Up @@ -72,6 +73,7 @@ public function getColumns()
'scheduled_end_time',
'start_time',
'end_time',
'scheduled_by',
'has_been_cancelled',
'trigger_time',
'cancel_time'
Expand Down
2 changes: 1 addition & 1 deletion library/Icingadb/Model/Eventcommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
* @property string $name
* @property string $name_ci
* @property string $command
* @property string $timeout
* @property int $timeout
*/
class Eventcommand extends Model
{
Expand Down
4 changes: 3 additions & 1 deletion library/Icingadb/Model/EventcommandArgument.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,13 @@
* @property string $environment_id
* @property string $properties_checksum
* @property ?string $argument_value
* @property ?string $argument_order
* @property ?int $argument_order
* @property ?string $description
* @property ?string $argument_key_override
* @property string $repeat_key
* @property string $required
* @property ?string $set_if
* @property ?string $separator
* @property string $skip_key
*/
class EventcommandArgument extends Model
Expand Down Expand Up @@ -50,6 +51,7 @@ public function getColumns()
'repeat_key',
'required',
'set_if',
'separator',
'skip_key'
];
}
Expand Down
2 changes: 0 additions & 2 deletions library/Icingadb/Model/HostState.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@

/**
* Host state model.
*
* @property string $id
*/
class HostState extends State
{
Expand Down
2 changes: 1 addition & 1 deletion library/Icingadb/Model/Hostgroup.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
* @property string $name
* @property string $name_ci
* @property string $display_name
* @property string $zone_id
* @property ?string $zone_id
*/
class Hostgroup extends Model
{
Expand Down
6 changes: 3 additions & 3 deletions library/Icingadb/Model/Notification.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@
* @property string $notificationcommand_id
* @property ?int $times_begin
* @property ?int $times_end
* @property string $notification_interval
* @property int $notification_interval
* @property ?string $timeperiod_id
* @property array $states
* @property array $types
* @property string[] $states
* @property string[] $types
* @property ?string $zone_id
*/
class Notification extends Model
Expand Down
4 changes: 3 additions & 1 deletion library/Icingadb/Model/NotificationcommandArgument.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,13 @@
* @property string $environment_id
* @property string $properties_checksum
* @property ?string $argument_value
* @property ?string $argument_order
* @property ?int $argument_order
* @property ?string $description
* @property ?string $argument_key_override
* @property string $repeat_key
* @property string $required
* @property ?string $set_if
* @property ?string $separator
* @property string $skip_key
*/
class NotificationcommandArgument extends Model
Expand Down Expand Up @@ -50,6 +51,7 @@ public function getColumns()
'repeat_key',
'required',
'set_if',
'separator',
'skip_key'
];
}
Expand Down
5 changes: 5 additions & 0 deletions library/Icingadb/Model/ServiceState.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@
use Icinga\Module\Icingadb\Common\ServiceStates;
use ipl\Orm\Relations;

/**
* Service state model.
*
* @property string $service_id
*/
class ServiceState extends State
{
public function getTableName()
Expand Down
7 changes: 4 additions & 3 deletions library/Icingadb/Model/State.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
/**
* Base class for the {@link HostState} and {@link ServiceState} models providing common columns.
*
* @property string $id
* @property string $environment_id The environment id
* @property string $state_type The state type (hard or soft)
* @property int $soft_state The current soft state code (0 = OK, 1 = WARNING, 2 = CRITICAL, 3 = UNKNOWN)
Expand Down Expand Up @@ -44,9 +45,9 @@
* @property ?string $check_source The name of the node that executes the check
* @property ?string $scheduling_source The name of the node that schedules the check
* @property ?DateTime $last_update The time when the node was last updated
* @property ?DateTime $last_state_change The time when the node last got a status change
* @property ?DateTime $next_check The time when the node will execute the next check
* @property ?DateTime $next_update The time when the next check of the node is expected to end
* @property DateTime $last_state_change The time when the node last got a status change
* @property DateTime $next_check The time when the node will execute the next check
* @property DateTime $next_update The time when the next check of the node is expected to end
*/
abstract class State extends Model
{
Expand Down
4 changes: 2 additions & 2 deletions library/Icingadb/Model/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
* @property string $pager
* @property string $notifications_enabled
* @property ?string $timeperiod_id
* @property array $states
* @property array $types
* @property string[] $states
* @property string[] $types
* @property ?string $zone_id
*/
class User extends Model
Expand Down
1 change: 1 addition & 0 deletions library/Icingadb/Model/UserCustomvar.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
/**
* @property string $id
* @property string $customvar_id
* @property string $user_id
* @property string $environment_id
*/
class UserCustomvar extends Model
Expand Down
1 change: 1 addition & 0 deletions library/Icingadb/Model/UsergroupMember.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
/**
* @property string $id
* @property string $usergroup_id
* @property string $user_id
* @property string $environment_id
*/
class UsergroupMember extends Model
Expand Down
2 changes: 1 addition & 1 deletion library/Icingadb/Model/Zone.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
* @property string $name_ci
* @property string $is_global
* @property ?string $parent_id
* @property string $depth
* @property int $depth
*/
class Zone extends Model
{
Expand Down

0 comments on commit 66877a6

Please sign in to comment.