René's URL Explorer Experiment


Title: rfc recursive return type definitions · Issue #9 · phpstan/phpdoc-parser · GitHub

Open Graph Title: rfc recursive return type definitions · Issue #9 · phpstan/phpdoc-parser

X Title: rfc recursive return type definitions · Issue #9 · phpstan/phpdoc-parser

Description: /** * @return array>> */ function DoThingWithNode(DOMNode $node) : array { /* do stuff here */ } So I have this method that return an array with string keys whose values a...

Open Graph Description: /** * @return array>> */ function DoThingWithNode(DOMNode $node) : array { /* do stuff here */ } So I have this method that return ...

X Description: /** * @return array<string, scalar|array<int, array<{{recursive definition is here}}>>> */ function DoThingWithNode(DOMNode $node) : array { /* do stuff here */ } So I have this m...

Opengraph URL: https://github.com/phpstan/phpdoc-parser/issues/9

X: @github

direct link

Domain: patch-diff.githubusercontent.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"rfc recursive return type definitions","articleBody":"```php\r\n/**\r\n* @return array\u003cstring, scalar|array\u003cint, array\u003c{{recursive definition is here}}\u003e\u003e\u003e\r\n*/\r\nfunction DoThingWithNode(DOMNode $node) : array { /* do stuff here */ }\r\n```\r\n\r\nSo I have this method that return an array with string keys whose values are either scalars or arrays with string keys whose values are either scalars or arrays with string keys whose values are either scalars with string keys..... etc.\r\n\r\nIf the definition stops at array, then one would just assume that phpstan et. al would determine that values at that level are \"mixed\" (or otherwise defined), which may be an undesirable effect.\r\n\r\nOne solution to the recursive `@return`/`@param` problem could be to define a class that encapsulates the recursion- i.e. `class Thing extends ArrayObject` \u0026 modify the return types to indicate `scalar|Thing`, but I'd be wanting to avoid class definitions.\r\n\r\nA docblock-type solution would be to define a template/pattern tag so one could `@thing foo array\u003cstring, scalar|array\u003cstring, {{@thing foo}}\u003e` , but I could foresee problems by virtue of it being a recursive solution to a recursive problem.\r\n\r\nThoughts?\r\n\r\np.s. the recursion here comes from the return type possibly containing arrays of the return type of the method, so maybe `@return array\u003cstring, scalar|{{@method DoThingWithNode}}||{{@method DoSomeOtherThingWithNode}}\u003e` might be a solution by explicitly indicating the return values is built up from other methods ?","author":{"url":"https://github.com/SignpostMarv","@type":"Person","name":"SignpostMarv"},"datePublished":"2018-04-01T11:42:44.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/9/phpdoc-parser/issues/9"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:13226845-9a1e-e732-864b-9e276c068eec
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idDE80:E194E:17CAAB9:1F8BD65:696B846C
html-safe-nonce4f7e51854c1fbb2b42b5b3543b10994fe9f7afea57a8301e3e2b58eaf49ed6d2
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJERTgwOkUxOTRFOjE3Q0FBQjk6MUY4QkQ2NTo2OTZCODQ2QyIsInZpc2l0b3JfaWQiOiI0NzE2NTUyMTUyMTQ4NTc1MzQwIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmacbd3ddfeaf7570f83a0e89584dc6a44b47a6f53f2f066f77037c42c061c6572ea
hovercard-subject-tagissue:310317480
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/phpstan/phpdoc-parser/9/issue_layout
twitter:imagehttps://opengraph.githubassets.com/b55d9c99fccd88c7a062d77aac25256cd42598a9073e1a284a7ac98c4cd80c02/phpstan/phpdoc-parser/issues/9
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/b55d9c99fccd88c7a062d77aac25256cd42598a9073e1a284a7ac98c4cd80c02/phpstan/phpdoc-parser/issues/9
og:image:alt/** * @return array>> */ function DoThingWithNode(DOMNode $node) : array { /* do stuff here */ } So I have this method that return ...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameSignpostMarv
hostnamegithub.com
expected-hostnamegithub.com
None5f99f7c1d70f01da5b93e5ca90303359738944d8ab470e396496262c66e60b8d
turbo-cache-controlno-preview
go-importgithub.com/phpstan/phpdoc-parser git https://github.com/phpstan/phpdoc-parser.git
octolytics-dimension-user_id16435710
octolytics-dimension-user_loginphpstan
octolytics-dimension-repository_id111290081
octolytics-dimension-repository_nwophpstan/phpdoc-parser
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id111290081
octolytics-dimension-repository_network_root_nwophpstan/phpdoc-parser
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release82560a55c6b2054555076f46e683151ee28a19bc
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://patch-diff.githubusercontent.com/phpstan/phpdoc-parser/issues/9#start-of-content
https://patch-diff.githubusercontent.com/
Sign in https://patch-diff.githubusercontent.com/login?return_to=https%3A%2F%2Fgithub.com%2Fphpstan%2Fphpdoc-parser%2Fissues%2F9
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub SparkBuild and deploy intelligent appshttps://github.com/features/spark
GitHub ModelsManage and compare promptshttps://github.com/features/models
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://patch-diff.githubusercontent.com/login?return_to=https%3A%2F%2Fgithub.com%2Fphpstan%2Fphpdoc-parser%2Fissues%2F9
Sign up https://patch-diff.githubusercontent.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=phpstan%2Fphpdoc-parser
Reloadhttps://patch-diff.githubusercontent.com/phpstan/phpdoc-parser/issues/9
Reloadhttps://patch-diff.githubusercontent.com/phpstan/phpdoc-parser/issues/9
Reloadhttps://patch-diff.githubusercontent.com/phpstan/phpdoc-parser/issues/9
phpstan https://patch-diff.githubusercontent.com/phpstan
phpdoc-parserhttps://patch-diff.githubusercontent.com/phpstan/phpdoc-parser
Notifications https://patch-diff.githubusercontent.com/login?return_to=%2Fphpstan%2Fphpdoc-parser
Fork 66 https://patch-diff.githubusercontent.com/login?return_to=%2Fphpstan%2Fphpdoc-parser
Star 1.5k https://patch-diff.githubusercontent.com/login?return_to=%2Fphpstan%2Fphpdoc-parser
Code https://patch-diff.githubusercontent.com/phpstan/phpdoc-parser
Issues 8 https://patch-diff.githubusercontent.com/phpstan/phpdoc-parser/issues
Pull requests 8 https://patch-diff.githubusercontent.com/phpstan/phpdoc-parser/pulls
Actions https://patch-diff.githubusercontent.com/phpstan/phpdoc-parser/actions
Projects 0 https://patch-diff.githubusercontent.com/phpstan/phpdoc-parser/projects
Security Uh oh! There was an error while loading. Please reload this page. https://patch-diff.githubusercontent.com/phpstan/phpdoc-parser/security
Please reload this pagehttps://patch-diff.githubusercontent.com/phpstan/phpdoc-parser/issues/9
Insights https://patch-diff.githubusercontent.com/phpstan/phpdoc-parser/pulse
Code https://patch-diff.githubusercontent.com/phpstan/phpdoc-parser
Issues https://patch-diff.githubusercontent.com/phpstan/phpdoc-parser/issues
Pull requests https://patch-diff.githubusercontent.com/phpstan/phpdoc-parser/pulls
Actions https://patch-diff.githubusercontent.com/phpstan/phpdoc-parser/actions
Projects https://patch-diff.githubusercontent.com/phpstan/phpdoc-parser/projects
Security https://patch-diff.githubusercontent.com/phpstan/phpdoc-parser/security
Insights https://patch-diff.githubusercontent.com/phpstan/phpdoc-parser/pulse
New issuehttps://patch-diff.githubusercontent.com/login?return_to=https://github.com/phpstan/phpdoc-parser/issues/9
New issuehttps://patch-diff.githubusercontent.com/login?return_to=https://github.com/phpstan/phpdoc-parser/issues/9
rfc recursive return type definitionshttps://patch-diff.githubusercontent.com/phpstan/phpdoc-parser/issues/9#top
https://github.com/SignpostMarv
https://github.com/SignpostMarv
SignpostMarvhttps://github.com/SignpostMarv
on Apr 1, 2018https://github.com/phpstan/phpdoc-parser/issues/9#issue-310317480
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.