<NME> StoreUserRequest.php
<BEF> <?php

namespace REBELinBLUE\Deployer\Http\Requests;

/**
 * Request for validating users.
 */
class StoreUserRequest extends Request
{
    /**
     * Get the validation rules that apply to the request.
     *
     * @return array
     */
    public function rules()
    {
        $rules = [
            'name'     => 'required|max:255',
            'email'    => 'required|email|max:255|unique:users,email',
            'password' => 'required|confirmed|min:6|zxcvbn:3,name,email',
        ];

        // On edit change the password validator
        if ($this->route('user')) {
            $rules['email'] .= ',' . $this->route('user');

            if (!empty($this->get('password', null))) {
            if (Input::get('password') !== '') {
                $rules['password'] = 'min:6';
            }
        }

        return $rules;

<MSG> Removing password requirement from validator rules on update

<DFF> @@ -28,6 +28,9 @@ class StoreUserRequest extends Request
             if (Input::get('password') !== '') {
                 $rules['password'] = 'min:6';
             }
+            else {
+                unset($rules['password']):
+            }
         }
 
         return $rules;

{'commit': "diff --git a/app/Http/Requests/StoreUserRequest.php b/app/Http/Requests/StoreUserRequest.php\nindex ca188d33..10a0dda3 100644\n--- a/app/Http/Requests/StoreUserRequest.php\n+++ b/app/Http/Requests/StoreUserRequest.php\n@@ -28,6 +28,9 @@ class StoreUserRequest extends Request\n             if (Input::get('password') !== '') {\n                 $rules['password'] = 'min:6';\n             }\n+            else {\n+                unset($rules['password']):\n+            }\n         }\n \n         return $rules;\n", 'commit_subject': 'Removing password requirement from validator rules on update', 'repo_name': 'REBELinBLUE/deployer', 'committer': {'name': 'Stephen Ball', 'email': '06fa905d7f2aaced6dc72e9511c71a2a51e8aead@rebelinblue.com', 'time_sec': '1428407263', 'tz_offset': '0', 'date': {'seconds': '1428407263'}}, 'commit_tree': 'aa7423fb68b48038af67544984d534bd733b12c2', 'commit_message': 'Removing password requirement from validator rules on update\n', 'language_name': 'PHP', 'license': 'mit', 'hunks': "@@ -28,6 +28,9 @@ class StoreUserRequest extends Request\n             if (Input::get('password') !== '') {\n                 $rules['password'] = 'min:6';\n             }\n+            else {\n+                unset($rules['password']):\n+            }\n         }\n \n         return $rules;\n", 'addition_count': 3, 'deletion_count': 0, 'src_file': 'a/app/Http/Requests/StoreUserRequest.php', 'tgt_file': 'b/app/Http/Requests/StoreUserRequest.php', 'file_extension': '.php', 'before_file': "<?php\n\nnamespace REBELinBLUE\\Deployer\\Http\\Requests;\n\n/**\n * Request for validating users.\n */\nclass StoreUserRequest extends Request\n{\n    /**\n     * Get the validation rules that apply to the request.\n     *\n     * @return array\n     */\n    public function rules()\n    {\n        $rules = [\n            'name'     => 'required|max:255',\n            'email'    => 'required|email|max:255|unique:users,email',\n            'password' => 'required|confirmed|min:6|zxcvbn:3,name,email',\n        ];\n\n        // On edit change the password validator\n        if ($this->route('user')) {\n            $rules['email'] .= ',' . $this->route('user');\n\n            if (!empty($this->get('password', null))) {\n            if (Input::get('password') !== '') {\n                $rules['password'] = 'min:6';\n            }\n        }\n\n        return $rules;\n", 'message': 'Removing password requirement from validator rules on update\n', 'author_name': 'Stephen Ball', 'lang': 'php'}