-
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a64431b
commit 7e81a29
Showing
20 changed files
with
173 additions
and
177 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,3 +2,9 @@ composer.lock | |
/vendor | ||
|
||
.phpunit.result.cache | ||
|
||
|
||
bootstrap/cache/* | ||
!bootstrap/cache/.gitkeep | ||
|
||
storage/* |
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,15 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace TomasVotruba\ClassLeak\Console; | ||
|
||
use Illuminate\Foundation\Console\Kernel; | ||
|
||
final class ClassLeakKernel extends Kernel | ||
{ | ||
protected function commands(): void | ||
{ | ||
$this->load(__DIR__ . '/Commands'); | ||
} | ||
} |
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 was deleted.
Oops, something went wrong.
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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,33 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace TomasVotruba\ClassLeak\Providers; | ||
|
||
use Illuminate\Support\ServiceProvider; | ||
use PhpParser\Parser; | ||
use PhpParser\ParserFactory; | ||
use Symfony\Component\Console\Input\ArrayInput; | ||
use Symfony\Component\Console\Output\ConsoleOutput; | ||
use Symfony\Component\Console\Output\NullOutput; | ||
use Symfony\Component\Console\Style\SymfonyStyle; | ||
|
||
final class AppServiceProvider extends ServiceProvider | ||
{ | ||
public function register(): void | ||
{ | ||
$this->app->singleton(Parser::class, function (): Parser { | ||
$parserFactory = new ParserFactory(); | ||
return $parserFactory->create(ParserFactory::PREFER_PHP7); | ||
}); | ||
|
||
$this->app->singleton( | ||
SymfonyStyle::class, | ||
static function (): SymfonyStyle { | ||
// use null output ofr tests to avoid printing | ||
$consoleOutput = defined('PHPUNIT_COMPOSER_INSTALL') ? new NullOutput() : new ConsoleOutput(); | ||
return new SymfonyStyle(new ArrayInput([]), $consoleOutput); | ||
} | ||
); | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
use Illuminate\Foundation\Application; | ||
use Illuminate\Contracts\Debug\ExceptionHandler; | ||
use Illuminate\Foundation\Exceptions\Handler; | ||
use TomasVotruba\ClassLeak\Console\ClassLeakKernel; | ||
|
||
$application = new Application($_ENV['APP_BASE_PATH'] ?? dirname(__DIR__)); | ||
|
||
$application->singleton(\Illuminate\Contracts\Console\Kernel::class, ClassLeakKernel::class); | ||
$application->singleton(ExceptionHandler::class, Handler::class); | ||
|
||
return $application; |
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 @@ | ||
keep |
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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
use TomasVotruba\PunchCard\AppConfig; | ||
|
||
return AppConfig::make() | ||
->providers([\TomasVotruba\ClassLeak\Providers\AppServiceProvider::class]) | ||
->toArray(); |
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,8 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
use TomasVotruba\PunchCard\CacheConfig; | ||
|
||
return CacheConfig::make() | ||
->toArray(); |
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,8 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
use TomasVotruba\PunchCard\LoggingConfig; | ||
|
||
return LoggingConfig::make() | ||
->toArray(); |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.