{"id":20018388,"url":"https://github.com/phpstan/phpstan-mockery","last_synced_at":"2025-04-04T19:13:06.861Z","repository":{"id":32782783,"uuid":"142478135","full_name":"phpstan/phpstan-mockery","owner":"phpstan","description":"PHPStan extension for Mockery","archived":false,"fork":false,"pushed_at":"2024-03-28T15:44:10.000Z","size":132,"stargazers_count":77,"open_issues_count":8,"forks_count":19,"subscribers_count":5,"default_branch":"1.1.x","last_synced_at":"2024-04-14T05:41:30.791Z","etag":null,"topics":["mockery","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":null,"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":null,"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}},"created_at":"2018-07-26T18:19:30.000Z","updated_at":"2024-03-21T14:24:35.000Z","dependencies_parsed_at":"2024-01-13T07:22:19.266Z","dependency_job_id":"60766d5c-741a-4e33-8363-8a7abb4d7e32","html_url":"https://github.com/phpstan/phpstan-mockery","commit_stats":{"total_commits":129,"total_committers":21,"mean_commits":6.142857142857143,"dds":0.4031007751937985,"last_synced_commit":"37153c02d738de2e6d405f6034e44b1702353982"},"previous_names":[],"tags_count":26,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phpstan%2Fphpstan-mockery","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phpstan%2Fphpstan-mockery/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phpstan%2Fphpstan-mockery/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phpstan%2Fphpstan-mockery/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/phpstan","download_url":"https://codeload.github.com/phpstan/phpstan-mockery/tar.gz/refs/heads/1.1.x","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246706674,"owners_count":20820785,"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":["mockery","php","php7","phpstan","static-analysis","static-code-analysis"],"created_at":"2024-11-13T08:22:03.199Z","updated_at":"2025-04-04T19:13:06.835Z","avatar_url":"https://github.com/phpstan.png","language":"PHP","readme":"# PHPStan Mockery extension\n\n[![Build](https://github.com/phpstan/phpstan-mockery/workflows/Build/badge.svg)](https://github.com/phpstan/phpstan-mockery/actions)\n[![Latest Stable Version](https://poser.pugx.org/phpstan/phpstan-mockery/v/stable)](https://packagist.org/packages/phpstan/phpstan-mockery)\n[![License](https://poser.pugx.org/phpstan/phpstan-mockery/license)](https://packagist.org/packages/phpstan/phpstan-mockery)\n\n* [PHPStan](https://phpstan.org/)\n* [Mockery](https://github.com/mockery/mockery)\n\nThis extension provides the following features:\n\n* Interprets `Foo|\\Mockery\\MockInterface` in phpDoc so that it results in an intersection type instead of a union type.\n* `Mockery::mock()` and `Mockery::spy()` return an intersection type (see the [detailed explanation of intersection types](https://phpstan.org/blog/union-types-vs-intersection-types)) so that the returned object can be used as both the mock object and the mocked class object.\n* `shouldReceive()`, `allows()` and `expects()` methods can be called on the mock object and they work as expected.\n\n\n## Installation\n\nTo use this extension, require it in [Composer](https://getcomposer.org/):\n\n```\ncomposer require --dev phpstan/phpstan-mockery\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-mockery/extension.neon\n```\n\u003c/details\u003e\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphpstan%2Fphpstan-mockery","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fphpstan%2Fphpstan-mockery","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphpstan%2Fphpstan-mockery/lists"}