@@ -29,7 +29,7 @@ discard block |
||
| 29 | 29 | /** |
| 30 | 30 | * Other tables |
| 31 | 31 | */ |
| 32 | - $this->middleware('media.image.select:Image', ['only' => ['create','edit']]); |
|
| 32 | + $this->middleware('media.image.select:Image', [ 'only' => [ 'create', 'edit' ] ]); |
|
| 33 | 33 | } |
| 34 | 34 | |
| 35 | 35 | /** |
@@ -50,7 +50,7 @@ discard block |
||
| 50 | 50 | * @param object $object |
| 51 | 51 | * @param Request $request |
| 52 | 52 | */ |
| 53 | - public function associateRelationships($object, Request $request){ |
|
| 53 | + public function associateRelationships($object, Request $request) { |
|
| 54 | 54 | |
| 55 | 55 | /** |
| 56 | 56 | * Validate image ID, if failed set to default |
@@ -69,7 +69,7 @@ discard block |
||
| 69 | 69 | /** |
| 70 | 70 | * Validator OK - save it |
| 71 | 71 | */ |
| 72 | - else{ |
|
| 72 | + else { |
|
| 73 | 73 | |
| 74 | 74 | $object->images()->associate($request->input('image_id')); |
| 75 | 75 | } |
@@ -30,7 +30,7 @@ discard block |
||
| 30 | 30 | /** |
| 31 | 31 | * Other tables |
| 32 | 32 | */ |
| 33 | - $this->middleware('media.image.select:Image', ['only' => ['create', 'edit']]); |
|
| 33 | + $this->middleware('media.image.select:Image', [ 'only' => [ 'create', 'edit' ] ]); |
|
| 34 | 34 | } |
| 35 | 35 | |
| 36 | 36 | /** |
@@ -45,7 +45,7 @@ discard block |
||
| 45 | 45 | 'meta_keywords' => 'max:255', |
| 46 | 46 | 'url' => 'required|max:255|unique:articlecategory,url', |
| 47 | 47 | 'text' => 'max:1000000', |
| 48 | - 'color' => 'required|max:255']; |
|
| 48 | + 'color' => 'required|max:255' ]; |
|
| 49 | 49 | |
| 50 | 50 | /** |
| 51 | 51 | * Associate relationships to other table |
@@ -30,12 +30,12 @@ discard block |
||
| 30 | 30 | /** |
| 31 | 31 | * Add lookup tables |
| 32 | 32 | */ |
| 33 | - $this->middleware('add.lookup.tables:AdvertLocation', ['only' => ['create', 'edit']]); |
|
| 33 | + $this->middleware('add.lookup.tables:AdvertLocation', [ 'only' => [ 'create', 'edit' ] ]); |
|
| 34 | 34 | |
| 35 | 35 | /** |
| 36 | 36 | * Other tables |
| 37 | 37 | */ |
| 38 | - $this->middleware('media.image.select:Image', ['only' => ['create', 'edit']]); |
|
| 38 | + $this->middleware('media.image.select:Image', [ 'only' => [ 'create', 'edit' ] ]); |
|
| 39 | 39 | } |
| 40 | 40 | |
| 41 | 41 | /** |
@@ -95,13 +95,13 @@ discard block |
||
| 95 | 95 | /** |
| 96 | 96 | * Validate advert location ID, if failed set to default |
| 97 | 97 | */ |
| 98 | - if($request->has('advertlocation_id')){ |
|
| 98 | + if ($request->has('advertlocation_id')) { |
|
| 99 | 99 | |
| 100 | - $validIDs = []; |
|
| 100 | + $validIDs = [ ]; |
|
| 101 | 101 | |
| 102 | 102 | foreach ($request->input('advertlocation_id') as $advertlocation_id) { |
| 103 | 103 | |
| 104 | - $arrayForValidator = ['advertlocation_id' => $advertlocation_id]; |
|
| 104 | + $arrayForValidator = [ 'advertlocation_id' => $advertlocation_id ]; |
|
| 105 | 105 | |
| 106 | 106 | $validator = Validator::make($arrayForValidator, [ |
| 107 | 107 | 'advertlocation_id' => 'required|integer|min:1|exists:advertlocation,id', |
@@ -119,7 +119,7 @@ discard block |
||
| 119 | 119 | */ |
| 120 | 120 | else { |
| 121 | 121 | |
| 122 | - $validIDs[] = $advertlocation_id; |
|
| 122 | + $validIDs[ ] = $advertlocation_id; |
|
| 123 | 123 | } |
| 124 | 124 | } |
| 125 | 125 | |
@@ -31,25 +31,25 @@ |
||
| 31 | 31 | $this->middleware('guest'); |
| 32 | 32 | } |
| 33 | 33 | |
| 34 | - public function prePostEmail(Request $request){ |
|
| 34 | + public function prePostEmail(Request $request) { |
|
| 35 | 35 | |
| 36 | 36 | /** |
| 37 | 37 | * Add recaptcha |
| 38 | 38 | */ |
| 39 | - if(env('RECAPTCHA_ENABLED') == 1){ |
|
| 40 | - $this->validate($request, ['g-recaptcha-response' => 'required|recaptcha']); |
|
| 39 | + if (env('RECAPTCHA_ENABLED') == 1) { |
|
| 40 | + $this->validate($request, [ 'g-recaptcha-response' => 'required|recaptcha' ]); |
|
| 41 | 41 | } |
| 42 | 42 | |
| 43 | 43 | return $this->postEmail($request); |
| 44 | 44 | } |
| 45 | 45 | |
| 46 | - public function prePostReset(Request $request){ |
|
| 46 | + public function prePostReset(Request $request) { |
|
| 47 | 47 | |
| 48 | 48 | /** |
| 49 | 49 | * Add recaptcha |
| 50 | 50 | */ |
| 51 | - if(env('RECAPTCHA_ENABLED') == 1){ |
|
| 52 | - $this->validate($request, ['g-recaptcha-response' => 'required|recaptcha']); |
|
| 51 | + if (env('RECAPTCHA_ENABLED') == 1) { |
|
| 52 | + $this->validate($request, [ 'g-recaptcha-response' => 'required|recaptcha' ]); |
|
| 53 | 53 | } |
| 54 | 54 | |
| 55 | 55 | return $this->postReset($request); |
@@ -39,7 +39,7 @@ discard block |
||
| 39 | 39 | public function __construct() |
| 40 | 40 | { |
| 41 | 41 | $this->redirectAfterLogout = env('APP_ADMIN_URL', 'admin'); |
| 42 | - $this->middleware('guest', ['except' => 'getLogout']); |
|
| 42 | + $this->middleware('guest', [ 'except' => 'getLogout' ]); |
|
| 43 | 43 | } |
| 44 | 44 | |
| 45 | 45 | /** |
@@ -66,9 +66,9 @@ discard block |
||
| 66 | 66 | protected function create(array $data) |
| 67 | 67 | { |
| 68 | 68 | return User::create([ |
| 69 | - 'name' => $data['name'], |
|
| 70 | - 'email' => $data['email'], |
|
| 71 | - 'password' => bcrypt($data['password']), |
|
| 69 | + 'name' => $data[ 'name' ], |
|
| 70 | + 'email' => $data[ 'email' ], |
|
| 71 | + 'password' => bcrypt($data[ 'password' ]), |
|
| 72 | 72 | ]); |
| 73 | 73 | } |
| 74 | 74 | |
@@ -77,8 +77,8 @@ discard block |
||
| 77 | 77 | /** |
| 78 | 78 | * Add recaptcha |
| 79 | 79 | */ |
| 80 | - if(env('RECAPTCHA_ENABLED') == 1){ |
|
| 81 | - $this->validate($request, ['g-recaptcha-response' => 'required|recaptcha']); |
|
| 80 | + if (env('RECAPTCHA_ENABLED') == 1) { |
|
| 81 | + $this->validate($request, [ 'g-recaptcha-response' => 'required|recaptcha' ]); |
|
| 82 | 82 | } |
| 83 | 83 | |
| 84 | 84 | return $this->postLogin($request); |
@@ -31,12 +31,12 @@ |
||
| 31 | 31 | * Get lookup table data and insert into request |
| 32 | 32 | */ |
| 33 | 33 | $intArgs = func_num_args(); |
| 34 | - for($a = 2; $a < $intArgs; $a++){ |
|
| 34 | + for ($a = 2; $a < $intArgs; $a++) { |
|
| 35 | 35 | |
| 36 | 36 | $model = func_get_arg($a); |
| 37 | - $modelWithNamespace = 'App\\'.$model; |
|
| 37 | + $modelWithNamespace = 'App\\' . $model; |
|
| 38 | 38 | |
| 39 | - $request->merge([$model => $modelWithNamespace::orderBy('name', 'asc')->get()]); |
|
| 39 | + $request->merge([ $model => $modelWithNamespace::orderBy('name', 'asc')->get() ]); |
|
| 40 | 40 | } |
| 41 | 41 | |
| 42 | 42 | return $next($request); |
@@ -44,16 +44,16 @@ discard block |
||
| 44 | 44 | */ |
| 45 | 45 | if (is_numeric($fieldName) == TRUE) { |
| 46 | 46 | $fieldName = $fieldAttributes; |
| 47 | - $fieldAttributes = ['operator' => '=', 'prefix' => '', 'sufix' => '']; |
|
| 47 | + $fieldAttributes = [ 'operator' => '=', 'prefix' => '', 'sufix' => '' ]; |
|
| 48 | 48 | } |
| 49 | - if (isset($fieldAttributes['operator']) == FALSE) { |
|
| 50 | - $fieldAttributes['operator'] = '='; |
|
| 49 | + if (isset($fieldAttributes[ 'operator' ]) == FALSE) { |
|
| 50 | + $fieldAttributes[ 'operator' ] = '='; |
|
| 51 | 51 | } |
| 52 | - if (isset($fieldAttributes['prefix']) == FALSE) { |
|
| 53 | - $fieldAttributes['prefix'] = ''; |
|
| 52 | + if (isset($fieldAttributes[ 'prefix' ]) == FALSE) { |
|
| 53 | + $fieldAttributes[ 'prefix' ] = ''; |
|
| 54 | 54 | } |
| 55 | - if (isset($fieldAttributes['sufix']) == FALSE) { |
|
| 56 | - $fieldAttributes['sufix'] = ''; |
|
| 55 | + if (isset($fieldAttributes[ 'sufix' ]) == FALSE) { |
|
| 56 | + $fieldAttributes[ 'sufix' ] = ''; |
|
| 57 | 57 | } |
| 58 | 58 | |
| 59 | 59 | /** |
@@ -61,13 +61,13 @@ discard block |
||
| 61 | 61 | */ |
| 62 | 62 | if ($first == TRUE) { |
| 63 | 63 | |
| 64 | - $query->where($fieldName, $fieldAttributes['operator'], $fieldAttributes['prefix'] . $word |
|
| 65 | - . $fieldAttributes['sufix']); |
|
| 64 | + $query->where($fieldName, $fieldAttributes[ 'operator' ], $fieldAttributes[ 'prefix' ] . $word |
|
| 65 | + . $fieldAttributes[ 'sufix' ]); |
|
| 66 | 66 | |
| 67 | 67 | $first = FALSE; |
| 68 | 68 | } else { |
| 69 | - $query->orWhere($fieldName, $fieldAttributes['operator'], $fieldAttributes['prefix'] . $word |
|
| 70 | - . $fieldAttributes['sufix']); |
|
| 69 | + $query->orWhere($fieldName, $fieldAttributes[ 'operator' ], $fieldAttributes[ 'prefix' ] . $word |
|
| 70 | + . $fieldAttributes[ 'sufix' ]); |
|
| 71 | 71 | } |
| 72 | 72 | } |
| 73 | 73 | } |
@@ -104,7 +104,7 @@ discard block |
||
| 104 | 104 | * @param array $possibleParameters |
| 105 | 105 | * @return boolean |
| 106 | 106 | */ |
| 107 | - public static function resetSaveIndexParameters($module, $possibleParameters = ['search', 'orderbycolumn', 'orderbytype', 'relation']) |
|
| 107 | + public static function resetSaveIndexParameters($module, $possibleParameters = [ 'search', 'orderbycolumn', 'orderbytype', 'relation' ]) |
|
| 108 | 108 | { |
| 109 | 109 | |
| 110 | 110 | /** |
@@ -117,7 +117,7 @@ discard block |
||
| 117 | 117 | */ |
| 118 | 118 | foreach ($allParameters as $parameter => $value) { |
| 119 | 119 | |
| 120 | - $cacheKey = implode('.', [$module, Auth::user()->id, $parameter]); |
|
| 120 | + $cacheKey = implode('.', [ $module, Auth::user()->id, $parameter ]); |
|
| 121 | 121 | |
| 122 | 122 | /** |
| 123 | 123 | * Reset |
@@ -125,7 +125,7 @@ discard block |
||
| 125 | 125 | if (empty($value) == TRUE) { |
| 126 | 126 | |
| 127 | 127 | Cache::forget($cacheKey); |
| 128 | - unset($allParameters[$parameter]); |
|
| 128 | + unset($allParameters[ $parameter ]); |
|
| 129 | 129 | } /** |
| 130 | 130 | * Save |
| 131 | 131 | */ else { |
@@ -139,9 +139,9 @@ discard block |
||
| 139 | 139 | */ |
| 140 | 140 | foreach ($possibleParameters as $parameter => $value) { |
| 141 | 141 | |
| 142 | - $cacheKey = implode('.', [$module, Auth::user()->id, $value]); |
|
| 142 | + $cacheKey = implode('.', [ $module, Auth::user()->id, $value ]); |
|
| 143 | 143 | |
| 144 | - $allParameters[$value] = Cache::get($cacheKey); |
|
| 144 | + $allParameters[ $value ] = Cache::get($cacheKey); |
|
| 145 | 145 | } |
| 146 | 146 | |
| 147 | 147 | /** |
@@ -249,7 +249,7 @@ discard block |
||
| 249 | 249 | |
| 250 | 250 | if (preg_match('/content: \$fa-var-(.*)\;/', $row, $matches) == TRUE) { |
| 251 | 251 | |
| 252 | - $icons[] = "fa-" . $matches[1]; |
|
| 252 | + $icons[ ] = "fa-" . $matches[ 1 ]; |
|
| 253 | 253 | } |
| 254 | 254 | |
| 255 | 255 | } |
@@ -24,5 +24,5 @@ |
||
| 24 | 24 | protected $arValidationArray = [ |
| 25 | 25 | 'name' => 'required|max:255|unique:settings,name', |
| 26 | 26 | 'value' => 'max:255', |
| 27 | - 'description' => 'max:255']; |
|
| 27 | + 'description' => 'max:255' ]; |
|
| 28 | 28 | } |
@@ -63,9 +63,9 @@ |
||
| 63 | 63 | protected function create(array $data) |
| 64 | 64 | { |
| 65 | 65 | return User::create([ |
| 66 | - 'name' => $data['name'], |
|
| 67 | - 'email' => $data['email'], |
|
| 68 | - 'password' => bcrypt($data['password']), |
|
| 66 | + 'name' => $data[ 'name' ], |
|
| 67 | + 'email' => $data[ 'email' ], |
|
| 68 | + 'password' => bcrypt($data[ 'password' ]), |
|
| 69 | 69 | ]); |
| 70 | 70 | } |
| 71 | 71 | } |
| 72 | 72 | \ No newline at end of file |