-
Notifications
You must be signed in to change notification settings - Fork 134
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
6aec38f
commit c6c801f
Showing
42 changed files
with
559 additions
and
136 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
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
Binary file not shown.
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,8 +1,8 @@ | ||
-----BEGIN PGP SIGNATURE----- | ||
|
||
iJMEABYKADsWIQRXy1VvJC/I1P1IPCxHQ2WH2CxKOQUCZfLQwh0cZ2VubmFkaS5t | ||
Y2tlbHZleUBxb3NzbWljLmNvbQAKCRBHQ2WH2CxKOYVRAP0crfIO32Tt9G1U2QI5 | ||
ebOmFt3wvPWx+eA2yl4aQ2BtfQEAuFRE9CsTgXubdKi7pTNIqTX3HdLCgI2YwiXm | ||
ZBXuIg8= | ||
=58M9 | ||
iJMEABYKADsWIQRXy1VvJC/I1P1IPCxHQ2WH2CxKOQUCZfyQKB0cZ2VubmFkaS5t | ||
Y2tlbHZleUBxb3NzbWljLmNvbQAKCRBHQ2WH2CxKOSlPAQCCRiLJA/cxv5ipQjgG | ||
9xLIfhjMT6X04wcIbpmmqemJBAD+I8LXdRbE3T9mC8Z00xHXkXmgBQnP8jKShWqx | ||
YrX3WQM= | ||
=+7Ga | ||
-----END PGP SIGNATURE----- |
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
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,18 @@ | ||
<?php | ||
|
||
declare (strict_types=1); | ||
namespace Qossmic\Deptrac\Contract\Ast; | ||
|
||
/** | ||
* @psalm-immutable | ||
* | ||
* Context of the dependency. | ||
* | ||
* Any additional info about where the dependency occurred. | ||
*/ | ||
final class DependencyContext | ||
{ | ||
public function __construct(public readonly \Qossmic\Deptrac\Contract\Ast\FileOccurrence $fileOccurrence, public readonly \Qossmic\Deptrac\Contract\Ast\DependencyType $dependencyType) | ||
{ | ||
} | ||
} |
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,42 @@ | ||
<?php | ||
|
||
declare (strict_types=1); | ||
namespace Qossmic\Deptrac\Contract\Config\Formatter; | ||
|
||
use Qossmic\Deptrac\Contract\Config\Layer; | ||
final class MermaidJsConfig implements \Qossmic\Deptrac\Contract\Config\Formatter\FormatterConfigInterface | ||
{ | ||
private string $name = 'mermaidjs'; | ||
private string $direction = 'TD'; | ||
/** @var array<string, Layer[]> */ | ||
private array $groups = []; | ||
public static function create() : self | ||
{ | ||
return new self(); | ||
} | ||
public function getName() : string | ||
{ | ||
return $this->name; | ||
} | ||
public function direction(string $direction) : self | ||
{ | ||
$this->direction = $direction; | ||
return $this; | ||
} | ||
public function groups(string $name, Layer ...$layerConfigs) : self | ||
{ | ||
foreach ($layerConfigs as $layerConfig) { | ||
$this->groups[$name][] = $layerConfig; | ||
} | ||
return $this; | ||
} | ||
public function toArray() : array | ||
{ | ||
$output = []; | ||
if ([] !== $this->groups) { | ||
$output['groups'] = \array_map(static fn(array $configs) => \array_map(static fn(Layer $layer) => $layer->name, $configs), $this->groups); | ||
} | ||
$output['direction'] = $this->direction; | ||
return $output; | ||
} | ||
} |
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
Oops, something went wrong.