@@ -16,7 +16,7 @@ |
||
| 16 | 16 | { |
| 17 | 17 | $table = ConfigProvider::getScrapsTable(); |
| 18 | 18 | if (!Schema::hasTable($table)) { |
| 19 | - Schema::create($table, static function (Blueprint $table) { |
|
| 19 | + Schema::create($table, static function(Blueprint $table) { |
|
| 20 | 20 | $table->increments('id'); |
| 21 | 21 | $table->string('hash', 128)->unique(); // a hash |
| 22 | 22 | $table->string('title')->nullable(); |
@@ -64,7 +64,7 @@ |
||
| 64 | 64 | $this->app->singleton(ConfigProviderContract::class, ConfigProvider::class); |
| 65 | 65 | $this->app->bind( |
| 66 | 66 | SeekerContract::class, |
| 67 | - function (): SeekerContract { |
|
| 67 | + function(): SeekerContract { |
|
| 68 | 68 | $configProvider = resolve(ConfigProviderContract::class); |
| 69 | 69 | |
| 70 | 70 | return new Seeker( |
@@ -308,7 +308,7 @@ |
||
| 308 | 308 | } |
| 309 | 309 | |
| 310 | 310 | $items->each( |
| 311 | - function (Crawler $itemCrawler) use ( |
|
| 311 | + function(Crawler $itemCrawler) use ( |
|
| 312 | 312 | $markupHasInside, |
| 313 | 313 | $markupInside, |
| 314 | 314 | $target, |
@@ -113,7 +113,7 @@ discard block |
||
| 113 | 113 | |
| 114 | 114 | public function convertScraps(bool $convertDuplicates = false, bool $storeRelatedReferences = false): void |
| 115 | 115 | { |
| 116 | - $this->scraps->map(function (Scrap $scrap) use ($convertDuplicates, $storeRelatedReferences) { |
|
| 116 | + $this->scraps->map(function(Scrap $scrap) use ($convertDuplicates, $storeRelatedReferences) { |
|
| 117 | 117 | try { |
| 118 | 118 | $relatedObject = $scrap->convert($convertDuplicates, $storeRelatedReferences); |
| 119 | 119 | if ($relatedObject !== null) { |
@@ -137,7 +137,7 @@ discard block |
||
| 137 | 137 | |
| 138 | 138 | public function saveScraps(): void |
| 139 | 139 | { |
| 140 | - $this->scraps->map(function (Scrap $scrap): void { |
|
| 140 | + $this->scraps->map(function(Scrap $scrap): void { |
|
| 141 | 141 | try { |
| 142 | 142 | $scrap->save(); |
| 143 | 143 | } catch (QueryException $e) { |
@@ -63,7 +63,7 @@ |
||
| 63 | 63 | // Pluck mapped details from string |
| 64 | 64 | foreach ($map as $attr => $regex) { |
| 65 | 65 | // match and replace details in string |
| 66 | - $string = preg_replace_callback($regex, static function ($m) use ($attr, &$details, $retain) { |
|
| 66 | + $string = preg_replace_callback($regex, static function($m) use ($attr, &$details, $retain) { |
|
| 67 | 67 | // grab match |
| 68 | 68 | $match = trim($m[0]); |
| 69 | 69 | $details[$attr] = $match; |