{"action":"created","comment":{"url":"https://api.github.com/repos/middlesky/myRefactoring/pulls/comments/55958185","id":55958185,"diff_hunk":"@@ -1,429 +1,205 @@\n <?php\n- \n+\n namespace app\\models;\n- \n-use Yii;\n-use yii\\web\\HttpException;\n-use yii\\base\\Model;\n- \n+\n+use yii,\n+    yii\\base\\Model;\n+\n+use app\\models\\resources\\Gallery;\n+\n+\n+/**\n+ * CRUD - Model of Product Bullets\n+ *\n+ * @author Lesyuk Alexey <middlesky@gmail.com>\n+ *\n+ * Class ProductBullets\n+ * @package app\\models\n+ */\n class ProductBullets extends Model\n {\n- \n-    const TABLE_BULLETS = 'product_bullet';\n+\n+    const TABLE = 'product_bullet';\n     const PATH_BULLETS_IMAGES = 'bullets/';\n- \n-    const STATUS_OK = 200;\n-    const STATUS_ERROR = 400;\n- \n-    const EXCEPTION_CODE_UNIQUE = 'Code can be unique';\n-    const EXCEPTION_PRODUCT_BULLET_GROUP_NOT_FOUND = 'Not found product bullet group';\n-    const EXCEPTION_DOWNLOAD_IMG_ERROR = 'Not can download image. Http status code not '.self::STATUS_OK;\n-    const EXCEPTION_NOT_FOUND_BULLET = 'Not found product bullet.';\n-    const EXCEPTION_NOT_FOUND_PRODUCT = 'Not found product.';\n- \n+\n+    const EXCEPTION_DOWNLOAD_IMG_ERROR = 'Image cannot be downloaded. http status code is incorrect.';\n+\n+    const EXCEPTION_NOT_FOUND_BULLET = 'Bullet is not found.';\n+    const EXCEPTION_NOT_FOUND_PRODUCT = 'Product is not found.';\n+\n     /*\n      * Code of Http status responce\n      */\n     public $httpStatusCode = '';\n- \n+\n     /*\n      * Message of Http status responce\n      */\n     public $httpStatusMessage = '';\n- \n-    /**\n-     * Download Images to path\n-     *\n-     * @author Lesyuk Alexey <middlesky@gmail.com>\n-     *\n-     * @param $url\n-     * @param $name\n-     * @param $path\n-     * @return int\n-     */\n-    public static function downloadImage($url, $name, $path)\n-    {\n-        if ($curl = curl_init()) {\n-            curl_setopt($curl, CURLOPT_URL, $url);\n-            curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);\n-            $result = curl_exec($curl);\n-            $httpStatusCode = curl_getinfo($curl, CURLINFO_HTTP_CODE);\n- \n-            curl_close($curl);\n-        }\n- \n-        $buffer = explode('.', $url);\n-        $typeFileArray = $buffer[count($buffer)-1];\n- \n-        $pathToSave = $path . $name;\n- \n-        $fp = fopen($pathToSave, 'w');\n-        fwrite($fp, $result);\n-        fclose($fp);\n- \n-        $fileSize = filesize($pathToSave);\n- \n-        $result = ['fileSize' => $fileSize, 'httpStatusCode' => $httpStatusCode];\n- \n-        return $result;\n-    }\n- \n-    /**\n-     * Convert string to UpperCamelCase\n-     *\n-     * @author Lesyuk Alexey <middlesky@gmail.com>\n-     *\n-     * @param $string\n-     * @return string\n-     */\n-    public static function stringToUpperCamelCase($string)\n-    {\n-        $arrayData = explode('_', ($string));\n- \n-        $resultString = '';\n-        foreach($arrayData as $subdata) {\n-            $resultString .= strtoupper($subdata[0]) . substr($subdata, 1);\n-        }\n- \n-        return $resultString;\n-    }\n- \n-    /**\n-     * Convert keys in array to keys with UpperCamelCase names\n-     *\n-     * @author Lesyuk Alexey <middlesky@gmail.com>\n-     *\n-     * @param $data\n-     * @param $exclusion\n-     * @return mixed\n-     */\n-    public static function arrayToUpperCamelCase($data, $exclusion)\n-    {\n-        if (gettype($data) == 'array' && isset($data[0])) {\n- \n-            $i = 0;\n-            foreach($data as $subdata) {\n-                $result = self::arrayToUpperCamelCase($subdata, $exclusion);\n-                $data[$i] = $result;\n-                $i++;\n-            }\n- \n-            return $data;\n-        }\n- \n-        foreach($data as $key => $value) {\n-            $exclusionKeys = array_keys($exclusion);\n- \n-            if (!in_array($key, $exclusionKeys)) {\n-                $newKey = self::stringToUpperCamelCase($key);\n-            } else {\n-                $newKey = $exclusion[$key];\n-            }\n-            unset($data[$key]);\n-            $data[$newKey] = $value;\n-        }\n- \n-        return $data;\n-    }\n- \n+\n     /**\n      * Update Bullet by $productBulletId\n      *\n-     * @author Lesyuk Alexey <middlesky@gmail.com>\n+     * @author Lesyuk Alexey <middlesky@gmail.com\n      *\n-     * @param $productBulletId\n-     * @param $updateData\n+     * @param $data\n+     * @param $dataScheme\n      * @return int\n-     * @throws HttpException\n-     * @throws \\yii\\db\\Exception\n+     * @throws yii\\db\\Exception\n      */\n-    public function update($productBulletId, $updateData)\n+    public function update($data, $dataScheme)\n     {\n-        $productBulletId = $this->getBulletIdByBulletId($productBulletId);\n- \n-        if (!$productBulletId) {\n-            $this->httpStatusCode = self::STATUS_ERROR;\n-            $this->httpStatusMessage = self::EXCEPTION_NOT_FOUND_BULLET;\n-        }\n- \n-        if (isset($updateData['code'])) {\n-            $issetCode = $this->getCodeByCode($updateData['code'], $productBulletId);\n-            if ($issetCode) {\n-                $this->httpStatusCode = self::STATUS_ERROR;\n-                $this->httpStatusMessage = self::EXCEPTION_CODE_UNIQUE;\n-                return;\n-            }\n+        $data['ProductId'] = Yii::$app->rest->getSelfValue(self::TABLE, 'product_id', [$dataScheme['id']['nameColumn'] => $data['id']]);\n+\n+        $dataScheme['ProductId'] = [\n+            'type' => 'Int',\n+            'nameColumn' => 'product_id',\n+            'mainTableInDb' => 'product',\n+            'exceptionCheck' => [\n+                'type' => 'isset',\n+                'code' => Yii::$app->params['httpStatus']['status_error'],\n+                'message' => self::EXCEPTION_NOT_FOUND_PRODUCT\n+            ]\n+        ];\n+\n+        $resultException = Yii::$app->rest->verifyException($dataScheme, $data, self::TABLE);\n+\n+        if (gettype($resultException) == 'array') {\n+            return $resultException;\n         }\n- \n-        if (isset($updateData['product_bullet_group_id'])) {\n- \n-            $issetProductBulletGroup = self::getProductBulletGroupIdByProductBulletGroupId(\n-                $updateData['product_bullet_group_id']\n-            );\n- \n-            if (!$issetProductBulletGroup) {\n-                $this->httpStatusCode = self::STATUS_ERROR;\n-                $this->httpStatusMessage = self::EXCEPTION_PRODUCT_BULLET_GROUP_NOT_FOUND;\n-            }\n-        }\n- \n-        (new \\yii\\db\\Query())\n+\n+        $schemeUpdate = Yii::$app->rest->getPartOfScheme($dataScheme, 'canUpdate', true);\n+        $updateData = Yii::$app->rest->getDataFromScheme($schemeUpdate, $data, 'canUpdate');\n+\n+        $result = (new \\yii\\db\\Query())\n             ->createCommand()\n             ->update('product_bullet', $updateData, 'product_bullet_id = :product_bullet_id')\n-            ->bindValue(':product_bullet_id', $productBulletId)\n+            ->bindValue(':product_bullet_id', $data['id'])\n             ->execute();\n-    }\n- \n-    /**\n-     * Check that we have bullet with this $productId and $langId used in Upsert\n-     *\n-     * @author Lesyuk Alexey <middlesky@gmail.com>\n-     *\n-     * @param $productId\n-     * @param $langId\n-     * @return bool|string\n-     */\n-    public function getBulletIdByProductId($productId, $langId = null, $code = null)\n-    {\n-        $productBulletId = (new \\yii\\db\\Query())\n-            ->select(\n-                'product_bullet_id'\n-            )\n-            ->from(self::TABLE_BULLETS)\n-            ->where(['product_id' => $productId]);\n- \n-        if (isset($langId)) {\n-            $productBulletId = $productBulletId\n-                ->andWhere(['langid' => $langId]);\n-        }\n- \n-        if (isset($code)) {\n-            $productBulletId = $productBulletId\n-                ->andWhere(['code' => $code]);\n-        }\n- \n-        $productBulletId = $productBulletId\n-            ->scalar();\n- \n-        return $productBulletId;\n-    }\n- \n-    /**\n-     * Check that we have bullet with this $productBulletId\n-     *\n-     * @author Lesyuk Alexey <middlesky@gmail.com>\n-     *\n-     * @param $productBulletId\n-     * @return array\n-     */\n-    public function getBulletIdByBulletId($productBulletId)\n-    {\n-        return (new \\yii\\db\\Query())\n-            ->select([\n-                'product_bullet_id'\n-            ])\n-            ->from(self::TABLE_BULLETS)\n-            ->where(['product_bullet_id' => $productBulletId])\n-            ->scalar();\n-    }\n- \n-    /**\n-     * Check that we have bullet with this $productBulletId\n-     *\n-     * @author Lesyuk Alexey <middlesky@gmail.com>\n-     *\n-     * @return bool|string\n-     */\n-    public function getCodeByCode($code, $product_bullet_id = null)\n-    {\n-        $result = (new \\yii\\db\\Query())\n-            ->select('code')\n-            ->from(self::TABLE_BULLETS)\n-            ->where(['code' => $code]);\n- \n-        if (isset($product_bullet_id)) {\n-            $result = $result\n-                ->andwhere('product_bullet_id != ' . $product_bullet_id);\n+\n+        if (isset($data['IconUrl'])) {\n+            $this->updateProductBulletImage($data['IconUrl'], $data['ProductId'], $data['id']);\n+        } elseif (isset($data['Image'])) {\n+            $this->updateProductBulletImage(null, $data['ProductId'], $data['id'], $data['Image']);\n         }\n- \n-        $result = $result\n-            ->scalar();\n- \n+\n+        $this->insertDataToJournal(\n+            $data['ProductId'],\n+            $data['id'],\n+            EditorJournal::ACTION_TYPE_UPDATE\n+        );\n+\n         return $result;\n     }\n- \n-    /**\n-     * Check that we have bullet group id with this $product_bullet_group_id\n-     *\n-     * @author Lesyuk Alexey <middlesky@gmail.com>\n-     *\n-     * @param $product_bullet_group_id\n-     * @return bool|string\n-     */\n-    public function getProductBulletGroupIdByProductBulletGroupId($product_bullet_group_id)\n-    {\n-        return (new \\yii\\db\\Query())\n-            ->select('product_bullet_group_id')\n-            ->from('product_bullet_group')\n-            ->where(['product_bullet_group_id' => $product_bullet_group_id])\n-            ->scalar();\n-    }\n- \n+\n     /**\n      * Create Bullet by $productId\n      *\n-     * @author Lesyuk Alexey <middlesky@gmail.com>\n+     * @author Lesyuk Alexey <middlesky@gmail.com\n      *\n-     * @param $insertData\n-     * @param $productId\n+     * @param $data\n+     * @param $dataScheme\n      * @return string\n-     * @throws \\yii\\db\\Exception\n+     * @throws yii\\db\\Exception\n      */\n-    public function create($insertData, $productId)\n+    public function create($data, $dataScheme)\n     {\n-        $productId = $this->getProductByProductId($productId);\n- \n-        if (!$productId) {\n-            $this->httpStatusCode = self::STATUS_ERROR;\n-            $this->httpStatusMessage = self::EXCEPTION_NOT_FOUND_PRODUCT;\n-            return;\n+        $resultException = Yii::$app->rest->verifyException($dataScheme, $data, self::TABLE);\n+\n+        if (gettype($resultException) == 'array') {\n+            return $resultException;\n         }\n- \n+\n         //set max sort id\n-        if (!isset($insertData['no'])) {\n-            $insertData['no'] = (new \\yii\\db\\Query())\n-                ->select('MAX(no)')\n-                ->from(self::TABLE_BULLETS)\n-                ->where(['product_id' => $productId])\n-                ->scalar() + 1;\n+        if (!isset($data['No'])) {\n+            $insertData['No'] = (new \\yii\\db\\Query())\n+                    ->select('MAX(no)')\n+                    ->from(self::TABLE)\n+                    ->where(['product_id' => $data['id']])\n+                    ->scalar() + 1;\n         }\n- \n-        if (isset($insertData['code'])) {","path":"pages/Yii2_IceCat/models/ProductBullets.php","position":384,"original_position":384,"commit_id":"d9a63957b6ab84590b48dd8906d2710b08605bb5","original_commit_id":"d9a63957b6ab84590b48dd8906d2710b08605bb5","user":{"login":"middlesky","id":12744763,"avatar_url":"https://avatars.githubusercontent.com/u/12744763?v=3","gravatar_id":"","url":"https://api.github.com/users/middlesky","html_url":"https://github.com/middlesky","followers_url":"https://api.github.com/users/middlesky/followers","following_url":"https://api.github.com/users/middlesky/following{/other_user}","gists_url":"https://api.github.com/users/middlesky/gists{/gist_id}","starred_url":"https://api.github.com/users/middlesky/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/middlesky/subscriptions","organizations_url":"https://api.github.com/users/middlesky/orgs","repos_url":"https://api.github.com/users/middlesky/repos","events_url":"https://api.github.com/users/middlesky/events{/privacy}","received_events_url":"https://api.github.com/users/middlesky/received_events","type":"User","site_admin":false},"body":"this verify exception no need, because we can use one method  Yii::$app->rest->verifyException","created_at":"2016-03-14T05:43:14Z","updated_at":"2016-03-14T05:43:14Z","html_url":"https://github.com/middlesky/myRefactoring/pull/2#discussion_r55958185","pull_request_url":"https://api.github.com/repos/middlesky/myRefactoring/pulls/2","_links":{"self":{"href":"https://api.github.com/repos/middlesky/myRefactoring/pulls/comments/55958185"},"html":{"href":"https://github.com/middlesky/myRefactoring/pull/2#discussion_r55958185"},"pull_request":{"href":"https://api.github.com/repos/middlesky/myRefactoring/pulls/2"}}},"pull_request":{"url":"https://api.github.com/repos/middlesky/myRefactoring/pulls/2","id":62686880,"html_url":"https://github.com/middlesky/myRefactoring/pull/2","diff_url":"https://github.com/middlesky/myRefactoring/pull/2.diff","patch_url":"https://github.com/middlesky/myRefactoring/pull/2.patch","issue_url":"https://api.github.com/repos/middlesky/myRefactoring/issues/2","number":2,"state":"open","locked":false,"title":"After Refactoring (move methods in component) and other","user":{"login":"middlesky","id":12744763,"avatar_url":"https://avatars.githubusercontent.com/u/12744763?v=3","gravatar_id":"","url":"https://api.github.com/users/middlesky","html_url":"https://github.com/middlesky","followers_url":"https://api.github.com/users/middlesky/followers","following_url":"https://api.github.com/users/middlesky/following{/other_user}","gists_url":"https://api.github.com/users/middlesky/gists{/gist_id}","starred_url":"https://api.github.com/users/middlesky/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/middlesky/subscriptions","organizations_url":"https://api.github.com/users/middlesky/orgs","repos_url":"https://api.github.com/users/middlesky/repos","events_url":"https://api.github.com/users/middlesky/events{/privacy}","received_events_url":"https://api.github.com/users/middlesky/received_events","type":"User","site_admin":false},"body":"This refactoring do code more flexible code,\r\nif you need get parameters from bodyor URL - you can change it in one place in $dataScheme\r\nif you need change what parameter required or not - you can change it in one place in $dataScheme\r\nif you need verify exception of any new parameters - you can change it in one place in $dataScheme\r\n....\r\n\r\nAfter refactoring we get smaller code that have more functionality","created_at":"2016-03-13T23:03:18Z","updated_at":"2016-03-14T05:43:14Z","closed_at":null,"merged_at":null,"merge_commit_sha":"627fdfa62c3d6ceec95bd1ca1c752e757f0c39c2","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/middlesky/myRefactoring/pulls/2/commits","review_comments_url":"https://api.github.com/repos/middlesky/myRefactoring/pulls/2/comments","review_comment_url":"https://api.github.com/repos/middlesky/myRefactoring/pulls/comments{/number}","comments_url":"https://api.github.com/repos/middlesky/myRefactoring/issues/2/comments","statuses_url":"https://api.github.com/repos/middlesky/myRefactoring/statuses/d9a63957b6ab84590b48dd8906d2710b08605bb5","head":{"label":"middlesky:ProductBulletAfterRefactoring","ref":"ProductBulletAfterRefactoring","sha":"d9a63957b6ab84590b48dd8906d2710b08605bb5","user":{"login":"middlesky","id":12744763,"avatar_url":"https://avatars.githubusercontent.com/u/12744763?v=3","gravatar_id":"","url":"https://api.github.com/users/middlesky","html_url":"https://github.com/middlesky","followers_url":"https://api.github.com/users/middlesky/followers","following_url":"https://api.github.com/users/middlesky/following{/other_user}","gists_url":"https://api.github.com/users/middlesky/gists{/gist_id}","starred_url":"https://api.github.com/users/middlesky/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/middlesky/subscriptions","organizations_url":"https://api.github.com/users/middlesky/orgs","repos_url":"https://api.github.com/users/middlesky/repos","events_url":"https://api.github.com/users/middlesky/events{/privacy}","received_events_url":"https://api.github.com/users/middlesky/received_events","type":"User","site_admin":false},"repo":{"id":53810041,"name":"myRefactoring","full_name":"middlesky/myRefactoring","owner":{"login":"middlesky","id":12744763,"avatar_url":"https://avatars.githubusercontent.com/u/12744763?v=3","gravatar_id":"","url":"https://api.github.com/users/middlesky","html_url":"https://github.com/middlesky","followers_url":"https://api.github.com/users/middlesky/followers","following_url":"https://api.github.com/users/middlesky/following{/other_user}","gists_url":"https://api.github.com/users/middlesky/gists{/gist_id}","starred_url":"https://api.github.com/users/middlesky/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/middlesky/subscriptions","organizations_url":"https://api.github.com/users/middlesky/orgs","repos_url":"https://api.github.com/users/middlesky/repos","events_url":"https://api.github.com/users/middlesky/events{/privacy}","received_events_url":"https://api.github.com/users/middlesky/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/middlesky/myRefactoring","description":"Refactoring of code that present in sampleCode repository All this code(with link) present in other repository \"sampleCode\"","fork":false,"url":"https://api.github.com/repos/middlesky/myRefactoring","forks_url":"https://api.github.com/repos/middlesky/myRefactoring/forks","keys_url":"https://api.github.com/repos/middlesky/myRefactoring/keys{/key_id}","collaborators_url":"https://api.github.com/repos/middlesky/myRefactoring/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/middlesky/myRefactoring/teams","hooks_url":"https://api.github.com/repos/middlesky/myRefactoring/hooks","issue_events_url":"https://api.github.com/repos/middlesky/myRefactoring/issues/events{/number}","events_url":"https://api.github.com/repos/middlesky/myRefactoring/events","assignees_url":"https://api.github.com/repos/middlesky/myRefactoring/assignees{/user}","branches_url":"https://api.github.com/repos/middlesky/myRefactoring/branches{/branch}","tags_url":"https://api.github.com/repos/middlesky/myRefactoring/tags","blobs_url":"https://api.github.com/repos/middlesky/myRefactoring/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/middlesky/myRefactoring/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/middlesky/myRefactoring/git/refs{/sha}","trees_url":"https://api.github.com/repos/middlesky/myRefactoring/git/trees{/sha}","statuses_url":"https://api.github.com/repos/middlesky/myRefactoring/statuses/{sha}","languages_url":"https://api.github.com/repos/middlesky/myRefactoring/languages","stargazers_url":"https://api.github.com/repos/middlesky/myRefactoring/stargazers","contributors_url":"https://api.github.com/repos/middlesky/myRefactoring/contributors","subscribers_url":"https://api.github.com/repos/middlesky/myRefactoring/subscribers","subscription_url":"https://api.github.com/repos/middlesky/myRefactoring/subscription","commits_url":"https://api.github.com/repos/middlesky/myRefactoring/commits{/sha}","git_commits_url":"https://api.github.com/repos/middlesky/myRefactoring/git/commits{/sha}","comments_url":"https://api.github.com/repos/middlesky/myRefactoring/comments{/number}","issue_comment_url":"https://api.github.com/repos/middlesky/myRefactoring/issues/comments{/number}","contents_url":"https://api.github.com/repos/middlesky/myRefactoring/contents/{+path}","compare_url":"https://api.github.com/repos/middlesky/myRefactoring/compare/{base}...{head}","merges_url":"https://api.github.com/repos/middlesky/myRefactoring/merges","archive_url":"https://api.github.com/repos/middlesky/myRefactoring/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/middlesky/myRefactoring/downloads","issues_url":"https://api.github.com/repos/middlesky/myRefactoring/issues{/number}","pulls_url":"https://api.github.com/repos/middlesky/myRefactoring/pulls{/number}","milestones_url":"https://api.github.com/repos/middlesky/myRefactoring/milestones{/number}","notifications_url":"https://api.github.com/repos/middlesky/myRefactoring/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/middlesky/myRefactoring/labels{/name}","releases_url":"https://api.github.com/repos/middlesky/myRefactoring/releases{/id}","deployments_url":"https://api.github.com/repos/middlesky/myRefactoring/deployments","created_at":"2016-03-13T22:02:24Z","updated_at":"2016-03-13T22:52:58Z","pushed_at":"2016-03-13T23:03:19Z","git_url":"git://github.com/middlesky/myRefactoring.git","ssh_url":"git@github.com:middlesky/myRefactoring.git","clone_url":"https://github.com/middlesky/myRefactoring.git","svn_url":"https://github.com/middlesky/myRefactoring","homepage":null,"size":9,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"middlesky:master","ref":"master","sha":"b833743fd0e293dba6f651a3f52f3bc59d3e2f7e","user":{"login":"middlesky","id":12744763,"avatar_url":"https://avatars.githubusercontent.com/u/12744763?v=3","gravatar_id":"","url":"https://api.github.com/users/middlesky","html_url":"https://github.com/middlesky","followers_url":"https://api.github.com/users/middlesky/followers","following_url":"https://api.github.com/users/middlesky/following{/other_user}","gists_url":"https://api.github.com/users/middlesky/gists{/gist_id}","starred_url":"https://api.github.com/users/middlesky/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/middlesky/subscriptions","organizations_url":"https://api.github.com/users/middlesky/orgs","repos_url":"https://api.github.com/users/middlesky/repos","events_url":"https://api.github.com/users/middlesky/events{/privacy}","received_events_url":"https://api.github.com/users/middlesky/received_events","type":"User","site_admin":false},"repo":{"id":53810041,"name":"myRefactoring","full_name":"middlesky/myRefactoring","owner":{"login":"middlesky","id":12744763,"avatar_url":"https://avatars.githubusercontent.com/u/12744763?v=3","gravatar_id":"","url":"https://api.github.com/users/middlesky","html_url":"https://github.com/middlesky","followers_url":"https://api.github.com/users/middlesky/followers","following_url":"https://api.github.com/users/middlesky/following{/other_user}","gists_url":"https://api.github.com/users/middlesky/gists{/gist_id}","starred_url":"https://api.github.com/users/middlesky/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/middlesky/subscriptions","organizations_url":"https://api.github.com/users/middlesky/orgs","repos_url":"https://api.github.com/users/middlesky/repos","events_url":"https://api.github.com/users/middlesky/events{/privacy}","received_events_url":"https://api.github.com/users/middlesky/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/middlesky/myRefactoring","description":"Refactoring of code that present in sampleCode repository All this code(with link) present in other repository \"sampleCode\"","fork":false,"url":"https://api.github.com/repos/middlesky/myRefactoring","forks_url":"https://api.github.com/repos/middlesky/myRefactoring/forks","keys_url":"https://api.github.com/repos/middlesky/myRefactoring/keys{/key_id}","collaborators_url":"https://api.github.com/repos/middlesky/myRefactoring/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/middlesky/myRefactoring/teams","hooks_url":"https://api.github.com/repos/middlesky/myRefactoring/hooks","issue_events_url":"https://api.github.com/repos/middlesky/myRefactoring/issues/events{/number}","events_url":"https://api.github.com/repos/middlesky/myRefactoring/events","assignees_url":"https://api.github.com/repos/middlesky/myRefactoring/assignees{/user}","branches_url":"https://api.github.com/repos/middlesky/myRefactoring/branches{/branch}","tags_url":"https://api.github.com/repos/middlesky/myRefactoring/tags","blobs_url":"https://api.github.com/repos/middlesky/myRefactoring/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/middlesky/myRefactoring/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/middlesky/myRefactoring/git/refs{/sha}","trees_url":"https://api.github.com/repos/middlesky/myRefactoring/git/trees{/sha}","statuses_url":"https://api.github.com/repos/middlesky/myRefactoring/statuses/{sha}","languages_url":"https://api.github.com/repos/middlesky/myRefactoring/languages","stargazers_url":"https://api.github.com/repos/middlesky/myRefactoring/stargazers","contributors_url":"https://api.github.com/repos/middlesky/myRefactoring/contributors","subscribers_url":"https://api.github.com/repos/middlesky/myRefactoring/subscribers","subscription_url":"https://api.github.com/repos/middlesky/myRefactoring/subscription","commits_url":"https://api.github.com/repos/middlesky/myRefactoring/commits{/sha}","git_commits_url":"https://api.github.com/repos/middlesky/myRefactoring/git/commits{/sha}","comments_url":"https://api.github.com/repos/middlesky/myRefactoring/comments{/number}","issue_comment_url":"https://api.github.com/repos/middlesky/myRefactoring/issues/comments{/number}","contents_url":"https://api.github.com/repos/middlesky/myRefactoring/contents/{+path}","compare_url":"https://api.github.com/repos/middlesky/myRefactoring/compare/{base}...{head}","merges_url":"https://api.github.com/repos/middlesky/myRefactoring/merges","archive_url":"https://api.github.com/repos/middlesky/myRefactoring/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/middlesky/myRefactoring/downloads","issues_url":"https://api.github.com/repos/middlesky/myRefactoring/issues{/number}","pulls_url":"https://api.github.com/repos/middlesky/myRefactoring/pulls{/number}","milestones_url":"https://api.github.com/repos/middlesky/myRefactoring/milestones{/number}","notifications_url":"https://api.github.com/repos/middlesky/myRefactoring/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/middlesky/myRefactoring/labels{/name}","releases_url":"https://api.github.com/repos/middlesky/myRefactoring/releases{/id}","deployments_url":"https://api.github.com/repos/middlesky/myRefactoring/deployments","created_at":"2016-03-13T22:02:24Z","updated_at":"2016-03-13T22:52:58Z","pushed_at":"2016-03-13T23:03:19Z","git_url":"git://github.com/middlesky/myRefactoring.git","ssh_url":"git@github.com:middlesky/myRefactoring.git","clone_url":"https://github.com/middlesky/myRefactoring.git","svn_url":"https://github.com/middlesky/myRefactoring","homepage":null,"size":9,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/middlesky/myRefactoring/pulls/2"},"html":{"href":"https://github.com/middlesky/myRefactoring/pull/2"},"issue":{"href":"https://api.github.com/repos/middlesky/myRefactoring/issues/2"},"comments":{"href":"https://api.github.com/repos/middlesky/myRefactoring/issues/2/comments"},"review_comments":{"href":"https://api.github.com/repos/middlesky/myRefactoring/pulls/2/comments"},"review_comment":{"href":"https://api.github.com/repos/middlesky/myRefactoring/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/middlesky/myRefactoring/pulls/2/commits"},"statuses":{"href":"https://api.github.com/repos/middlesky/myRefactoring/statuses/d9a63957b6ab84590b48dd8906d2710b08605bb5"}}}}