@@ -29,7 +29,7 @@ |
||
| 29 | 29 | |
| 30 | 30 | public function collection() |
| 31 | 31 | { |
| 32 | - return $this->query->get($this->columns)->each(function (Model $item) { |
|
| 32 | + return $this->query->get($this->columns)->each(function(Model $item) { |
|
| 33 | 33 | return $item->setAppends([]); |
| 34 | 34 | }); |
| 35 | 35 | } |
@@ -53,7 +53,7 @@ |
||
| 53 | 53 | $this->posts->query() |
| 54 | 54 | ->where('status', '!=', Post::PUBLISHED) |
| 55 | 55 | ->where('published_at', '<', $now) |
| 56 | - ->where(function (Builder $q) use ($now) { |
|
| 56 | + ->where(function(Builder $q) use ($now) { |
|
| 57 | 57 | $q |
| 58 | 58 | ->whereNull('unpublished_at') |
| 59 | 59 | ->orWhere('unpublished_at', '>', $now); |
@@ -39,11 +39,11 @@ discard block |
||
| 39 | 39 | public function passes($attribute, $value) |
| 40 | 40 | { |
| 41 | 41 | // Option is off |
| 42 | - if (! config('access.users.password_history')) { |
|
| 42 | + if (!config('access.users.password_history')) { |
|
| 43 | 43 | return true; |
| 44 | 44 | } |
| 45 | 45 | |
| 46 | - if (! $this->user instanceof User) { |
|
| 46 | + if (!$this->user instanceof User) { |
|
| 47 | 47 | if (is_numeric($this->user)) { |
| 48 | 48 | $this->user = resolve(BackendUserRepository::class)->getById($this->user); |
| 49 | 49 | } else { |
@@ -51,7 +51,7 @@ discard block |
||
| 51 | 51 | } |
| 52 | 52 | } |
| 53 | 53 | |
| 54 | - if (! $this->user || null === $this->user) { |
|
| 54 | + if (!$this->user || null === $this->user) { |
|
| 55 | 55 | return false; |
| 56 | 56 | } |
| 57 | 57 | |
@@ -9,23 +9,23 @@ discard block |
||
| 9 | 9 | class Donation extends Model |
| 10 | 10 | { |
| 11 | 11 | |
| 12 | - static public function getPaymentPage($request,$id){ |
|
| 12 | + static public function getPaymentPage($request, $id) { |
|
| 13 | 13 | |
| 14 | - $idMarket = Doika_configuration::where('configuration_name','id_market') |
|
| 14 | + $idMarket = Doika_configuration::where('configuration_name', 'id_market') |
|
| 15 | 15 | ->first()->configuration_value; |
| 16 | - $keyMarket = Doika_configuration::where('configuration_name','key_market') |
|
| 16 | + $keyMarket = Doika_configuration::where('configuration_name', 'key_market') |
|
| 17 | 17 | ->first()->configuration_value; |
| 18 | - if(Doika_configuration::where('configuration_name','is_test') |
|
| 19 | - ->first()->configuration_value == 1){ |
|
| 18 | + if (Doika_configuration::where('configuration_name', 'is_test') |
|
| 19 | + ->first()->configuration_value == 1) { |
|
| 20 | 20 | $is_test = true; |
| 21 | - }else{ |
|
| 21 | + } else { |
|
| 22 | 22 | $is_test = false; |
| 23 | 23 | } |
| 24 | 24 | |
| 25 | - $url = isset($request->url) ? urldecode($request->url) : ("https://" . $_SERVER['HTTP_HOST'] . '/'); |
|
| 25 | + $url = isset($request->url) ? urldecode($request->url) : ("https://".$_SERVER['HTTP_HOST'].'/'); |
|
| 26 | 26 | $url .= (strpos($url, "?") > 0) ? "&" : "?"; |
| 27 | 27 | |
| 28 | - $donate = $request->donate*100; |
|
| 28 | + $donate = $request->donate * 100; |
|
| 29 | 29 | $GetTokenParams = [ |
| 30 | 30 | "checkout" => [ |
| 31 | 31 | "test" => $is_test, //true, |
@@ -33,9 +33,9 @@ discard block |
||
| 33 | 33 | "version" => 2.1, |
| 34 | 34 | "attempts" => 3, |
| 35 | 35 | "settings" => [ |
| 36 | - "success_url" => $url . "message=1", |
|
| 37 | - "decline_url" => $url . "message=2", |
|
| 38 | - "fail_url" => $url . "message=3", |
|
| 36 | + "success_url" => $url."message=1", |
|
| 37 | + "decline_url" => $url."message=2", |
|
| 38 | + "fail_url" => $url."message=3", |
|
| 39 | 39 | "notification_url" => "https://".$_SERVER['HTTP_HOST']."/doika/payment-record-db-".$id, |
| 40 | 40 | "language"=> "ru" |
| 41 | 41 | ], |
@@ -19,27 +19,27 @@ discard block |
||
| 19 | 19 | public static function getCampaignClientArray($id) |
| 20 | 20 | { |
| 21 | 21 | $campaign = Campaign::find($id); |
| 22 | - if(!$campaign){ |
|
| 22 | + if (!$campaign) { |
|
| 23 | 23 | return "Campaign not found!"; |
| 24 | 24 | } |
| 25 | 25 | $lang = CampaignPageAdmin::getLangDefault(); |
| 26 | 26 | |
| 27 | 27 | $campaignConfigurations = $campaign->campaign_configurations()->first(); |
| 28 | 28 | $campaignInformations = $campaign->campaign_lang_informations() |
| 29 | - ->where('campaign_lang',$lang) |
|
| 29 | + ->where('campaign_lang', $lang) |
|
| 30 | 30 | ->first(); |
| 31 | 31 | |
| 32 | 32 | $arrCampaign = [ |
| 33 | 33 | "height" => 200, //высота модуля |
| 34 | 34 | "width" => 300, //ширина модуля |
| 35 | 35 | "releaseUrl" => config('app.release_url'), |
| 36 | - "backgroundColor" => ConfigurationPageAdmin::getConfiguration('color_module_background',true), //Колер фона модуля |
|
| 37 | - "buttonColor" => ConfigurationPageAdmin::getConfiguration('color_module_buttons',true), //Колер кнопак з сумамі |
|
| 36 | + "backgroundColor" => ConfigurationPageAdmin::getConfiguration('color_module_background', true), //Колер фона модуля |
|
| 37 | + "buttonColor" => ConfigurationPageAdmin::getConfiguration('color_module_buttons', true), //Колер кнопак з сумамі |
|
| 38 | 38 | |
| 39 | - "show_banner" => ConfigurationPageAdmin::getConfiguration('show_banner',true), //Паказваць банэр |
|
| 40 | - "color_banner_background" => ConfigurationPageAdmin::getConfiguration('color_banner_background',true), //Колер фону банэра |
|
| 41 | - "color_banner_help_background" => ConfigurationPageAdmin::getConfiguration('color_banner_help_background',true), //Колер кнопкі "Дапамагчы" |
|
| 42 | - "color_banner_help_text" => ConfigurationPageAdmin::getConfiguration('color_banner_help_text',true), //Колер тэкста "Дапамагчы" |
|
| 39 | + "show_banner" => ConfigurationPageAdmin::getConfiguration('show_banner', true), //Паказваць банэр |
|
| 40 | + "color_banner_background" => ConfigurationPageAdmin::getConfiguration('color_banner_background', true), //Колер фону банэра |
|
| 41 | + "color_banner_help_background" => ConfigurationPageAdmin::getConfiguration('color_banner_help_background', true), //Колер кнопкі "Дапамагчы" |
|
| 42 | + "color_banner_help_text" => ConfigurationPageAdmin::getConfiguration('color_banner_help_text', true), //Колер тэкста "Дапамагчы" |
|
| 43 | 43 | |
| 44 | 44 | "titleTextColor" => "#31383e", //цвет шрифта заголовка |
| 45 | 45 | "titleFontSize" => "22px", //размер шрифта заголовка |
@@ -80,7 +80,7 @@ discard block |
||
| 80 | 80 | private static function getCurrentFunds($id) |
| 81 | 81 | { |
| 82 | 82 | $campaign = Campaign::find($id); |
| 83 | - if(isset($campaign->payments)){ |
|
| 83 | + if (isset($campaign->payments)) { |
|
| 84 | 84 | $payments = $campaign->payments->sum('amount'); |
| 85 | 85 | return $payments; |
| 86 | 86 | } |
@@ -20,7 +20,7 @@ discard block |
||
| 20 | 20 | */ |
| 21 | 21 | public function canChangePassword() |
| 22 | 22 | { |
| 23 | - return ! app('session')->has(config('access.socialite_session_name')); |
|
| 23 | + return !app('session')->has(config('access.socialite_session_name')); |
|
| 24 | 24 | } |
| 25 | 25 | |
| 26 | 26 | /** |
@@ -33,7 +33,7 @@ discard block |
||
| 33 | 33 | { |
| 34 | 34 | switch ($this->avatar_type) { |
| 35 | 35 | case 'gravatar': |
| 36 | - if (! $size) { |
|
| 36 | + if (!$size) { |
|
| 37 | 37 | $size = config('gravatar.default.size'); |
| 38 | 38 | } |
| 39 | 39 | |
@@ -96,6 +96,6 @@ discard block |
||
| 96 | 96 | */ |
| 97 | 97 | public function isPending() |
| 98 | 98 | { |
| 99 | - return config('access.users.requires_approval') && ! $this->confirmed; |
|
| 99 | + return config('access.users.requires_approval') && !$this->confirmed; |
|
| 100 | 100 | } |
| 101 | 101 | } |
@@ -176,7 +176,7 @@ discard block |
||
| 176 | 176 | { |
| 177 | 177 | parent::boot(); |
| 178 | 178 | |
| 179 | - static::deleted(function (self $post) { |
|
| 179 | + static::deleted(function(self $post) { |
|
| 180 | 180 | $post->meta->delete(); |
| 181 | 181 | }); |
| 182 | 182 | } |
@@ -241,12 +241,12 @@ discard block |
||
| 241 | 241 | |
| 242 | 242 | public function getMetaTitleAttribute() |
| 243 | 243 | { |
| 244 | - return null !== $this->meta && ! empty($this->meta->title) ? $this->meta->title : $this->title; |
|
| 244 | + return null !== $this->meta && !empty($this->meta->title) ? $this->meta->title : $this->title; |
|
| 245 | 245 | } |
| 246 | 246 | |
| 247 | 247 | public function getMetaDescriptionAttribute() |
| 248 | 248 | { |
| 249 | - return null !== $this->meta && ! empty($this->meta->description) ? $this->meta->description : $this->summary; |
|
| 249 | + return null !== $this->meta && !empty($this->meta->description) ? $this->meta->description : $this->summary; |
|
| 250 | 250 | } |
| 251 | 251 | |
| 252 | 252 | public function owner() |
@@ -14,9 +14,9 @@ |
||
| 14 | 14 | |
| 15 | 15 | public static function bootHasTranslatableSlug() |
| 16 | 16 | { |
| 17 | - static::saving(function (Model $model) { |
|
| 17 | + static::saving(function(Model $model) { |
|
| 18 | 18 | collect($model->getTranslatedLocales($model->sluggable)) |
| 19 | - ->each(function (string $locale) use ($model) { |
|
| 19 | + ->each(function(string $locale) use ($model) { |
|
| 20 | 20 | $model->setTranslation('slug', $locale, |
| 21 | 21 | $model->generateSlug($model->getTranslation($model->sluggable, $locale), $locale) |
| 22 | 22 | ); |
@@ -10,7 +10,7 @@ |
||
| 10 | 10 | { |
| 11 | 11 | public static function bootHasEditor() |
| 12 | 12 | { |
| 13 | - static::saved(function (Model $model) { |
|
| 13 | + static::saved(function(Model $model) { |
|
| 14 | 14 | if ($model instanceof HasMedia && property_exists($model, 'editorFields')) { |
| 15 | 15 | foreach ($model->editorFields as $field) { |
| 16 | 16 | $model->saveImagesToMediaCollection($field); |