diff --git a/.php-cs-fixer.cache b/.php-cs-fixer.cache new file mode 100644 index 0000000..e2858ba --- /dev/null +++ b/.php-cs-fixer.cache @@ -0,0 +1 @@ +{"php":"8.1.1","version":"3.5.0","indent":" ","lineEnding":"\n","rules":{"blank_line_after_namespace":true,"braces":true,"class_definition":true,"constant_case":true,"elseif":true,"function_declaration":{"closure_function_spacing":"none"},"indentation_type":true,"line_ending":true,"lowercase_keywords":true,"method_argument_space":{"on_multiline":"ensure_fully_multiline","keep_multiple_spaces_after_comma":true},"no_break_comment":true,"no_closing_tag":true,"no_space_around_double_colon":true,"no_spaces_after_function_name":true,"no_spaces_inside_parenthesis":true,"no_trailing_whitespace":true,"no_trailing_whitespace_in_comment":true,"single_blank_line_at_eof":true,"single_class_element_per_statement":{"elements":["property"]},"single_import_per_statement":true,"single_line_after_imports":true,"switch_case_semicolon_to_colon":true,"switch_case_space":true,"visibility_required":{"elements":["method","property"]},"encoding":true,"full_opening_tag":true,"array_syntax":{"syntax":"short"},"ordered_imports":{"sort_algorithm":"length"},"no_unused_imports":true,"not_operator_with_successor_space":true,"trailing_comma_in_multiline":{"elements":["arrays"]},"phpdoc_scalar":true,"unary_operator_spaces":true,"binary_operator_spaces":{"operators":{"=":"align","=>":"align"}},"blank_line_before_statement":{"statements":["break","continue","declare","return","throw","try"]},"phpdoc_single_line_var_spacing":true,"phpdoc_var_without_name":true,"class_attributes_separation":{"elements":{"method":"one","property":"one"}},"method_chaining_indentation":true,"object_operator_without_whitespace":true,"no_superfluous_phpdoc_tags":true},"hashes":{"src\/Snowflakes.php":3308901728,"src\/Helpers.php":939704187,"src\/ServiceProvider.php":631057855,"tests\/Test.php":2777983535}} \ No newline at end of file diff --git a/src/Snowflakes.php b/src/Snowflakes.php index 1e925fb..7c4bf53 100644 --- a/src/Snowflakes.php +++ b/src/Snowflakes.php @@ -12,7 +12,7 @@ public static function bootSnowflakes() : void { static::creating(function($model) { if (! $model->getKey()) { - $model->{$model->getKeyName()} = snowflake(); + $model->{$model->getKeyName()} = snowflake(); } }); } @@ -25,4 +25,4 @@ public function getIncrementing() : bool { return false; } -} \ No newline at end of file +}