Should the single space around `=>` be stated as a general rule instead of per construct?
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 45/100
- Loại issue
- Tài liệu
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Ít trao đổi
- Công nghệ
- php
- Lĩnh vực
- documentation
Hướng nghiên cứu
Start in spec.md by comparing sections 4.9, 5.2, 5.5, 7.1, and 11, including their examples and stated spacing rules. Check the existing discussion for rationale, then document the agreed consistent rule in the relevant section or as a general rule, with examples and wording aligned throughout.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
PER explicitly requires a single space around the => symbol in two sections:
The
=>symbol MUST be preceded and succeeded by a space.
There MUST be a single space on either side of the
=>symbol.
The same operator is used in other constructs, but as far as I could check the spec does not state the spacing around it explicitly for them. Arrays (section 11), match (section 5.2) and foreach (section 5.5) only show a single space in their examples. There might be other places where => is used, but I haven't checked them all.
Is there a reason the rule is stated only for short closures and property hooks that I'm missing, or would it make sense to state it as a general rule so that it applies consistently to every use of =>? If there is a reason not to create a general rule, should it be added to the array, match and foreach sections?
- Ngôn ngữ chính
- Không có dữ liệu ngôn ngữ
- Star
- 284
- Fork
- 27
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của php-fig/per-coding-style
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
php-fig/per-coding-style#159 · 2 bình luận ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 48/100
php-fig/per-coding-style#149 · 1 bình luận ·
-
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 35/100
php-fig/per-coding-style#131 · 1 bình luận ·
-
Destructuring syntax (list() and [])Có thể đã có người làm @samdark đã nhận 50 ngày trước. Đang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 58/100
php-fig/per-coding-style#119 · 8 bình luận ·
Tất cả issue của php-fig/per-coding-style
Issue tương tự
-
documentation glm5 llm-model
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
vllm-project/vllm-ascend#19062 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 78/100
tursodatabase/turso#10052 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Mac mini M6 (16 GB): Q2_0 streaming works - measured 11.7->27.2 tok/s + arena fix for sub-32 GB MacsĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement needs triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
elastic/docs-builder#4495 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
cellrishi-code/claude-skills-atlas#165 ·
Maintainer thường phản hồi trong vòng 1 ngày