Completed
Pull Request — master (#121)
by Marcin
07:47
created
src/lang/fa/builder.php 1 patch
Indentation   +49 added lines, -49 removed lines patch added patch discarded remove patch
@@ -10,56 +10,56 @@
 block discarded – undo
10 10
  */
11 11
 return [
12 12
 
13
-    'ok'                       => 'موفق',
14
-    'no_error_message'         => 'خطای شماره :api_code',
13
+	'ok'                       => 'موفق',
14
+	'no_error_message'         => 'خطای شماره :api_code',
15 15
 
16
-    // can be used by Exception Handler (if enabled)
17
-    'uncaught_exception'       => 'استثناء مدیریت نشده :message',
18
-    // we talking API call here, hence we have http_not_found
19
-    'http_exception'           => 'استثناء HTTP :message',
16
+	// can be used by Exception Handler (if enabled)
17
+	'uncaught_exception'       => 'استثناء مدیریت نشده :message',
18
+	// we talking API call here, hence we have http_not_found
19
+	'http_exception'           => 'استثناء HTTP :message',
20 20
 
21
-    // HttpException handler (added in 6.4.0)
22
-    // Error messages for HttpException caught w/o custom messages
23
-    // https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml
24
-    'http_400'                 => 'Bad Request',
25
-    'http_401'                 => 'اجازه دسترسی ندارید',
26
-    'http_402'                 => 'Payment Required',
27
-    'http_403'                 => 'Forbidden',
28
-    'http_404'                 => 'Not Found',
29
-    'http_405'                 => 'Method Not Allowed',
30
-    'http_406'                 => 'Not Acceptable',
31
-    'http_407'                 => 'Proxy Authentication Required',
32
-    'http_408'                 => 'Request Timeout',
33
-    'http_409'                 => 'Conflict',
34
-    'http_410'                 => 'Gone',
35
-    'http_411'                 => 'Length Required',
36
-    'http_412'                 => 'Precondition Failed',
37
-    'http_413'                 => 'Payload Too Large',
38
-    'http_414'                 => 'URI Too Long',
39
-    'http_415'                 => 'Unsupported Media Type',
40
-    'http_416'                 => 'Range Not Satisfiable',
41
-    'http_417'                 => 'Expectation Failed',
42
-    'http_421'                 => 'Misdirected Request',
43
-    'http_422'                 => 'داده معتبر نیست',
44
-    'http_423'                 => 'Locked',
45
-    'http_424'                 => 'Failed Dependency',
46
-    'http_425'                 => 'Too Early',
47
-    'http_426'                 => 'Upgrade Required',
48
-    'http_428'                 => 'Precondition Required',
49
-    'http_429'                 => 'Too Many Requests',
50
-    'http_431'                 => 'Request Header Fields Too Large',
51
-    'http_451'                 => 'Unavailable For Legal Reasons',
52
-    'http_500'                 => 'Internal Server Error',
53
-    'http_501'                 => 'Not Implemented',
54
-    'http_502'                 => 'Bad Gateway',
55
-    'http_503'                 => 'Service Unavailable',
56
-    'http_504'                 => 'Gateway Timeout',
57
-    'http_505'                 => 'HTTP Version Not Supported',
58
-    'http_506'                 => 'Variant Also Negotiates',
59
-    'http_507'                 => 'Insufficient Storage',
60
-    'http_508'                 => 'Loop Detected',
61
-    'http_509'                 => 'Unassigned',
62
-    'http_510'                 => 'Not Extended',
63
-    'http_511'                 => 'Network Authentication Required',
21
+	// HttpException handler (added in 6.4.0)
22
+	// Error messages for HttpException caught w/o custom messages
23
+	// https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml
24
+	'http_400'                 => 'Bad Request',
25
+	'http_401'                 => 'اجازه دسترسی ندارید',
26
+	'http_402'                 => 'Payment Required',
27
+	'http_403'                 => 'Forbidden',
28
+	'http_404'                 => 'Not Found',
29
+	'http_405'                 => 'Method Not Allowed',
30
+	'http_406'                 => 'Not Acceptable',
31
+	'http_407'                 => 'Proxy Authentication Required',
32
+	'http_408'                 => 'Request Timeout',
33
+	'http_409'                 => 'Conflict',
34
+	'http_410'                 => 'Gone',
35
+	'http_411'                 => 'Length Required',
36
+	'http_412'                 => 'Precondition Failed',
37
+	'http_413'                 => 'Payload Too Large',
38
+	'http_414'                 => 'URI Too Long',
39
+	'http_415'                 => 'Unsupported Media Type',
40
+	'http_416'                 => 'Range Not Satisfiable',
41
+	'http_417'                 => 'Expectation Failed',
42
+	'http_421'                 => 'Misdirected Request',
43
+	'http_422'                 => 'داده معتبر نیست',
44
+	'http_423'                 => 'Locked',
45
+	'http_424'                 => 'Failed Dependency',
46
+	'http_425'                 => 'Too Early',
47
+	'http_426'                 => 'Upgrade Required',
48
+	'http_428'                 => 'Precondition Required',
49
+	'http_429'                 => 'Too Many Requests',
50
+	'http_431'                 => 'Request Header Fields Too Large',
51
+	'http_451'                 => 'Unavailable For Legal Reasons',
52
+	'http_500'                 => 'Internal Server Error',
53
+	'http_501'                 => 'Not Implemented',
54
+	'http_502'                 => 'Bad Gateway',
55
+	'http_503'                 => 'Service Unavailable',
56
+	'http_504'                 => 'Gateway Timeout',
57
+	'http_505'                 => 'HTTP Version Not Supported',
58
+	'http_506'                 => 'Variant Also Negotiates',
59
+	'http_507'                 => 'Insufficient Storage',
60
+	'http_508'                 => 'Loop Detected',
61
+	'http_509'                 => 'Unassigned',
62
+	'http_510'                 => 'Not Extended',
63
+	'http_511'                 => 'Network Authentication Required',
64 64
 ];
65 65
 
Please login to merge, or discard this patch.
config/response_builder.php 1 patch
Indentation   +47 added lines, -47 removed lines patch added patch discarded remove patch
@@ -12,61 +12,61 @@  discard block
 block discarded – undo
12 12
  */
13 13
 
14 14
 return [
15
-    /*
15
+	/*
16 16
     |-----------------------------------------------------------------------------------------------------------
17 17
     | Code range settings
18 18
     |-----------------------------------------------------------------------------------------------------------
19 19
     */
20
-    'min_code'          => 100,
21
-    'max_code'          => 1024,
20
+	'min_code'          => 100,
21
+	'max_code'          => 1024,
22 22
 
23
-    /*
23
+	/*
24 24
     |-----------------------------------------------------------------------------------------------------------
25 25
     | Error code to message mapping
26 26
     |-----------------------------------------------------------------------------------------------------------
27 27
     |
28 28
     */
29
-    'map'               => [
30
-        // YOUR_API_CODE => '<MESSAGE_KEY>',
31
-    ],
29
+	'map'               => [
30
+		// YOUR_API_CODE => '<MESSAGE_KEY>',
31
+	],
32 32
 
33
-    /*
33
+	/*
34 34
     |-----------------------------------------------------------------------------------------------------------
35 35
     | Response Builder classes
36 36
     |-----------------------------------------------------------------------------------------------------------
37 37
     |
38 38
     */
39
-    'classes'           => [
40
-        \Illuminate\Database\Eloquent\Model::class          => [
41
-            'key'    => 'item',
42
-            'method' => 'toArray',
43
-            'pri'    => 0,
44
-        ],
45
-        \Illuminate\Support\Collection::class               => [
46
-            'key'    => 'items',
47
-            'method' => 'toArray',
48
-            'pri'    => 0,
49
-        ],
50
-        \Illuminate\Database\Eloquent\Collection::class     => [
51
-            'key'    => 'items',
52
-            'method' => 'toArray',
53
-            'pri'    => 0,
54
-        ],
55
-        \Illuminate\Http\Resources\Json\JsonResource::class => [
56
-            'key'    => 'item',
57
-            'method' => 'toArray',
58
-            'pri'    => 0,
59
-        ],
60
-    ],
39
+	'classes'           => [
40
+		\Illuminate\Database\Eloquent\Model::class          => [
41
+			'key'    => 'item',
42
+			'method' => 'toArray',
43
+			'pri'    => 0,
44
+		],
45
+		\Illuminate\Support\Collection::class               => [
46
+			'key'    => 'items',
47
+			'method' => 'toArray',
48
+			'pri'    => 0,
49
+		],
50
+		\Illuminate\Database\Eloquent\Collection::class     => [
51
+			'key'    => 'items',
52
+			'method' => 'toArray',
53
+			'pri'    => 0,
54
+		],
55
+		\Illuminate\Http\Resources\Json\JsonResource::class => [
56
+			'key'    => 'item',
57
+			'method' => 'toArray',
58
+			'pri'    => 0,
59
+		],
60
+	],
61 61
 
62
-    /*
62
+	/*
63 63
     |-----------------------------------------------------------------------------------------------------------
64 64
     | Exception handler error codes
65 65
     |-----------------------------------------------------------------------------------------------------------
66 66
     |
67 67
     */
68
-    'exception_handler' => [
69
-        /*
68
+	'exception_handler' => [
69
+		/*
70 70
          * The following options can be used for each entry specified:
71 71
          * `api_code`   : (int) mandatory api_code to be used for given exception
72 72
          * `http_code`  : (int) optional HTTP code. If not specified, exception's HTTP status code will be used.
@@ -79,8 +79,8 @@  discard block
 block discarded – undo
79 79
          *                `msg_key` is set, or message referenced by `msg_key` completely ignoring exception
80 80
          *                message ($ex->getMessage()).
81 81
          */
82
-        'map' => [
83
-            /*
82
+		'map' => [
83
+			/*
84 84
              * HTTP Exceptions
85 85
              * ---------------
86 86
              * Configure how you want Http Exception to be handled based on its Http status code.
@@ -110,29 +110,29 @@  discard block
 block discarded – undo
110 110
 //                'http_code' => HttpResponse::HTTP_INTERNAL_SERVER_ERROR,
111 111
 //            ],
112 112
 //        ],
113
-        ],
114
-    ],
113
+		],
114
+	],
115 115
 
116
-    /*
116
+	/*
117 117
     |-----------------------------------------------------------------------------------------------------------
118 118
     | data-to-json encoding options
119 119
     |-----------------------------------------------------------------------------------------------------------
120 120
     |
121 121
     */
122
-    'encoding_options'  => JSON_HEX_TAG | JSON_HEX_APOS | JSON_HEX_AMP | JSON_HEX_QUOT | JSON_UNESCAPED_UNICODE,
122
+	'encoding_options'  => JSON_HEX_TAG | JSON_HEX_APOS | JSON_HEX_AMP | JSON_HEX_QUOT | JSON_UNESCAPED_UNICODE,
123 123
 
124
-    /*
124
+	/*
125 125
     |-----------------------------------------------------------------------------------------------------------
126 126
     | Debug config
127 127
     |-----------------------------------------------------------------------------------------------------------
128 128
     |
129 129
     */
130
-    'debug'             => [
131
-        'debug_key'         => 'debug',
132
-        'exception_handler' => [
133
-            'trace_key'     => 'trace',
134
-            'trace_enabled' => env('APP_DEBUG', false),
135
-        ],
136
-    ],
130
+	'debug'             => [
131
+		'debug_key'         => 'debug',
132
+		'exception_handler' => [
133
+			'trace_key'     => 'trace',
134
+			'trace_enabled' => env('APP_DEBUG', false),
135
+		],
136
+	],
137 137
 
138 138
 ];
Please login to merge, or discard this patch.