Skip to content
Navigation Menu
Sign in
Appearance settings
Platform
AI CODE CREATION
GitHub Copilot
Write better code with AI
GitHub Copilot app
Direct agents from issue to merge
MCP Registry
Integrate external tools
DEVELOPER WORKFLOWS
Actions
Automate any workflow
Codespaces
Instant dev environments
Issues
Plan and track work
Code Review
Manage code changes
Code Quality
Enforce quality at merge
APPLICATION SECURITY
GitHub Advanced Security
Find and fix vulnerabilities
Code security
Secure your code as you build
Secret protection
Stop leaks before they start
EXPLORE
Why GitHub
Documentation
Blog
Changelog
Marketplace
View all features
Solutions
BY COMPANY SIZE
Enterprises
Small and medium teams
Startups
Nonprofits
BY USE CASE
App Modernization
DevSecOps
DevOps
CI/CD
View all use cases
BY INDUSTRY
Healthcare
Financial services
Manufacturing
Government
View all industries
View all solutions
Resources
EXPLORE BY TOPIC
AI
Software Development
DevOps
Security
View all topics
EXPLORE BY TYPE
Customer stories
Events & webinars
Ebooks & reports
Business insights
GitHub Skills
SUPPORT & SERVICES
Documentation
Customer support
Community forum
Trust center
Partners
View all resources
Open Source
COMMUNITY
GitHub Sponsors
Fund open source developers
PROGRAMS
Security Lab
Maintainer Community
Accelerator
GitHub Stars
Archive Program
REPOSITORIES
Topics
Trending
Collections
Enterprise
ENTERPRISE SOLUTIONS
Enterprise platform
AI-powered developer platform
AVAILABLE ADD-ONS
GitHub Advanced Security
Enterprise-grade security features
Copilot for Business
Enterprise-grade AI features
Premium Support
Enterprise-grade 24/7 support
Pricing
Search
/
Sign in
Sign up
Appearance settings
You signed in with another tab or window.
Reload
to refresh your session.
You signed out in another tab or window.
Reload
to refresh your session.
You switched accounts on another tab or window.
Reload
to refresh your session.
Dismiss alert
{{ message }}
peter17
/
phpstan-src
Public
forked from
phpstan/phpstan-src
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Security and quality
0
Insights
Additional navigation options
Code
Security and quality
Insights
Commits
Breadcrumbs
History for
phpstan-src
src
Type
StaticType.php
on
patch3
User selector
All users
Datepicker
All time
Commit history
Commits on Jun 17, 2026
Remember method/static call expression as truthy/falsey alongside `@phpstan-assert-if-true` argument narrowing (#5880)
Show description for ca1918c
phpstan-bot
and
staabm
authored
ca1918c
View commit details
Copy full SHA for ca1918c
View code at this point
Browse repository at this point
Commits on May 19, 2026
Merge branch 2.1.x into 2.2.x
phpstan-bot
committed
3bd3b71
View commit details
Copy full SHA for 3bd3b71
View code at this point
Browse repository at this point
Extract `Type::truncateListToSize()` from `TypeSpecifier`
Show description for 852f99c
ondrejmirtes
and
claude
committed
852f99c
View commit details
Copy full SHA for 852f99c
View code at this point
Browse repository at this point
Commits on May 12, 2026
Merge branch 2.1.x into 2.2.x
phpstan-bot
committed
496aafe
View commit details
Copy full SHA for 496aafe
View code at this point
Browse repository at this point
Remove sortArray in favour of shuffleArray
ondrejmirtes
committed
6b6301a
View commit details
Copy full SHA for 6b6301a
View code at this point
Browse repository at this point
Commits on May 7, 2026
Merge branch 2.1.x into 2.2.x
phpstan-bot
committed
ff9424d
View commit details
Copy full SHA for ff9424d
View code at this point
Browse repository at this point
Extract `Type::sortArray()` for `sort` / `rsort` / `usort`
Show description for 5d45463
ondrejmirtes
committed
5d45463
View commit details
Copy full SHA for 5d45463
View code at this point
Browse repository at this point
Merge branch 2.1.x into 2.2.x
phpstan-bot
committed
f92aaba
View commit details
Copy full SHA for f92aaba
View code at this point
Browse repository at this point
Extract `Type::toObjectTypeForIsACheck()` for `is_a($x, $class, $allowString)`
Show description for de99d53
ondrejmirtes
committed
de99d53
View commit details
Copy full SHA for de99d53
View code at this point
Browse repository at this point
Extract `Type::toObjectTypeForInstanceofCheck()` for `instanceof` RHS
Show description for 2ffb575
ondrejmirtes
committed
2ffb575
View commit details
Copy full SHA for 2ffb575
View code at this point
Browse repository at this point
Extract `Type::toClassConstantType()` for `$x::class`
Show description for 1c881cf
ondrejmirtes
committed
1c881cf
View commit details
Copy full SHA for 1c881cf
View code at this point
Browse repository at this point
Extract `Type::toGetClassResultType()` for `get_class($x)`
Show description for 630e69d
ondrejmirtes
committed
630e69d
View commit details
Copy full SHA for 630e69d
View code at this point
Browse repository at this point
Extract `Type::toBitwiseNotType()` for `~$x`
Show description for b59da45
ondrejmirtes
committed
b59da45
View commit details
Copy full SHA for b59da45
View code at this point
Browse repository at this point
Merge remote-tracking branch 'origin/2.1.x' into 2.2.x
ondrejmirtes
committed
a9ab57b
View commit details
Copy full SHA for a9ab57b
View code at this point
Browse repository at this point
Add Type::makeAllArrayKeysOptional() for preg_replace* array fast path
Show description for aa6f4af
ondrejmirtes
committed
aa6f4af
View commit details
Copy full SHA for aa6f4af
View code at this point
Browse repository at this point
Extract `Type::mapKeyType(callable)` and use it alongside `mapValueType` in NodeScopeResolver
Show description for 03bb78d
ondrejmirtes
committed
03bb78d
View commit details
Copy full SHA for 03bb78d
View code at this point
Browse repository at this point
Extract `Type::filterArrayRemovingFalsey()` for `array_filter` no-callback path
Show description for 4c69f86
ondrejmirtes
committed
4c69f86
View commit details
Copy full SHA for 4c69f86
View code at this point
Browse repository at this point
Extract `Type::changeKeyCaseArray(?int)` for `array_change_key_case`
Show description for e2140ec
ondrejmirtes
committed
e2140ec
View commit details
Copy full SHA for e2140ec
View code at this point
Browse repository at this point
Extract `Type::mapValueType(callable)` for "same keys, transformed values"
Show description for beb6fd8
ondrejmirtes
committed
beb6fd8
View commit details
Copy full SHA for beb6fd8
View code at this point
Browse repository at this point
Extract `Type::makeListMaybe()` for sort functions that drop list-ness
Show description for 952bd76
ondrejmirtes
committed
952bd76
View commit details
Copy full SHA for 952bd76
View code at this point
Browse repository at this point
Commits on Mar 24, 2026
New types: decimal-int-string and non-decimal-int-string
ondrejmirtes
authored
9c3b6d5
View commit details
Copy full SHA for 9c3b6d5
View code at this point
Browse repository at this point
Commits on Mar 13, 2026
Fix phpstan/phpstan#4860: Error „should return static(Test) but returns Test“ (#5190)
Show description for dcdd6fa
phpstan-bot
and
github-actions[bot]
authored
dcdd6fa
View commit details
Copy full SHA for dcdd6fa
View code at this point
Browse repository at this point
Commits on Mar 1, 2026
Fix phpstan/phpstan#12244: `$this(Type~Subtracted)` does not work on conditional return type as `Type~Subtracted` (#5104)
Show description for 4b2e7e5
3 people
authored
4b2e7e5
View commit details
Copy full SHA for 4b2e7e5
View code at this point
Browse repository at this point
Commits on Feb 23, 2026
Fix `get_class` return type
VincentLanglet
authored
cb33ec0
View commit details
Copy full SHA for cb33ec0
View code at this point
Browse repository at this point
Commits on Feb 12, 2026
Downgrade $this to static when calling methods on static type
Show description for e30d1e5
ondrejmirtes
committed
e30d1e5
View commit details
Copy full SHA for e30d1e5
View code at this point
Browse repository at this point
Commits on Jan 17, 2026
Cache StaticType and ObjectType::getMethod()
ondrejmirtes
committed
270b546
View commit details
Copy full SHA for 270b546
View code at this point
Browse repository at this point
Commits on Jan 11, 2026
Implement Type->getEnumCaseObject()
staabm
authored and
ondrejmirtes
committed
0e2eb5c
View commit details
Copy full SHA for 0e2eb5c
View code at this point
Browse repository at this point
Commits on Jan 7, 2026
Decrease usage of TypeTraverser
ondrejmirtes
committed
93b9c34
View commit details
Copy full SHA for 93b9c34
View code at this point
Browse repository at this point
Commits on Nov 11, 2025
Revert "add Type::isNever and Type::isExplicitNever methods"
Show description for e52e074
ondrejmirtes
committed
e52e074
View commit details
Copy full SHA for e52e074
View code at this point
Browse repository at this point
Revert "replace instanceof NeverType with isNever method"
Show description for a508d44
ondrejmirtes
committed
a508d44
View commit details
Copy full SHA for a508d44
View code at this point
Browse repository at this point
replace instanceof NeverType with isNever method
canvural
authored and
ondrejmirtes
committed
f0d21a7
View commit details
Copy full SHA for f0d21a7
View code at this point
Browse repository at this point
add Type::isNever and Type::isExplicitNever methods
canvural
authored and
ondrejmirtes
committed
77035d4
View commit details
Copy full SHA for 77035d4
View code at this point
Browse repository at this point
Commits on Oct 31, 2025
add array_first and array_last return type extensions (#4499)
canvural
authored
46c2519
View commit details
Copy full SHA for 46c2519
View code at this point
Browse repository at this point
Commits on Sep 14, 2025
Difference between Instance and Static properties
VincentLanglet
authored
8f7e973
View commit details
Copy full SHA for 8f7e973
View code at this point
Browse repository at this point
Commits on Jul 21, 2025
Improve array_search inference
VincentLanglet
authored
265d444
View commit details
Copy full SHA for 265d444
View code at this point
Browse repository at this point
Previous
Next
You can’t perform that action at this time.