Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@

*.php text diff=php

# Keep Claude tooling scripts out of GitHub's language statistics
/.claude export-ignore

# Dev-only, excluded from the Packagist tarball
/.github export-ignore
/docs export-ignore
Expand Down
12 changes: 12 additions & 0 deletions .github/copilot-instructions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Copilot instructions

## Context

PHP library in the tiny-blocks ecosystem.

## Mandatory pre-task step

Before starting any task, read and strictly follow `.claude/CLAUDE.md` and every rule file in
`.claude/rules/`. These files are the absolute source of truth for code generation. Apply every
rule strictly. Do not deviate from the patterns, folder structure, or naming conventions defined
in them.
4 changes: 1 addition & 3 deletions phpstan.neon.dist
Original file line number Diff line number Diff line change
Expand Up @@ -3,26 +3,24 @@ parameters:
paths:
- src
- tests
tmpDir: reports/phpstan
ignoreErrors:
# The bcmath stubs type every operand as numeric-string. The library validates the shape
# before a value reaches a calculator, and the Calculator contract documents it, so the
# narrowing cannot be expressed without PHPDoc, which is prohibited inside src/Internal/.
- identifier: argument.type
path: src/Internal/Backends/BcMathCalculator.php

# PHPDoc is prohibited on concrete collaborators inside src/Internal/, so the working
# lists inside the allocation algorithm are suppressed here rather than annotated.
- identifier: argument.type
path: src/Internal/Allocations/Allocation.php
- identifier: missingType.iterableValue
path: src/Internal/Allocations/Allocation.php

# Schoolbook multiplication fills the product by computed index, so PHPStan cannot prove the
# result is still a list. It is: every index from zero upward is written before it is read.
- identifier: argument.type
path: src/Internal/Backends/Magnitude.php
count: 1

# PHPDoc is prohibited inside tests/, so data provider return types are suppressed here
# rather than annotated.
- identifier: missingType.iterableValue
Expand Down