3131final readonly class KanbanConfig implements Wireable
3232{
3333 public function __construct (
34- private string $ columnField = 'status ' ,
35- private array $ columnValues = [],
36- private array |bool |null $ columnColors = null ,
37- private string $ titleField = 'title ' ,
38- private ?string $ descriptionField = null ,
39- private ?string $ priorityField = null ,
40- private array $ cardAttributes = [],
41- private ?array $ cardAttributeColors = [],
42- private ?array $ cardAttributeIcons = [],
43- private ?string $ orderField = null ,
44- private ?string $ cardLabel = null ,
45- private ?string $ pluralCardLabel = null ,
46- )
47- {
48- }
34+ private string $ columnField = 'status ' ,
35+ private array $ columnValues = [],
36+ private array | bool | null $ columnColors = null ,
37+ private string $ titleField = 'title ' ,
38+ private ?string $ descriptionField = null ,
39+ private ?string $ priorityField = null ,
40+ private array $ cardAttributes = [],
41+ private ?array $ cardAttributeColors = [],
42+ private ?array $ cardAttributeIcons = [],
43+ private ?string $ orderField = null ,
44+ private ?string $ cardLabel = null ,
45+ private ?string $ pluralCardLabel = null ,
46+ ) {}
4947
5048 /**
5149 * Get the field that stores the column value.
@@ -72,7 +70,7 @@ public function getColumnValues(): array
7270 *
7371 * @return array|bool|null Map of column values to color codes, or null if not set
7472 */
75- public function getColumnColors (): array | bool | null
73+ public function getColumnColors (): array | bool | null
7674 {
7775 return $ this ->columnColors ;
7876 }
@@ -166,8 +164,8 @@ public function getPluralCardLabel(): string
166164 /**
167165 * Get the default form schema for creating cards.
168166 *
169- * @param string $titleField The field name used for card titles
170- * @param string|null $descriptionField Optional field name for card descriptions
167+ * @param string $titleField The field name used for card titles
168+ * @param string|null $descriptionField Optional field name for card descriptions
171169 * @return array<Component> The default form schema
172170 */
173171 public static function getDefaultCreateFormSchema (string $ titleField , ?string $ descriptionField ): array
@@ -190,19 +188,18 @@ public static function getDefaultCreateFormSchema(string $titleField, ?string $d
190188 /**
191189 * Get the default form schema for editing cards.
192190 *
193- * @param string $titleField The field name used for card titles
194- * @param string|null $descriptionField Optional field name for card descriptions
195- * @param string $columnField The field name that determines which column a card belongs to
196- * @param array<string, string> $columnValues Available column values with their labels
191+ * @param string $titleField The field name used for card titles
192+ * @param string|null $descriptionField Optional field name for card descriptions
193+ * @param string $columnField The field name that determines which column a card belongs to
194+ * @param array<string, string> $columnValues Available column values with their labels
197195 * @return array<Component> The default form schema
198196 */
199197 public static function getDefaultEditFormSchema (
200- string $ titleField ,
198+ string $ titleField ,
201199 ?string $ descriptionField ,
202- string $ columnField ,
203- array $ columnValues
204- ): array
205- {
200+ string $ columnField ,
201+ array $ columnValues
202+ ): array {
206203 $ schema = [
207204 TextInput::make ($ titleField )
208205 ->required ()
@@ -229,21 +226,21 @@ public static function getDefaultEditFormSchema(
229226 * For example, `withColumnField('status')` will create a new configuration
230227 * with the columnField property set to 'status'.
231228 *
232- * @param string $method The method name
233- * @param array $arguments The method arguments
229+ * @param string $method The method name
230+ * @param array $arguments The method arguments
234231 * @return self A new instance with the updated property
235232 *
236233 * @throws \BadMethodCallException If the method is not a valid with* method or targets a non-existent property
237234 */
238235 public function __call (string $ method , array $ arguments ): self
239236 {
240- if (!Str::startsWith ($ method , 'with ' )) {
237+ if (! Str::startsWith ($ method , 'with ' )) {
241238 throw new \BadMethodCallException ("Method {$ method } not found " );
242239 }
243240
244241 $ property = lcfirst (Str::after ($ method , 'with ' ));
245242
246- if (!property_exists ($ this , $ property )) {
243+ if (! property_exists ($ this , $ property )) {
247244 throw new \BadMethodCallException ("Property {$ property } not found " );
248245 }
249246
@@ -253,7 +250,7 @@ public function __call(string $method, array $arguments): self
253250 /**
254251 * Create a new configuration with the specified properties updated.
255252 *
256- * @param array<string, mixed> $properties The properties to update
253+ * @param array<string, mixed> $properties The properties to update
257254 * @return self A new instance with the updated properties
258255 */
259256 public function with (array $ properties ): self
0 commit comments