Skip to content

Commit

Permalink
Merge pull request #620 from dbrumann/examples/transitive
Browse files Browse the repository at this point in the history
Add example for transitive dependencies.
  • Loading branch information
Denis Brumann authored Jul 3, 2021
2 parents 7b1117a + 19b2d99 commit 12a77b7
Show file tree
Hide file tree
Showing 5 changed files with 64 additions and 0 deletions.
27 changes: 27 additions & 0 deletions examples/Transitive.depfile.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
paths: ["./Transitive"]
exclude_files: []
layers:
- name: Foo
collectors:
- type: className
regex: .*\\Foo$
- name: Baz
collectors:
- type: className
regex: .*\\Baz$
- name: Bar
collectors:
- type: className
regex: .*\\Bar$
- name: Bat
collectors:
- type: className
regex: .*\\Bat$
ruleset:
Foo:
- Bar
Bar: ~
Baz:
- +Foo
Bat:
- Foo
7 changes: 7 additions & 0 deletions examples/Transitive/Bar.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?php

namespace examples\Transitive;

class Bar
{
}
10 changes: 10 additions & 0 deletions examples/Transitive/Bat.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?php

namespace examples\Transitive;

class Bat
{
public function __construct(Foo $foo, Bar $bar)
{
}
}
10 changes: 10 additions & 0 deletions examples/Transitive/Baz.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?php

namespace examples\Transitive;

class Baz
{
public function __construct(Foo $foo, Bar $bar)
{
}
}
10 changes: 10 additions & 0 deletions examples/Transitive/Foo.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?php

namespace examples\Transitive;

class Foo
{
public function __construct(Bar $bar)
{
}
}

0 comments on commit 12a77b7

Please sign in to comment.