{"action":"created","comment":{"url":"https://api.github.com/repos/Respect/Validation/pulls/comments/22920403","id":22920403,"diff_hunk":"@@ -0,0 +1,57 @@\n+<?php\n+namespace Respect\\Validation\\Rules;\n+\n+use malkusch\\bav\\BAV;\n+use Respect\\Validation\\Exceptions\\ComponentException;\n+\n+/**\n+ * Validates a BIC (Bank Identifier Code).\n+ * \n+ * Currently only German BIC validation is supported (country code \"de\").\n+ * The German validator depends on the composer package malkusch/bav.\n+ * Note: It is not recommended to use this validator with BAV's default\n+ * configuration. Use a configuration with one of the following\n+ * DataBackendContainer implementations:\n+ * PDODataBackendContainer or DoctrineBackendContainer.\n+ * \n+ * @author Markus Malkusch <markus@malkusch.de>\n+ * @see BAV::isValidBIC()\n+ * @see \\malkusch\\bav\\Configuration\n+ * @see \\malkusch\\bav\\ConfigurationRegistry::setConfiguration()\n+ */\n+class BIC extends AbstractRule\n+{\n+    /**\n+     * @var String $countryCode The ISO 639-1 country code.\n+     */\n+    private $countryCode;\n+    \n+    /**\n+     * Sets the country code.\n+     * \n+     * The country code is not case sensitive.\n+     * \n+     * @param string $countryCode The ISO 639-1 country code.\n+     */\n+    public function __construct($countryCode)\n+    {\n+        parent::__construct();\n+        $this->countryCode = $countryCode;\n+    }\n+    \n+    public function validate($input)\n+    {\n+        switch (strtolower($this->countryCode)) {","path":"library/Rules/BIC.php","position":44,"original_position":44,"commit_id":"d6000c489753affc9da9f4a2e2d793f4891f4384","original_commit_id":"d6000c489753affc9da9f4a2e2d793f4891f4384","user":{"login":"henriquemoody","id":154023,"avatar_url":"https://avatars.githubusercontent.com/u/154023?v=3","gravatar_id":"","url":"https://api.github.com/users/henriquemoody","html_url":"https://github.com/henriquemoody","followers_url":"https://api.github.com/users/henriquemoody/followers","following_url":"https://api.github.com/users/henriquemoody/following{/other_user}","gists_url":"https://api.github.com/users/henriquemoody/gists{/gist_id}","starred_url":"https://api.github.com/users/henriquemoody/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/henriquemoody/subscriptions","organizations_url":"https://api.github.com/users/henriquemoody/orgs","repos_url":"https://api.github.com/users/henriquemoody/repos","events_url":"https://api.github.com/users/henriquemoody/events{/privacy}","received_events_url":"https://api.github.com/users/henriquemoody/received_events","type":"User","site_admin":false},"body":"A country code must be always in uppercase, otherwise it's wrong.","created_at":"2015-01-14T07:37:48Z","updated_at":"2015-01-14T07:37:48Z","html_url":"https://github.com/Respect/Validation/pull/188#discussion_r22920403","pull_request_url":"https://api.github.com/repos/Respect/Validation/pulls/188","_links":{"self":{"href":"https://api.github.com/repos/Respect/Validation/pulls/comments/22920403"},"html":{"href":"https://github.com/Respect/Validation/pull/188#discussion_r22920403"},"pull_request":{"href":"https://api.github.com/repos/Respect/Validation/pulls/188"}}},"pull_request":{"url":"https://api.github.com/repos/Respect/Validation/pulls/188","id":17587410,"html_url":"https://github.com/Respect/Validation/pull/188","diff_url":"https://github.com/Respect/Validation/pull/188.diff","patch_url":"https://github.com/Respect/Validation/pull/188.patch","issue_url":"https://api.github.com/repos/Respect/Validation/issues/188","number":188,"state":"open","locked":false,"title":"Add (German) bank account validation with malkusch/bav","user":{"login":"malkusch","id":1623984,"avatar_url":"https://avatars.githubusercontent.com/u/1623984?v=3","gravatar_id":"","url":"https://api.github.com/users/malkusch","html_url":"https://github.com/malkusch","followers_url":"https://api.github.com/users/malkusch/followers","following_url":"https://api.github.com/users/malkusch/following{/other_user}","gists_url":"https://api.github.com/users/malkusch/gists{/gist_id}","starred_url":"https://api.github.com/users/malkusch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/malkusch/subscriptions","organizations_url":"https://api.github.com/users/malkusch/orgs","repos_url":"https://api.github.com/users/malkusch/repos","events_url":"https://api.github.com/users/malkusch/events{/privacy}","received_events_url":"https://api.github.com/users/malkusch/received_events","type":"User","site_admin":false},"body":"Hi\r\nI maintain the library malkusch/bav for validation of German bank accounts. This pull requests adds following rules to include bav into your library:\r\n\r\n* ~~`v::germanBank()`~~\r\n* ~~`v::germanBankAccount()`~~\r\n* ~~`v::germanBIC()`~~\r\n* `v::bank(string $countryCode)`\r\n* `v::bankAccount(string $countryCode, string $bank)`\r\n* `v::bic(string $countryCode)`\r\n\r\nThis PR supports only the country code \"de\".\r\n\r\nEnjoy.","created_at":"2014-06-25T12:38:06Z","updated_at":"2015-01-14T07:37:48Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a31e9bf148d318596a906d6757b501b16d2b9bd7","assignee":null,"milestone":{"url":"https://api.github.com/repos/Respect/Validation/milestones/4","labels_url":"https://api.github.com/repos/Respect/Validation/milestones/4/labels","id":570934,"number":4,"title":"Backlog","description":null,"creator":{"login":"augustohp","id":188613,"avatar_url":"https://avatars.githubusercontent.com/u/188613?v=3","gravatar_id":"","url":"https://api.github.com/users/augustohp","html_url":"https://github.com/augustohp","followers_url":"https://api.github.com/users/augustohp/followers","following_url":"https://api.github.com/users/augustohp/following{/other_user}","gists_url":"https://api.github.com/users/augustohp/gists{/gist_id}","starred_url":"https://api.github.com/users/augustohp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/augustohp/subscriptions","organizations_url":"https://api.github.com/users/augustohp/orgs","repos_url":"https://api.github.com/users/augustohp/repos","events_url":"https://api.github.com/users/augustohp/events{/privacy}","received_events_url":"https://api.github.com/users/augustohp/received_events","type":"User","site_admin":false},"open_issues":21,"closed_issues":4,"state":"open","created_at":"2014-02-16T19:28:45Z","updated_at":"2015-01-12T14:02:10Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/Respect/Validation/pulls/188/commits","review_comments_url":"https://api.github.com/repos/Respect/Validation/pulls/188/comments","review_comment_url":"https://api.github.com/repos/Respect/Validation/pulls/comments/{number}","comments_url":"https://api.github.com/repos/Respect/Validation/issues/188/comments","statuses_url":"https://api.github.com/repos/Respect/Validation/statuses/d6000c489753affc9da9f4a2e2d793f4891f4384","head":{"label":"bav-php:bav","ref":"bav","sha":"d6000c489753affc9da9f4a2e2d793f4891f4384","user":{"login":"bav-php","id":8019352,"avatar_url":"https://avatars.githubusercontent.com/u/8019352?v=3","gravatar_id":"","url":"https://api.github.com/users/bav-php","html_url":"https://github.com/bav-php","followers_url":"https://api.github.com/users/bav-php/followers","following_url":"https://api.github.com/users/bav-php/following{/other_user}","gists_url":"https://api.github.com/users/bav-php/gists{/gist_id}","starred_url":"https://api.github.com/users/bav-php/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bav-php/subscriptions","organizations_url":"https://api.github.com/users/bav-php/orgs","repos_url":"https://api.github.com/users/bav-php/repos","events_url":"https://api.github.com/users/bav-php/events{/privacy}","received_events_url":"https://api.github.com/users/bav-php/received_events","type":"Organization","site_admin":false},"repo":{"id":21196653,"name":"Respect-Validation","full_name":"bav-php/Respect-Validation","owner":{"login":"bav-php","id":8019352,"avatar_url":"https://avatars.githubusercontent.com/u/8019352?v=3","gravatar_id":"","url":"https://api.github.com/users/bav-php","html_url":"https://github.com/bav-php","followers_url":"https://api.github.com/users/bav-php/followers","following_url":"https://api.github.com/users/bav-php/following{/other_user}","gists_url":"https://api.github.com/users/bav-php/gists{/gist_id}","starred_url":"https://api.github.com/users/bav-php/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bav-php/subscriptions","organizations_url":"https://api.github.com/users/bav-php/orgs","repos_url":"https://api.github.com/users/bav-php/repos","events_url":"https://api.github.com/users/bav-php/events{/privacy}","received_events_url":"https://api.github.com/users/bav-php/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/bav-php/Respect-Validation","description":"The most awesome validation engine ever created for PHP","fork":true,"url":"https://api.github.com/repos/bav-php/Respect-Validation","forks_url":"https://api.github.com/repos/bav-php/Respect-Validation/forks","keys_url":"https://api.github.com/repos/bav-php/Respect-Validation/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bav-php/Respect-Validation/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bav-php/Respect-Validation/teams","hooks_url":"https://api.github.com/repos/bav-php/Respect-Validation/hooks","issue_events_url":"https://api.github.com/repos/bav-php/Respect-Validation/issues/events{/number}","events_url":"https://api.github.com/repos/bav-php/Respect-Validation/events","assignees_url":"https://api.github.com/repos/bav-php/Respect-Validation/assignees{/user}","branches_url":"https://api.github.com/repos/bav-php/Respect-Validation/branches{/branch}","tags_url":"https://api.github.com/repos/bav-php/Respect-Validation/tags","blobs_url":"https://api.github.com/repos/bav-php/Respect-Validation/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bav-php/Respect-Validation/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bav-php/Respect-Validation/git/refs{/sha}","trees_url":"https://api.github.com/repos/bav-php/Respect-Validation/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bav-php/Respect-Validation/statuses/{sha}","languages_url":"https://api.github.com/repos/bav-php/Respect-Validation/languages","stargazers_url":"https://api.github.com/repos/bav-php/Respect-Validation/stargazers","contributors_url":"https://api.github.com/repos/bav-php/Respect-Validation/contributors","subscribers_url":"https://api.github.com/repos/bav-php/Respect-Validation/subscribers","subscription_url":"https://api.github.com/repos/bav-php/Respect-Validation/subscription","commits_url":"https://api.github.com/repos/bav-php/Respect-Validation/commits{/sha}","git_commits_url":"https://api.github.com/repos/bav-php/Respect-Validation/git/commits{/sha}","comments_url":"https://api.github.com/repos/bav-php/Respect-Validation/comments{/number}","issue_comment_url":"https://api.github.com/repos/bav-php/Respect-Validation/issues/comments/{number}","contents_url":"https://api.github.com/repos/bav-php/Respect-Validation/contents/{+path}","compare_url":"https://api.github.com/repos/bav-php/Respect-Validation/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bav-php/Respect-Validation/merges","archive_url":"https://api.github.com/repos/bav-php/Respect-Validation/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bav-php/Respect-Validation/downloads","issues_url":"https://api.github.com/repos/bav-php/Respect-Validation/issues{/number}","pulls_url":"https://api.github.com/repos/bav-php/Respect-Validation/pulls{/number}","milestones_url":"https://api.github.com/repos/bav-php/Respect-Validation/milestones{/number}","notifications_url":"https://api.github.com/repos/bav-php/Respect-Validation/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bav-php/Respect-Validation/labels{/name}","releases_url":"https://api.github.com/repos/bav-php/Respect-Validation/releases{/id}","created_at":"2014-06-25T09:00:18Z","updated_at":"2015-01-13T22:44:07Z","pushed_at":"2015-01-13T22:44:07Z","git_url":"git://github.com/bav-php/Respect-Validation.git","ssh_url":"git@github.com:bav-php/Respect-Validation.git","clone_url":"https://github.com/bav-php/Respect-Validation.git","svn_url":"https://github.com/bav-php/Respect-Validation","homepage":"http://documentup.com/Respect/Validation/","size":1524,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"bav"}},"base":{"label":"Respect:master","ref":"master","sha":"fc48c1a7c7d3494b3f957929f30d5678c0c45c6a","user":{"login":"Respect","id":354431,"avatar_url":"https://avatars.githubusercontent.com/u/354431?v=3","gravatar_id":"","url":"https://api.github.com/users/Respect","html_url":"https://github.com/Respect","followers_url":"https://api.github.com/users/Respect/followers","following_url":"https://api.github.com/users/Respect/following{/other_user}","gists_url":"https://api.github.com/users/Respect/gists{/gist_id}","starred_url":"https://api.github.com/users/Respect/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Respect/subscriptions","organizations_url":"https://api.github.com/users/Respect/orgs","repos_url":"https://api.github.com/users/Respect/repos","events_url":"https://api.github.com/users/Respect/events{/privacy}","received_events_url":"https://api.github.com/users/Respect/received_events","type":"Organization","site_admin":false},"repo":{"id":931033,"name":"Validation","full_name":"Respect/Validation","owner":{"login":"Respect","id":354431,"avatar_url":"https://avatars.githubusercontent.com/u/354431?v=3","gravatar_id":"","url":"https://api.github.com/users/Respect","html_url":"https://github.com/Respect","followers_url":"https://api.github.com/users/Respect/followers","following_url":"https://api.github.com/users/Respect/following{/other_user}","gists_url":"https://api.github.com/users/Respect/gists{/gist_id}","starred_url":"https://api.github.com/users/Respect/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Respect/subscriptions","organizations_url":"https://api.github.com/users/Respect/orgs","repos_url":"https://api.github.com/users/Respect/repos","events_url":"https://api.github.com/users/Respect/events{/privacy}","received_events_url":"https://api.github.com/users/Respect/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Respect/Validation","description":"The most awesome validation engine ever created for PHP","fork":false,"url":"https://api.github.com/repos/Respect/Validation","forks_url":"https://api.github.com/repos/Respect/Validation/forks","keys_url":"https://api.github.com/repos/Respect/Validation/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Respect/Validation/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Respect/Validation/teams","hooks_url":"https://api.github.com/repos/Respect/Validation/hooks","issue_events_url":"https://api.github.com/repos/Respect/Validation/issues/events{/number}","events_url":"https://api.github.com/repos/Respect/Validation/events","assignees_url":"https://api.github.com/repos/Respect/Validation/assignees{/user}","branches_url":"https://api.github.com/repos/Respect/Validation/branches{/branch}","tags_url":"https://api.github.com/repos/Respect/Validation/tags","blobs_url":"https://api.github.com/repos/Respect/Validation/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Respect/Validation/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Respect/Validation/git/refs{/sha}","trees_url":"https://api.github.com/repos/Respect/Validation/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Respect/Validation/statuses/{sha}","languages_url":"https://api.github.com/repos/Respect/Validation/languages","stargazers_url":"https://api.github.com/repos/Respect/Validation/stargazers","contributors_url":"https://api.github.com/repos/Respect/Validation/contributors","subscribers_url":"https://api.github.com/repos/Respect/Validation/subscribers","subscription_url":"https://api.github.com/repos/Respect/Validation/subscription","commits_url":"https://api.github.com/repos/Respect/Validation/commits{/sha}","git_commits_url":"https://api.github.com/repos/Respect/Validation/git/commits{/sha}","comments_url":"https://api.github.com/repos/Respect/Validation/comments{/number}","issue_comment_url":"https://api.github.com/repos/Respect/Validation/issues/comments/{number}","contents_url":"https://api.github.com/repos/Respect/Validation/contents/{+path}","compare_url":"https://api.github.com/repos/Respect/Validation/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Respect/Validation/merges","archive_url":"https://api.github.com/repos/Respect/Validation/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Respect/Validation/downloads","issues_url":"https://api.github.com/repos/Respect/Validation/issues{/number}","pulls_url":"https://api.github.com/repos/Respect/Validation/pulls{/number}","milestones_url":"https://api.github.com/repos/Respect/Validation/milestones{/number}","notifications_url":"https://api.github.com/repos/Respect/Validation/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Respect/Validation/labels{/name}","releases_url":"https://api.github.com/repos/Respect/Validation/releases{/id}","created_at":"2010-09-22T16:08:05Z","updated_at":"2015-01-14T06:00:43Z","pushed_at":"2015-01-11T21:58:25Z","git_url":"git://github.com/Respect/Validation.git","ssh_url":"git@github.com:Respect/Validation.git","clone_url":"https://github.com/Respect/Validation.git","svn_url":"https://github.com/Respect/Validation","homepage":"http://documentup.com/Respect/Validation","size":3083,"stargazers_count":1904,"watchers_count":1904,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":275,"mirror_url":null,"open_issues_count":34,"forks":275,"open_issues":34,"watchers":1904,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Respect/Validation/pulls/188"},"html":{"href":"https://github.com/Respect/Validation/pull/188"},"issue":{"href":"https://api.github.com/repos/Respect/Validation/issues/188"},"comments":{"href":"https://api.github.com/repos/Respect/Validation/issues/188/comments"},"review_comments":{"href":"https://api.github.com/repos/Respect/Validation/pulls/188/comments"},"review_comment":{"href":"https://api.github.com/repos/Respect/Validation/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/Respect/Validation/pulls/188/commits"},"statuses":{"href":"https://api.github.com/repos/Respect/Validation/statuses/d6000c489753affc9da9f4a2e2d793f4891f4384"}}}}