2828final readonly class KanbanConfig
2929{
3030 public function __construct (
31- private string $ columnField = 'status ' ,
32- private array $ columnValues = [],
33- private ?array $ columnColors = null ,
34- private string $ titleField = 'title ' ,
31+ private string $ columnField = 'status ' ,
32+ private array $ columnValues = [],
33+ private ?array $ columnColors = null ,
34+ private string $ titleField = 'title ' ,
3535 private ?string $ descriptionField = null ,
36- private array $ cardAttributes = [],
36+ private array $ cardAttributes = [],
3737 private ?string $ orderField = null ,
3838 private ?string $ cardLabel = null ,
3939 private ?string $ pluralCardLabel = null ,
40- ) {
41- }
40+ ) {}
4241
4342 /**
4443 * Get the field that stores the column value.
@@ -133,8 +132,8 @@ public function getPluralCardLabel(): ?string
133132 /**
134133 * Get the default form schema for creating cards.
135134 *
136- * @param string $titleField The field name used for card titles
137- * @param string|null $descriptionField Optional field name for card descriptions
135+ * @param string $titleField The field name used for card titles
136+ * @param string|null $descriptionField Optional field name for card descriptions
138137 * @return array<\Filament\Forms\Components\Component> The default form schema
139138 */
140139 public static function getDefaultCreateFormSchema (string $ titleField , ?string $ descriptionField ): array
@@ -155,10 +154,10 @@ public static function getDefaultCreateFormSchema(string $titleField, ?string $d
155154 /**
156155 * Get the default form schema for editing cards.
157156 *
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
157+ * @param string $titleField The field name used for card titles
158+ * @param string|null $descriptionField Optional field name for card descriptions
159+ * @param string $columnField The field name that determines which column a card belongs to
160+ * @param array<string, string> $columnValues Available column values with their labels
162161 * @return array<\Filament\Forms\Components\Component> The default form schema
163162 */
164163 public static function getDefaultEditFormSchema (
@@ -192,20 +191,21 @@ public static function getDefaultEditFormSchema(
192191 * For example, `withColumnField('status')` will create a new configuration
193192 * with the columnField property set to 'status'.
194193 *
195- * @param string $method The method name
196- * @param array $arguments The method arguments
194+ * @param string $method The method name
195+ * @param array $arguments The method arguments
197196 * @return self A new instance with the updated property
197+ *
198198 * @throws \BadMethodCallException If the method is not a valid with* method or targets a non-existent property
199199 */
200200 public function __call (string $ method , array $ arguments ): self
201201 {
202- if (!Str::startsWith ($ method , 'with ' )) {
202+ if (! Str::startsWith ($ method , 'with ' )) {
203203 throw new \BadMethodCallException ("Method {$ method } not found " );
204204 }
205205
206206 $ property = lcfirst (Str::after ($ method , 'with ' ));
207207
208- if (!property_exists ($ this , $ property )) {
208+ if (! property_exists ($ this , $ property )) {
209209 throw new \BadMethodCallException ("Property {$ property } not found " );
210210 }
211211
@@ -215,7 +215,7 @@ public function __call(string $method, array $arguments): self
215215 /**
216216 * Create a new configuration with the specified properties updated.
217217 *
218- * @param array<string, mixed> $properties The properties to update
218+ * @param array<string, mixed> $properties The properties to update
219219 * @return self A new instance with the updated properties
220220 */
221221 public function with (array $ properties ): self
0 commit comments