{"id":16877683,"url":"https://github.com/nikic/typeutil","last_synced_at":"2025-08-08T15:48:56.444Z","repository":{"id":29491537,"uuid":"33029054","full_name":"nikic/TypeUtil","owner":"nikic","description":"Utility for adding PHP 7 scalar types and return types","archived":false,"fork":false,"pushed_at":"2022-06-04T10:43:14.000Z","size":76,"stargazers_count":47,"open_issues_count":0,"forks_count":1,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-04T05:04:32.989Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nikic.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-03-28T10:12:32.000Z","updated_at":"2023-09-13T09:49:18.000Z","dependencies_parsed_at":"2022-08-24T07:10:17.361Z","dependency_job_id":null,"html_url":"https://github.com/nikic/TypeUtil","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/nikic/TypeUtil","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nikic%2FTypeUtil","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nikic%2FTypeUtil/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nikic%2FTypeUtil/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nikic%2FTypeUtil/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nikic","download_url":"https://codeload.github.com/nikic/TypeUtil/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nikic%2FTypeUtil/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262239785,"owners_count":23280393,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-13T15:44:50.884Z","updated_at":"2025-06-27T10:34:31.218Z","avatar_url":"https://github.com/nikic.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Utility for adding return types and scalar types\n\n\u003e **WARNING**: Utility directly modifies files under the assumption that you're using version control.\n\nTo add return types and scalar types based on doc comments, run:\n\n    php-7.1 type-util.php add dir1/ dir2/ ...\n\nTo remove all PHP 5 incompatible type information, run:\n\n    php-7.1 type-util.php remove dir1/ dir2/ ...\n\nNotes:\n\n * Not well tested - probably doesn't work in many cases\n * Uses only doc comments, so requires good doc comment coverage\n * Requires PHP 7.1 to run\n * The main job of this utility is dealing with the fact that PHP return types are semi-invariant\n   and argument types are fully invariant\n\n### Help Text\n\n```\nUsage: php ./type-util.php add|remove [--options] dir1 dir2 ...\n\nOptions:\n    --php VERSION         Enable all features supported up to VERSION\n                          E.g. --php 7.1\n    --[no-]object         Toggle generation of object type    (PHP 7.2)\n    --[no-]nullable-types Toggle generation of nullable types (PHP 7.1)\n    --[no-]iterable       Toggle generation of iterable type  (PHP 7.1)\n    --[no-]strict-types   Toggle use of strict_types          (PHP 7.0)\n\nExamples:\n    # Add everything that's possible!\n    php ./type-utils.php add path/to/dir\n    \n    # Only add features available in PHP 7.0\n    php ./type-utils.php --php 7.0\n    \n    # Add everything available in PHP 7.1, apart from strict types\n    php ./type-utils.php --php 7.1 --no-strict-types\n\nNOTE: Will directly modify files, assumes that you're using VCS.\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnikic%2Ftypeutil","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnikic%2Ftypeutil","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnikic%2Ftypeutil/lists"}