Subversion-Projekte lars-tiefland.laravel_shop

Revision

Revision 148 | Ganze Datei anzeigen | Leerzeichen ignorieren | Details | Blame | Letzte Änderung | Log anzeigen | RSS feed

Revision 148 Revision 399
Zeile 187... Zeile 187...
187
    {
187
    {
188
        return str_replace(':max', $parameters[0], $message);
188
        return str_replace(':max', $parameters[0], $message);
189
    }
189
    }
Zeile 190... Zeile 190...
190
 
190
 
-
 
191
    /**
-
 
192
     * Replace all place-holders for the missing_if rule.
-
 
193
     *
-
 
194
     * @param  string  $message
-
 
195
     * @param  string  $attribute
-
 
196
     * @param  string  $rule
-
 
197
     * @param  array<int,string>  $parameters
-
 
198
     * @return string
-
 
199
     */
-
 
200
    protected function replaceMissingIf($message, $attribute, $rule, $parameters)
-
 
201
    {
-
 
202
        $parameters[1] = $this->getDisplayableValue($parameters[0], Arr::get($this->data, $parameters[0]));
-
 
203
 
-
 
204
        $parameters[0] = $this->getDisplayableAttribute($parameters[0]);
-
 
205
 
-
 
206
        return str_replace([':other', ':value'], $parameters, $message);
-
 
207
    }
-
 
208
 
-
 
209
    /**
-
 
210
     * Replace all place-holders for the missing_unless rule.
-
 
211
     *
-
 
212
     * @param  string  $message
-
 
213
     * @param  string  $attribute
-
 
214
     * @param  string  $rule
-
 
215
     * @param  array<int,string>  $parameters
-
 
216
     * @return string
-
 
217
     */
-
 
218
    protected function replaceMissingUnless($message, $attribute, $rule, $parameters)
-
 
219
    {
-
 
220
        return $this->replaceMissingIf($message, $attribute, $rule, $parameters);
-
 
221
    }
-
 
222
 
-
 
223
    /**
-
 
224
     * Replace all place-holders for the missing_with rule.
-
 
225
     *
-
 
226
     * @param  string  $message
-
 
227
     * @param  string  $attribute
-
 
228
     * @param  string  $rule
-
 
229
     * @param  array<int,string>  $parameters
-
 
230
     * @return string
-
 
231
     */
-
 
232
    protected function replaceMissingWith($message, $attribute, $rule, $parameters)
-
 
233
    {
-
 
234
        return str_replace(':values', implode(' / ', $this->getAttributeList($parameters)), $message);
-
 
235
    }
-
 
236
 
-
 
237
    /**
-
 
238
     * Replace all place-holders for the missing_with_all rule.
-
 
239
     *
-
 
240
     * @param  string  $message
-
 
241
     * @param  string  $attribute
-
 
242
     * @param  string  $rule
-
 
243
     * @param  array<int,string>  $parameters
-
 
244
     * @return string
-
 
245
     */
-
 
246
    protected function replaceMissingWithAll($message, $attribute, $rule, $parameters)
-
 
247
    {
-
 
248
        return $this->replaceMissingWith($message, $attribute, $rule, $parameters);
-
 
249
    }
-
 
250
 
191
    /**
251
    /**
192
     * Replace all place-holders for the multiple_of rule.
252
     * Replace all place-holders for the multiple_of rule.
193
     *
253
     *
194
     * @param  string  $message
254
     * @param  string  $message
195
     * @param  string  $attribute
255
     * @param  string  $attribute