2929final readonly class KanbanConfig implements Wireable
3030{
3131 public function __construct (
32- private string $ columnField = 'status ' ,
33- private array $ columnValues = [],
34- private array |bool |null $ columnColors = null ,
35- private string $ titleField = 'title ' ,
36- private ?string $ descriptionField = null ,
37- private array $ cardAttributes = [],
38- private ?string $ orderField = null ,
39- private ?string $ cardLabel = null ,
40- private ?string $ pluralCardLabel = null ,
41- )
42- {
43- }
32+ private string $ columnField = 'status ' ,
33+ private array $ columnValues = [],
34+ private array | bool | null $ columnColors = null ,
35+ private string $ titleField = 'title ' ,
36+ private ?string $ descriptionField = null ,
37+ private array $ cardAttributes = [],
38+ private ?string $ orderField = null ,
39+ private ?string $ cardLabel = null ,
40+ private ?string $ pluralCardLabel = null ,
41+ ) {}
4442
4543 /**
4644 * Get the field that stores the column value.
@@ -67,7 +65,7 @@ public function getColumnValues(): array
6765 *
6866 * @return array|bool|null Map of column values to color codes, or null if not set
6967 */
70- public function getColumnColors (): array | bool | null
68+ public function getColumnColors (): array | bool | null
7169 {
7270 return $ this ->columnColors ;
7371 }
@@ -135,8 +133,8 @@ public function getPluralCardLabel(): ?string
135133 /**
136134 * Get the default form schema for creating cards.
137135 *
138- * @param string $titleField The field name used for card titles
139- * @param string|null $descriptionField Optional field name for card descriptions
136+ * @param string $titleField The field name used for card titles
137+ * @param string|null $descriptionField Optional field name for card descriptions
140138 * @return array<\Filament\Forms\Components\Component> The default form schema
141139 */
142140 public static function getDefaultCreateFormSchema (string $ titleField , ?string $ descriptionField ): array
@@ -157,19 +155,18 @@ public static function getDefaultCreateFormSchema(string $titleField, ?string $d
157155 /**
158156 * Get the default form schema for editing cards.
159157 *
160- * @param string $titleField The field name used for card titles
161- * @param string|null $descriptionField Optional field name for card descriptions
162- * @param string $columnField The field name that determines which column a card belongs to
163- * @param array<string, string> $columnValues Available column values with their labels
158+ * @param string $titleField The field name used for card titles
159+ * @param string|null $descriptionField Optional field name for card descriptions
160+ * @param string $columnField The field name that determines which column a card belongs to
161+ * @param array<string, string> $columnValues Available column values with their labels
164162 * @return array<\Filament\Forms\Components\Component> The default form schema
165163 */
166164 public static function getDefaultEditFormSchema (
167- string $ titleField ,
165+ string $ titleField ,
168166 ?string $ descriptionField ,
169- string $ columnField ,
170- array $ columnValues
171- ): array
172- {
167+ string $ columnField ,
168+ array $ columnValues
169+ ): array {
173170 $ schema = [
174171 TextInput::make ($ titleField )
175172 ->required ()
@@ -195,21 +192,21 @@ public static function getDefaultEditFormSchema(
195192 * For example, `withColumnField('status')` will create a new configuration
196193 * with the columnField property set to 'status'.
197194 *
198- * @param string $method The method name
199- * @param array $arguments The method arguments
195+ * @param string $method The method name
196+ * @param array $arguments The method arguments
200197 * @return self A new instance with the updated property
201198 *
202199 * @throws \BadMethodCallException If the method is not a valid with* method or targets a non-existent property
203200 */
204201 public function __call (string $ method , array $ arguments ): self
205202 {
206- if (!Str::startsWith ($ method , 'with ' )) {
203+ if (! Str::startsWith ($ method , 'with ' )) {
207204 throw new \BadMethodCallException ("Method {$ method } not found " );
208205 }
209206
210207 $ property = lcfirst (Str::after ($ method , 'with ' ));
211208
212- if (!property_exists ($ this , $ property )) {
209+ if (! property_exists ($ this , $ property )) {
213210 throw new \BadMethodCallException ("Property {$ property } not found " );
214211 }
215212
@@ -219,7 +216,7 @@ public function __call(string $method, array $arguments): self
219216 /**
220217 * Create a new configuration with the specified properties updated.
221218 *
222- * @param array<string, mixed> $properties The properties to update
219+ * @param array<string, mixed> $properties The properties to update
223220 * @return self A new instance with the updated properties
224221 */
225222 public function with (array $ properties ): self
0 commit comments