-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #19 from liberu-genealogy/sweep/rename_app_to_src_…
…and_add_composerjson_p Sweep: rename app/ to src/ and add composer.json psr4 auto loading (✓ Sandbox Passed)
- Loading branch information
Showing
7 changed files
with
61 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,10 @@ | ||
{ | ||
"require": { | ||
"liberu-genealogy/php-dna": "^1.0" | ||
"autoload": { | ||
"psr-4": { | ||
"Src\\": "src/" | ||
} | ||
}, | ||
"require": { | ||
"liberu-genealogy/php-dna": "^1.0" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<?php | ||
|
||
namespace Src\Jobs; | ||
|
||
use Illuminate\Bus\Queueable; | ||
use Illuminate\Contracts\Queue\ShouldQueue; | ||
use Illuminate\Foundation\Bus\Dispatchable; | ||
use Illuminate\Queue\InteractsWithQueue; | ||
use Illuminate\Queue\SerializesModels; | ||
use LiburuGenealogy\PhpDna\Matchkits; | ||
|
||
class DispatchMatchkitsJob implements ShouldQueue | ||
{ | ||
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels; | ||
|
||
protected $matchkits; | ||
|
||
public function __construct(Matchkits $matchkits) | ||
{ | ||
$this->matchkits = $matchkits; | ||
} | ||
|
||
public function handle() | ||
{ | ||
// Logic to process matchkits | ||
$this->matchkits->process(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<?php | ||
|
||
namespace Src\Providers; | ||
|
||
use Illuminate\Support\ServiceProvider; | ||
use Src\Jobs\DispatchMatchkitsJob; | ||
use LiburuGenealogy\PhpDna\Matchkits; | ||
|
||
class DnaServiceProvider extends ServiceProvider | ||
{ | ||
public function register() | ||
{ | ||
$this->app->bind('dispatchMatchkits', function($app) { | ||
return new DispatchMatchkitsJob(); | ||
}); | ||
} | ||
|
||
public function boot() | ||
{ | ||
// Optional: Add event listeners or other bootstrapping code necessary for the php-dna library integration | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters