wip: booking process

This commit is contained in:
Björn Fromme
2025-07-14 17:15:15 +02:00
parent a55e30e12d
commit bef18971c3
45 changed files with 688 additions and 270 deletions
+17
View File
@@ -1,7 +1,16 @@
<?php
declare(strict_types=1);
namespace App\BusProNet\Model;
/**
* Represents a notification with code and message information.
*
* This class handles notification data including error codes and messages
* for API response handling. It provides methods to determine if the
* notification represents an error condition.
*/
class Notification
{
public function __construct(int $code, string $message)
@@ -13,6 +22,14 @@ class Notification
public ?int $code;
public ?string $message;
/**
* Determines if the notification represents an error.
*
* Returns true if the notification code is not 650 (success code).
* Code 650 is used for successful operations in the BusProNet API.
*
* @return bool True if the notification is an error, false otherwise
*/
public function isError(): bool
{
return 650 !== $this->code;