We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
@@ -10,7 +10,7 @@ |
||
| 10 | 10 | if (is_array($array) && count($array)) { |
| 11 | 11 | $list = []; |
| 12 | 12 | foreach ($array as $item) { |
| 13 | - if( isset( $item->{$column['visible_key']} ) ) { |
|
| 13 | + if (isset($item->{$column['visible_key']} )) { |
|
| 14 | 14 | $list[] = $item->{$column['visible_key']}; |
| 15 | 15 | } elseif (is_array($item) && isset($item[$column['visible_key']])) { |
| 16 | 16 | $list[] = $item[$column['visible_key']]; |
@@ -3,13 +3,13 @@ |
||
| 3 | 3 | <?php |
| 4 | 4 | $max = isset($field['max']) ? $field['max'] : -1; |
| 5 | 5 | $min = isset($field['min']) ? $field['min'] : -1; |
| 6 | - $item_name = strtolower( isset($field['entity_singular']) && !empty($field['entity_singular']) ? $field['entity_singular'] : $field['label']); |
|
| 6 | + $item_name = strtolower(isset($field['entity_singular']) && !empty($field['entity_singular']) ? $field['entity_singular'] : $field['label']); |
|
| 7 | 7 | |
| 8 | - $items = old($field['name']) ? (old($field['name'])) : (isset($field['value']) ? ($field['value']) : (isset($field['default']) ? ($field['default']) : '' )); |
|
| 8 | + $items = old($field['name']) ? (old($field['name'])) : (isset($field['value']) ? ($field['value']) : (isset($field['default']) ? ($field['default']) : '')); |
|
| 9 | 9 | |
| 10 | 10 | // make sure not matter the attribute casting |
| 11 | 11 | // the $items variable contains a properly defined JSON |
| 12 | - if(is_array($items)) { |
|
| 12 | + if (is_array($items)) { |
|
| 13 | 13 | if (count($items)) { |
| 14 | 14 | $items = json_encode($items); |
| 15 | 15 | } |
@@ -1,11 +1,11 @@ |
||
| 1 | 1 | <!-- text input --> |
| 2 | 2 | <?php |
| 3 | 3 | |
| 4 | -$value = old($field['name']) ? (old($field['name'])) : (isset($field['value']) ? ($field['value']) : (isset($field['default']) ? ($field['default']) : '' )); |
|
| 4 | +$value = old($field['name']) ? (old($field['name'])) : (isset($field['value']) ? ($field['value']) : (isset($field['default']) ? ($field['default']) : '')); |
|
| 5 | 5 | |
| 6 | 6 | // if attribute casting is used, convert to JSON |
| 7 | 7 | if (is_array($value)) { |
| 8 | - $value = json_encode((object)$value); |
|
| 8 | + $value = json_encode((object) $value); |
|
| 9 | 9 | } elseif (is_object($value)) { |
| 10 | 10 | $value = json_encode($value); |
| 11 | 11 | } else { |
@@ -77,7 +77,7 @@ discard block |
||
| 77 | 77 | |
| 78 | 78 | public function removeButton($name) |
| 79 | 79 | { |
| 80 | - $this->buttons = $this->buttons->reject(function ($button) use ($name) { |
|
| 80 | + $this->buttons = $this->buttons->reject(function($button) use ($name) { |
|
| 81 | 81 | return $button->name == $name; |
| 82 | 82 | }); |
| 83 | 83 | } |
@@ -89,14 +89,14 @@ discard block |
||
| 89 | 89 | |
| 90 | 90 | public function removeAllButtonsFromStack($stack) |
| 91 | 91 | { |
| 92 | - $this->buttons = $this->buttons->reject(function ($button) use ($stack) { |
|
| 92 | + $this->buttons = $this->buttons->reject(function($button) use ($stack) { |
|
| 93 | 93 | return $button->stack == $stack; |
| 94 | 94 | }); |
| 95 | 95 | } |
| 96 | 96 | |
| 97 | 97 | public function removeButtonFromStack($name, $stack) |
| 98 | 98 | { |
| 99 | - $this->buttons = $this->buttons->reject(function ($button) use ($name, $stack) { |
|
| 99 | + $this->buttons = $this->buttons->reject(function($button) use ($name, $stack) { |
|
| 100 | 100 | return $button->name == $name && $button->stack == $stack; |
| 101 | 101 | }); |
| 102 | 102 | } |
@@ -3,11 +3,11 @@ |
||
| 3 | 3 | <?php |
| 4 | 4 | // if the column has been cast to Carbon or Date (using attribute casting) |
| 5 | 5 | // get the value as a date string |
| 6 | - if (isset($field['value']) && ( $field['value'] instanceof \Carbon\Carbon || $field['value'] instanceof \Jenssegers\Date\Date )) { |
|
| 7 | - $field['value'] = $field['value']->format( 'Y-m-d' ); |
|
| 6 | + if (isset($field['value']) && ($field['value'] instanceof \Carbon\Carbon || $field['value'] instanceof \Jenssegers\Date\Date)) { |
|
| 7 | + $field['value'] = $field['value']->format('Y-m-d'); |
|
| 8 | 8 | } |
| 9 | 9 | |
| 10 | - $field_language = isset($field['date_picker_options']['language'])?$field['date_picker_options']['language']:\App::getLocale(); |
|
| 10 | + $field_language = isset($field['date_picker_options']['language']) ? $field['date_picker_options']['language'] : \App::getLocale(); |
|
| 11 | 11 | ?> |
| 12 | 12 | |
| 13 | 13 | <div @include('crud::inc.field_wrapper_attributes') > |
@@ -3,11 +3,11 @@ |
||
| 3 | 3 | <?php |
| 4 | 4 | // if the column has been cast to Carbon or Date (using attribute casting) |
| 5 | 5 | // get the value as a date string |
| 6 | - if (isset($field['value']) && ( $field['value'] instanceof \Carbon\Carbon || $field['value'] instanceof \Jenssegers\Date\Date )) { |
|
| 7 | - $field['value'] = $field['value']->format( 'Y-m-d H:i:s' ); |
|
| 6 | + if (isset($field['value']) && ($field['value'] instanceof \Carbon\Carbon || $field['value'] instanceof \Jenssegers\Date\Date)) { |
|
| 7 | + $field['value'] = $field['value']->format('Y-m-d H:i:s'); |
|
| 8 | 8 | } |
| 9 | 9 | |
| 10 | - $field_language = isset($field['datetime_picker_options']['language'])?$field['datetime_picker_options']['language']:\App::getLocale(); |
|
| 10 | + $field_language = isset($field['datetime_picker_options']['language']) ? $field['datetime_picker_options']['language'] : \App::getLocale(); |
|
| 11 | 11 | ?> |
| 12 | 12 | |
| 13 | 13 | <div @include('crud::inc.field_wrapper_attributes') > |
@@ -35,7 +35,7 @@ discard block |
||
| 35 | 35 | // register the enum column type, because Doctrine doesn't support it |
| 36 | 36 | DB::connection()->getDoctrineSchemaManager()->getDatabasePlatform()->registerDoctrineTypeMapping('enum', 'string'); |
| 37 | 37 | |
| 38 | - return ! DB::connection()->getDoctrineColumn($instance->getTable(), $column_name)->getNotnull(); |
|
| 38 | + return !DB::connection()->getDoctrineColumn($instance->getTable(), $column_name)->getNotnull(); |
|
| 39 | 39 | } |
| 40 | 40 | |
| 41 | 41 | /* |
@@ -54,7 +54,7 @@ discard block |
||
| 54 | 54 | foreach ($columns as $key => $column) { |
| 55 | 55 | $column_contents = $this->{$column}; |
| 56 | 56 | |
| 57 | - if (! is_object($this->{$column})) { |
|
| 57 | + if (!is_object($this->{$column})) { |
|
| 58 | 58 | $column_contents = json_decode($this->{$column}); |
| 59 | 59 | } |
| 60 | 60 | |
@@ -77,7 +77,7 @@ discard block |
||
| 77 | 77 | { |
| 78 | 78 | $model = '\\'.get_class($this); |
| 79 | 79 | |
| 80 | - if (! count($columns)) { |
|
| 80 | + if (!count($columns)) { |
|
| 81 | 81 | $columns = (property_exists($model, 'fakeColumns')) ? $this->fakeColumns : ['extras']; |
| 82 | 82 | } |
| 83 | 83 | |
@@ -167,7 +167,7 @@ discard block |
||
| 167 | 167 | $attribute_value = (array) $this->{$attribute_name}; |
| 168 | 168 | foreach ($files_to_clear as $key => $filename) { |
| 169 | 169 | \Storage::disk($disk)->delete($filename); |
| 170 | - $attribute_value = array_where($attribute_value, function ($value, $key) use ($filename) { |
|
| 170 | + $attribute_value = array_where($attribute_value, function($value, $key) use ($filename) { |
|
| 171 | 171 | return $value != $filename; |
| 172 | 172 | }); |
| 173 | 173 | } |
@@ -211,17 +211,17 @@ discard block |
||
| 211 | 211 | */ |
| 212 | 212 | public function uploadImageToDisk($value, $attribute_name, $disk, $destination_path, $variations = null) |
| 213 | 213 | { |
| 214 | - if (! $variations || ! is_array($variations)) { |
|
| 214 | + if (!$variations || !is_array($variations)) { |
|
| 215 | 215 | $variations = ['original' => null, 'thumb' => [150, 150]]; |
| 216 | 216 | } |
| 217 | 217 | |
| 218 | 218 | //Needed for the original image |
| 219 | - if (! array_key_exists('original', $variations)) { |
|
| 219 | + if (!array_key_exists('original', $variations)) { |
|
| 220 | 220 | $variations['original'] = null; |
| 221 | 221 | } |
| 222 | 222 | |
| 223 | 223 | //Needed for admin thumbnails |
| 224 | - if (! array_key_exists('thumb', $variations)) { |
|
| 224 | + if (!array_key_exists('thumb', $variations)) { |
|
| 225 | 225 | $variations['thumb'] = [150, 150]; |
| 226 | 226 | } |
| 227 | 227 | |
@@ -282,7 +282,7 @@ discard block |
||
| 282 | 282 | $height = $dimensions[1]; |
| 283 | 283 | |
| 284 | 284 | if ($img->width() > $width || $img->height() > $height) { |
| 285 | - $img->resize($width, $height, function ($constraint) { |
|
| 285 | + $img->resize($width, $height, function($constraint) { |
|
| 286 | 286 | $constraint->aspectRatio(); |
| 287 | 287 | }) |
| 288 | 288 | ->save($disk_root.'/'.$variant_file); |
@@ -306,7 +306,7 @@ discard block |
||
| 306 | 306 | $img = \Intervention\Image\ImageManagerStatic::make($value); |
| 307 | 307 | $new_file_name = md5($value.time()); |
| 308 | 308 | |
| 309 | - if (! \Illuminate\Support\Facades\File::exists($disk_root.'/'.trim($destination_path, '/'))) { |
|
| 309 | + if (!\Illuminate\Support\Facades\File::exists($disk_root.'/'.trim($destination_path, '/'))) { |
|
| 310 | 310 | \Illuminate\Support\Facades\File::makeDirectory($disk_root.'/'.trim($destination_path, '/'), 0775, true); |
| 311 | 311 | } |
| 312 | 312 | |
@@ -340,7 +340,7 @@ discard block |
||
| 340 | 340 | $height = $dimensions[1]; |
| 341 | 341 | |
| 342 | 342 | if ($img->width() > $width || $img->height() > $height) { |
| 343 | - $img->resize($width, $height, function ($constraint) { |
|
| 343 | + $img->resize($width, $height, function($constraint) { |
|
| 344 | 344 | $constraint->aspectRatio(); |
| 345 | 345 | }) |
| 346 | 346 | ->save($disk_root.'/'.$variant_file); |
@@ -370,7 +370,7 @@ discard block |
||
| 370 | 370 | { |
| 371 | 371 | $image = $this->attributes['image']; |
| 372 | 372 | $url = null; |
| 373 | - if (! empty($image)) { |
|
| 373 | + if (!empty($image)) { |
|
| 374 | 374 | $image_variant = str_replace('-original', '-'.$variant, $image); |
| 375 | 375 | |
| 376 | 376 | if ($disk) { |