{"id":13828397,"url":"https://github.com/phpstan/phpstan-webmozart-assert","last_synced_at":"2025-05-14T21:06:07.500Z","repository":{"id":31861134,"uuid":"129645168","full_name":"phpstan/phpstan-webmozart-assert","owner":"phpstan","description":"PHPStan extension for webmozart/assert","archived":false,"fork":false,"pushed_at":"2025-04-15T15:31:41.000Z","size":243,"stargazers_count":169,"open_issues_count":8,"forks_count":27,"subscribers_count":6,"default_branch":"2.0.x","last_synced_at":"2025-04-23T19:27:02.503Z","etag":null,"topics":["assert","php","php7","phpstan","static-analysis","static-code-analysis"],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/phpstan.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2018-04-15T19:51:51.000Z","updated_at":"2025-04-15T15:31:00.000Z","dependencies_parsed_at":"2023-12-27T08:39:06.634Z","dependency_job_id":"4dd4aa16-9808-45c7-b541-4e2b42cab1c6","html_url":"https://github.com/phpstan/phpstan-webmozart-assert","commit_stats":{"total_commits":209,"total_committers":27,"mean_commits":"7.7407407407407405","dds":0.6172248803827751,"last_synced_commit":"0c641817d2a8f05c7157f92d91986e74d3c8ab0c"},"previous_names":[],"tags_count":49,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phpstan%2Fphpstan-webmozart-assert","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phpstan%2Fphpstan-webmozart-assert/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phpstan%2Fphpstan-webmozart-assert/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phpstan%2Fphpstan-webmozart-assert/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/phpstan","download_url":"https://codeload.github.com/phpstan/phpstan-webmozart-assert/tar.gz/refs/heads/2.0.x","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251089408,"owners_count":21534511,"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":["assert","php","php7","phpstan","static-analysis","static-code-analysis"],"created_at":"2024-08-04T09:02:44.592Z","updated_at":"2025-05-14T21:06:07.457Z","avatar_url":"https://github.com/phpstan.png","language":"PHP","readme":"# PHPStan webmozart/assert extension\n\n[![Build](https://github.com/phpstan/phpstan-webmozart-assert/workflows/Build/badge.svg)](https://github.com/phpstan/phpstan-webmozart-assert/actions)\n[![Latest Stable Version](https://poser.pugx.org/phpstan/phpstan-webmozart-assert/v/stable)](https://packagist.org/packages/phpstan/phpstan-webmozart-assert)\n[![License](https://poser.pugx.org/phpstan/phpstan-webmozart-assert/license)](https://packagist.org/packages/phpstan/phpstan-webmozart-assert)\n\n* [PHPStan](https://phpstan.org/)\n* [webmozart/assert](https://github.com/webmozart/assert)\n\n## Description\n\nThe main scope of this extension is to help PHPStan to detect the type of object after the `Webmozart\\Assert\\Assert` validation.\n\n```php\n\u003c?php declare(strict_types = 1);\n\nuse Webmozart\\Assert\\Assert;\n\nfunction demo(?int $a) {\n\t// ...\n\n\tAssert::integer($a);\n\t// PHPStan is now aware that $a can no longer be `null` at this point\n\n\treturn ($a === 10);\n}\n```\n\n## Installation\n\nTo use this extension, require it in [Composer](https://getcomposer.org/):\n\n```\ncomposer require --dev phpstan/phpstan-webmozart-assert\n```\n\nIf you also install [phpstan/extension-installer](https://github.com/phpstan/extension-installer) then you're all set!\n\n\u003cdetails\u003e\n  \u003csummary\u003eManual installation\u003c/summary\u003e\n\nIf you don't want to use `phpstan/extension-installer`, include extension.neon in your project's PHPStan config:\n\n```\nincludes:\n    - vendor/phpstan/phpstan-webmozart-assert/extension.neon\n```\n\u003c/details\u003e\n","funding_links":[],"categories":["PHP"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphpstan%2Fphpstan-webmozart-assert","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fphpstan%2Fphpstan-webmozart-assert","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphpstan%2Fphpstan-webmozart-assert/lists"}