{"id":15813560,"url":"https://github.com/ybelenko/ogrn","last_synced_at":"2025-04-01T01:44:01.243Z","repository":{"id":62548413,"uuid":"92343268","full_name":"ybelenko/ogrn","owner":"ybelenko","description":"Tiny PHP library for validating OGRN(ОГРН) and OGRNIP(ОГРНИП) business identifiers in Russia.","archived":false,"fork":false,"pushed_at":"2022-03-21T21:10:31.000Z","size":18,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-10-06T04:02:55.158Z","etag":null,"topics":["business","identifiers","russian","validation"],"latest_commit_sha":null,"homepage":"","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/ybelenko.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":"2017-05-24T22:52:36.000Z","updated_at":"2022-03-21T21:05:15.000Z","dependencies_parsed_at":"2022-11-02T23:45:18.714Z","dependency_job_id":null,"html_url":"https://github.com/ybelenko/ogrn","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ybelenko%2Fogrn","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ybelenko%2Fogrn/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ybelenko%2Fogrn/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ybelenko%2Fogrn/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ybelenko","download_url":"https://codeload.github.com/ybelenko/ogrn/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246569006,"owners_count":20798341,"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":["business","identifiers","russian","validation"],"created_at":"2024-10-05T04:03:08.747Z","updated_at":"2025-04-01T01:44:01.224Z","avatar_url":"https://github.com/ybelenko.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# OGRN\n\n[![Latest Stable Version](https://poser.pugx.org/ybelenko/ogrn/v/stable)](https://packagist.org/packages/ybelenko/ogrn)\n[![Build Status](https://github.com/ybelenko/ogrn/actions/workflows/ci.yml/badge.svg)](https://github.com/ybelenko/ogrn/actions/workflows/ci.yml)\n[![Coverage Status](https://coveralls.io/repos/github/ybelenko/ogrn/badge.svg?branch=master)](https://coveralls.io/github/ybelenko/ogrn?branch=master)\n[![License](https://poser.pugx.org/ybelenko/ogrn/license)](https://packagist.org/packages/ybelenko/ogrn)\n    \nTiny PHP library for validating OGRN(ОГРН) and OGRNIP(ОГРНИП) business identifiers in Russia. \nIt just verifies number length and last control digit, so if identifier passes validation it doesn't \nmean that it exists in a real world. If you need to check that OGRN or OGRNIP exists visit \n[http://egrul.nalog.ru](http://egrul.nalog.ru).\n\n## Installation\nIt's recommended that you use [Composer](https://getcomposer.org/) to install.\n\n```sh\n$ composer require ybelenko/ogrn\n```\n\n## Usage\n\n```php\nrequire_once __DIR__ . '/vendor/autoload.php';\n\nuse Ybelenko\\Ogrn\\Ogrn;\nuse Ybelenko\\Ogrn\\Ogrnip;\n\n// when you need to validate OGRN number\n$isValid = Ogrn::validate(\"1127746509780\");// returns true if identifier is valid\n\n// when you need to validate OGRNIP number\n$isValid = Ogrnip::validate(\"304500116000157\");// returns true if identifier is valid\n```\n\n\u003e While 32 bit systems have a maximum signed integer range of -2147483648 to 2147483647 you always\n\u003e should store OGRN and OGRNIP identifiers as string.\n\n```php\n$ogrn = 1127746509780; // is bad \necho $ogrn; // 2147483647\n\n$ogrn = '1127746509780'; // is good\necho $ogrn; // 1127746509780\n```\n\n## Tests\nTo execute the test suite, you'll need to clone current repo and\ninstall it with dev dependencies:\n\n```sh\n$ git clone https://github.com/ybelenko/ogrn\n$ cd ogrn\n$ composer install\n$ composer test\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fybelenko%2Fogrn","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fybelenko%2Fogrn","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fybelenko%2Fogrn/lists"}