@@ -22,7 +22,7 @@ |
||
| 22 | 22 | |
| 23 | 23 | if (static::class == Rivet::class) { |
| 24 | 24 | static::addGlobalScope(new RivetTypeScope(static::class)); |
| 25 | - static::saving(function ($model) { |
|
| 25 | + static::saving(function($model) { |
|
| 26 | 26 | $model->type = static::class; |
| 27 | 27 | }); |
| 28 | 28 | } |
@@ -24,7 +24,7 @@ |
||
| 24 | 24 | { |
| 25 | 25 | $query = $builder->getQuery(); |
| 26 | 26 | |
| 27 | - foreach((array) $query->wheres as $key => $where) { |
|
| 27 | + foreach ((array) $query->wheres as $key => $where) { |
|
| 28 | 28 | if ($key == 'type') { |
| 29 | 29 | unset($query->wheres[$key]); |
| 30 | 30 | } |
@@ -13,7 +13,7 @@ discard block |
||
| 13 | 13 | public function boot() |
| 14 | 14 | { |
| 15 | 15 | $this->publishes([ |
| 16 | - __DIR__ . '/../database/migrations/' => database_path('migrations') |
|
| 16 | + __DIR__.'/../database/migrations/' => database_path('migrations') |
|
| 17 | 17 | ], 'migrations'); |
| 18 | 18 | $this->publishes([ |
| 19 | 19 | __DIR__.'/../config/luminark/rivet.php' => config_path('luminark/courier.php'), |
@@ -26,10 +26,10 @@ discard block |
||
| 26 | 26 | __DIR__.'/../config/luminark/rivet.php', 'luminark.rivet' |
| 27 | 27 | ); |
| 28 | 28 | |
| 29 | - $this->app->bind(FileProcessorInterface::class, function ($app) { |
|
| 29 | + $this->app->bind(FileProcessorInterface::class, function($app) { |
|
| 30 | 30 | return $app->make(FileProcessor::class); |
| 31 | 31 | }); |
| 32 | - $this->app->bind(AttachingListenerInterface::class, function ($app) { |
|
| 32 | + $this->app->bind(AttachingListenerInterface::class, function($app) { |
|
| 33 | 33 | return $app->make(AttachingListener::class); |
| 34 | 34 | }); |
| 35 | 35 | $this->app->register(RivetEventServiceProvider::class); |
@@ -51,7 +51,7 @@ discard block |
||
| 51 | 51 | $filePath = $this->getStoragePath(get_class($rivet)) |
| 52 | 52 | . DIRECTORY_SEPARATOR |
| 53 | 53 | . $tempFile->getBasename(); |
| 54 | - while($this->filesystem->exists($filePath)) { |
|
| 54 | + while ($this->filesystem->exists($filePath)) { |
|
| 55 | 55 | $filePath = $this->generateUniqueFilename($filePath); |
| 56 | 56 | } |
| 57 | 57 | |
@@ -80,7 +80,7 @@ discard block |
||
| 80 | 80 | } |
| 81 | 81 | |
| 82 | 82 | $tempStoragePath = $this->getStoragePath('temp'); |
| 83 | - $tempPath = $tempStoragePath . DIRECTORY_SEPARATOR . $filename; |
|
| 83 | + $tempPath = $tempStoragePath.DIRECTORY_SEPARATOR.$filename; |
|
| 84 | 84 | |
| 85 | 85 | if ( ! file_exists($tempStoragePath)) { |
| 86 | 86 | mkdir($tempStoragePath, 0775, true); |
@@ -94,7 +94,7 @@ discard block |
||
| 94 | 94 | protected function getStoragePath($class) |
| 95 | 95 | { |
| 96 | 96 | return $this->config->get( |
| 97 | - 'luminark.rivet.storage.' . $class, |
|
| 97 | + 'luminark.rivet.storage.'.$class, |
|
| 98 | 98 | $this->config->get('luminark.rivet.storage.default') |
| 99 | 99 | ); |
| 100 | 100 | } |
@@ -103,7 +103,7 @@ discard block |
||
| 103 | 103 | { |
| 104 | 104 | $string = explode('.', $string); |
| 105 | 105 | $lastIndex = count($string) - 1; |
| 106 | - $string[$lastIndex] = str_random(5) . '.' . $string[$lastIndex]; |
|
| 106 | + $string[$lastIndex] = str_random(5).'.'.$string[$lastIndex]; |
|
| 107 | 107 | |
| 108 | 108 | return implode('.', $string); |
| 109 | 109 | } |
@@ -29,7 +29,7 @@ discard block |
||
| 29 | 29 | if (is_numeric($rivet)) { |
| 30 | 30 | $rivet = $class::findOrFail($rivet); |
| 31 | 31 | } elseif ( ! $rivet instanceof $class) { |
| 32 | - throw new InvalidArgumentException("Invalid object provided for attaching to $attribute. Expected $class, got " . get_class($rivet) . "."); |
|
| 32 | + throw new InvalidArgumentException("Invalid object provided for attaching to $attribute. Expected $class, got ".get_class($rivet)."."); |
|
| 33 | 33 | } |
| 34 | 34 | |
| 35 | 35 | if ($type == 'property') { |
@@ -40,7 +40,7 @@ discard block |
||
| 40 | 40 | throw new InvalidArgumentException("Invalid type [$type] provided for attaching to $attribute."); |
| 41 | 41 | } |
| 42 | 42 | |
| 43 | - if($relationShouldLoad) { |
|
| 43 | + if ($relationShouldLoad) { |
|
| 44 | 44 | $this->load($attribute); |
| 45 | 45 | } |
| 46 | 46 | } |
@@ -84,7 +84,7 @@ discard block |
||
| 84 | 84 | throw new InvalidArgumentException('Unrelated ID or Rivet object passed to removeRivet method.'); |
| 85 | 85 | } |
| 86 | 86 | |
| 87 | - if($relationShouldLoad) { |
|
| 87 | + if ($relationShouldLoad) { |
|
| 88 | 88 | $this->load($attribute); |
| 89 | 89 | } |
| 90 | 90 | |
@@ -11,7 +11,7 @@ |
||
| 11 | 11 | parent::boot(); |
| 12 | 12 | |
| 13 | 13 | static::addGlobalScope(new RivetTypeScope(static::getType())); |
| 14 | - static::saving(function ($model) { |
|
| 14 | + static::saving(function($model) { |
|
| 15 | 15 | $model->type = $model::getType(); |
| 16 | 16 | }); |
| 17 | 17 | } |