Passed
Pull Request — master (#151)
by
unknown
07:55
created
client/html/templates/account/profile/account-body-standard.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
  * @see client/html/account/profile/url/config
87 87
  */
88 88
 
89
-$passwordErrors = $this->get('passwordErrors', []);
89
+$passwordErrors = $this->get( 'passwordErrors', [] );
90 90
 
91 91
 ?>
92 92
 <?php $this->block()->start( 'account/profile/account' ) ?>
@@ -95,11 +95,11 @@  discard block
 block discarded – undo
95 95
     <h1 class="header"><?= $enc->html( $this->translate( 'client', 'account' ) ) ?></h1>
96 96
     <form class="container-fluid" method="POST" action="<?= $enc->attr( $this->link( 'client/html/account/profile/url' ) ) ?>">
97 97
         <?= $this->csrf()->formfield() ?>
98
-        <?php if ( $this->get('passwordChanged', '') === 'true' ) : ?>
98
+        <?php if( $this->get( 'passwordChanged', '' ) === 'true' ) : ?>
99 99
             <div class="row d-flex justify-content-center">
100 100
                 <h2 class="text-success">Password changed successfull!</h2>
101 101
             </div>
102
-        <?php elseif ($this->get('passwordChanged', '') === 'false') :?>
102
+        <?php elseif( $this->get( 'passwordChanged', '' ) === 'false' ) :?>
103 103
             <div class="row d-flex justify-content-center">
104 104
                 <h2 class="text-danger">Error(s) occured!</h2>
105 105
             </div>
@@ -119,7 +119,7 @@  discard block
 block discarded – undo
119 119
                                    name="<?= $enc->attr( $this->formparam( array( 'account', 'customer.oldpassword' ) ) ) ?>"
120 120
                                    placeholder="<?= $enc->attr( $this->translate( 'client', 'Old password' ) ) ?>"
121 121
                             >
122
-                            <?php if( isset($passwordErrors['oldPassword']) ) : ?>
122
+                            <?php if( isset( $passwordErrors['oldPassword'] ) ) : ?>
123 123
                                 <span class="invalid-feedback d-block" role="alert">
124 124
                                     <strong><?= $passwordErrors['oldPassword'] ?></strong>
125 125
                                 </span>
@@ -138,12 +138,12 @@  discard block
 block discarded – undo
138 138
                                    name="<?= $enc->attr( $this->formparam( array( 'account', 'customer.newpassword' ) ) ) ?>"
139 139
                                    placeholder="<?= $enc->attr( $this->translate( 'client', 'New password' ) ) ?>"
140 140
                             >
141
-                            <?php if( isset($passwordErrors['confirm']) ) : ?>
141
+                            <?php if( isset( $passwordErrors['confirm'] ) ) : ?>
142 142
                                 <span class="invalid-feedback d-block" role="alert">
143 143
                                     <strong><?= $passwordErrors['confirm'] ?></strong>
144 144
                                 </span>
145 145
                             <?php endif ?>
146
-                            <?php if( isset($passwordErrors['isNew']) ) : ?>
146
+                            <?php if( isset( $passwordErrors['isNew'] ) ) : ?>
147 147
                                 <span class="invalid-feedback d-block" role="alert">
148 148
                                     <strong><?= $passwordErrors['isNew'] ?></strong>
149 149
                                 </span>
@@ -162,12 +162,12 @@  discard block
 block discarded – undo
162 162
                                    name="<?= $enc->attr( $this->formparam( array( 'account', 'customer.confirmnewpassword' ) ) ) ?>"
163 163
                                    placeholder="<?= $enc->attr( $this->translate( 'client', 'Confirm password' ) ) ?>"
164 164
                             >
165
-                            <?php if( isset($passwordErrors['confirm']) ) : ?>
165
+                            <?php if( isset( $passwordErrors['confirm'] ) ) : ?>
166 166
                                 <span class="invalid-feedback d-block" role="alert">
167 167
                                     <strong><?= $passwordErrors['confirm'] ?></strong>
168 168
                                 </span>
169 169
                             <?php endif ?>
170
-                            <?php if( isset($passwordErrors['isNew']) ) : ?>
170
+                            <?php if( isset( $passwordErrors['isNew'] ) ) : ?>
171 171
                                 <span class="invalid-feedback d-block" role="alert">
172 172
                                     <strong><?= $passwordErrors['isNew'] ?></strong>
173 173
                                 </span>
Please login to merge, or discard this patch.
client/html/src/Client/Html/Account/Profile/Account/Standard.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
         return [];
57 57
     }
58 58
 
59
-    public function getSubClient(string $type, string $name = null): \Aimeos\Client\Html\Iface
59
+    public function getSubClient( string $type, string $name = null ): \Aimeos\Client\Html\Iface
60 60
     {
61 61
         // TODO: Implement getSubClient() method.
62 62
     }
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
      * @param string $uid Unique identifier for the output if the content is placed more than once on the same page
68 68
      * @return string HTML code
69 69
      */
70
-    public function getBody(string $uid = ''): string
70
+    public function getBody( string $uid = '' ): string
71 71
     {
72 72
         $view = $this->getView();
73 73
 
@@ -120,30 +120,30 @@  discard block
 block discarded – undo
120 120
         /** @var \Aimeos\Controller\Frontend\Customer\Standard $cntl */
121 121
         $cntl = \Aimeos\Controller\Frontend::create( $this->getContext(), 'customer' );
122 122
         $oldPassword = $cntl->get()->getPassword();
123
-        $values = $view->param('account', []);
123
+        $values = $view->param( 'account', [] );
124 124
 
125 125
         $isNew = $values['customer.newpassword'] !== $values['customer.oldpassword'];
126 126
         $confirmed = $values['customer.newpassword'] === $values['customer.confirmnewpassword'];
127 127
 
128 128
         $errors = [];
129 129
 
130
-        if (!$isNew) {
130
+        if( !$isNew ) {
131 131
             $errors['isNew'] = "The given password is not new!";
132 132
         }
133 133
 
134
-        if (!$confirmed) {
134
+        if( !$confirmed ) {
135 135
             $errors["confirm"] = "New passwords doesnt match!";
136 136
         }
137 137
 
138
-        $cntl = $cntl->add($values);
138
+        $cntl = $cntl->add( $values );
139 139
 
140
-        if ( $oldPassword === $cntl->get()->getPassword() ) {
140
+        if( $oldPassword === $cntl->get()->getPassword() ) {
141 141
                 $errors['oldPassword'] = "Wrong password!";
142 142
         }
143 143
 
144
-        $view->passwordChanged = count(array_keys($errors)) === 0;
144
+        $view->passwordChanged = count( array_keys( $errors ) ) === 0;
145 145
 
146
-        if (count(array_keys($errors)) > 0) {
146
+        if( count( array_keys( $errors ) ) > 0 ) {
147 147
             $view->passwordErrors = $errors;
148 148
         }
149 149
 
Please login to merge, or discard this patch.