{"action":"opened","number":608,"pull_request":{"url":"https://api.github.com/repos/Respect/Validation/pulls/608","id":49912479,"html_url":"https://github.com/Respect/Validation/pull/608","diff_url":"https://github.com/Respect/Validation/pull/608.diff","patch_url":"https://github.com/Respect/Validation/pull/608.patch","issue_url":"https://api.github.com/repos/Respect/Validation/issues/608","number":608,"state":"open","locked":false,"title":"Fix/better perfect square validate","user":{"login":"fefas","id":6557756,"avatar_url":"https://avatars.githubusercontent.com/u/6557756?v=3","gravatar_id":"","url":"https://api.github.com/users/fefas","html_url":"https://github.com/fefas","followers_url":"https://api.github.com/users/fefas/followers","following_url":"https://api.github.com/users/fefas/following{/other_user}","gists_url":"https://api.github.com/users/fefas/gists{/gist_id}","starred_url":"https://api.github.com/users/fefas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fefas/subscriptions","organizations_url":"https://api.github.com/users/fefas/orgs","repos_url":"https://api.github.com/users/fefas/repos","events_url":"https://api.github.com/users/fefas/events{/privacy}","received_events_url":"https://api.github.com/users/fefas/received_events","type":"User","site_admin":false},"body":"I noted a problem in the [PerfectSquare rule](https://github.com/Respect/Validation/blob/master/library/Rules/PerfectSquare.php) validation logic.\r\n\r\nMathematically, `sqrt(x) * sqrt(x)` will be always equal to `x` even if `x` is a *perfect square* or not. The unit tests do not show any problem because the *floating point comparison problem*.\r\n\r\nIn this way, the right way to check if a given number `x` is perfect square or not is checking if `sqrt(x)` is an integer or not.\r\n\r\nI hope this changes can upgrade `Respect\\Validation` package :D","created_at":"2015-11-06T03:29:22Z","updated_at":"2015-11-06T03:29:23Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Respect/Validation/pulls/608/commits","review_comments_url":"https://api.github.com/repos/Respect/Validation/pulls/608/comments","review_comment_url":"https://api.github.com/repos/Respect/Validation/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Respect/Validation/issues/608/comments","statuses_url":"https://api.github.com/repos/Respect/Validation/statuses/6b0a8ea603bd95654b935c489f952400eb88dcb5","head":{"label":"fefas:fix/better-perfect-square-validate","ref":"fix/better-perfect-square-validate","sha":"6b0a8ea603bd95654b935c489f952400eb88dcb5","user":{"login":"fefas","id":6557756,"avatar_url":"https://avatars.githubusercontent.com/u/6557756?v=3","gravatar_id":"","url":"https://api.github.com/users/fefas","html_url":"https://github.com/fefas","followers_url":"https://api.github.com/users/fefas/followers","following_url":"https://api.github.com/users/fefas/following{/other_user}","gists_url":"https://api.github.com/users/fefas/gists{/gist_id}","starred_url":"https://api.github.com/users/fefas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fefas/subscriptions","organizations_url":"https://api.github.com/users/fefas/orgs","repos_url":"https://api.github.com/users/fefas/repos","events_url":"https://api.github.com/users/fefas/events{/privacy}","received_events_url":"https://api.github.com/users/fefas/received_events","type":"User","site_admin":false},"repo":{"id":44440264,"name":"Validation","full_name":"fefas/Validation","owner":{"login":"fefas","id":6557756,"avatar_url":"https://avatars.githubusercontent.com/u/6557756?v=3","gravatar_id":"","url":"https://api.github.com/users/fefas","html_url":"https://github.com/fefas","followers_url":"https://api.github.com/users/fefas/followers","following_url":"https://api.github.com/users/fefas/following{/other_user}","gists_url":"https://api.github.com/users/fefas/gists{/gist_id}","starred_url":"https://api.github.com/users/fefas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fefas/subscriptions","organizations_url":"https://api.github.com/users/fefas/orgs","repos_url":"https://api.github.com/users/fefas/repos","events_url":"https://api.github.com/users/fefas/events{/privacy}","received_events_url":"https://api.github.com/users/fefas/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/fefas/Validation","description":"The most awesome validation engine ever created for PHP","fork":true,"url":"https://api.github.com/repos/fefas/Validation","forks_url":"https://api.github.com/repos/fefas/Validation/forks","keys_url":"https://api.github.com/repos/fefas/Validation/keys{/key_id}","collaborators_url":"https://api.github.com/repos/fefas/Validation/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/fefas/Validation/teams","hooks_url":"https://api.github.com/repos/fefas/Validation/hooks","issue_events_url":"https://api.github.com/repos/fefas/Validation/issues/events{/number}","events_url":"https://api.github.com/repos/fefas/Validation/events","assignees_url":"https://api.github.com/repos/fefas/Validation/assignees{/user}","branches_url":"https://api.github.com/repos/fefas/Validation/branches{/branch}","tags_url":"https://api.github.com/repos/fefas/Validation/tags","blobs_url":"https://api.github.com/repos/fefas/Validation/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/fefas/Validation/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/fefas/Validation/git/refs{/sha}","trees_url":"https://api.github.com/repos/fefas/Validation/git/trees{/sha}","statuses_url":"https://api.github.com/repos/fefas/Validation/statuses/{sha}","languages_url":"https://api.github.com/repos/fefas/Validation/languages","stargazers_url":"https://api.github.com/repos/fefas/Validation/stargazers","contributors_url":"https://api.github.com/repos/fefas/Validation/contributors","subscribers_url":"https://api.github.com/repos/fefas/Validation/subscribers","subscription_url":"https://api.github.com/repos/fefas/Validation/subscription","commits_url":"https://api.github.com/repos/fefas/Validation/commits{/sha}","git_commits_url":"https://api.github.com/repos/fefas/Validation/git/commits{/sha}","comments_url":"https://api.github.com/repos/fefas/Validation/comments{/number}","issue_comment_url":"https://api.github.com/repos/fefas/Validation/issues/comments{/number}","contents_url":"https://api.github.com/repos/fefas/Validation/contents/{+path}","compare_url":"https://api.github.com/repos/fefas/Validation/compare/{base}...{head}","merges_url":"https://api.github.com/repos/fefas/Validation/merges","archive_url":"https://api.github.com/repos/fefas/Validation/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/fefas/Validation/downloads","issues_url":"https://api.github.com/repos/fefas/Validation/issues{/number}","pulls_url":"https://api.github.com/repos/fefas/Validation/pulls{/number}","milestones_url":"https://api.github.com/repos/fefas/Validation/milestones{/number}","notifications_url":"https://api.github.com/repos/fefas/Validation/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/fefas/Validation/labels{/name}","releases_url":"https://api.github.com/repos/fefas/Validation/releases{/id}","created_at":"2015-10-17T14:28:44Z","updated_at":"2015-10-17T14:28:47Z","pushed_at":"2015-11-06T03:26:04Z","git_url":"git://github.com/fefas/Validation.git","ssh_url":"git@github.com:fefas/Validation.git","clone_url":"https://github.com/fefas/Validation.git","svn_url":"https://github.com/fefas/Validation","homepage":"http://respect.github.io/Validation","size":3679,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"Respect:master","ref":"master","sha":"7d8b18bacae9967912e4acf0fdc3e88be13cf56a","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-11-05T16:48:22Z","pushed_at":"2015-11-06T03:29:23Z","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://respect.github.io/Validation","size":8568,"stargazers_count":2688,"watchers_count":2688,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":403,"mirror_url":null,"open_issues_count":24,"forks":403,"open_issues":24,"watchers":2688,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Respect/Validation/pulls/608"},"html":{"href":"https://github.com/Respect/Validation/pull/608"},"issue":{"href":"https://api.github.com/repos/Respect/Validation/issues/608"},"comments":{"href":"https://api.github.com/repos/Respect/Validation/issues/608/comments"},"review_comments":{"href":"https://api.github.com/repos/Respect/Validation/pulls/608/comments"},"review_comment":{"href":"https://api.github.com/repos/Respect/Validation/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Respect/Validation/pulls/608/commits"},"statuses":{"href":"https://api.github.com/repos/Respect/Validation/statuses/6b0a8ea603bd95654b935c489f952400eb88dcb5"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":3,"additions":2,"deletions":2,"changed_files":2}}