scitools.com

← Graph catalog

Uses Traits is one of the interactive graphs Understand can draw of your code — call trees, dependencies, control flow, and more.

Uses Traits

Languages: Web
Targets: Classes
Variants: Classic, Cluster, Compare, Relationship, Simplified

Show the PHP traits a selected class or trait uses, directly or indirectly.

For a selected PHP class or trait, this shows an edge to each trait it uses in a use statement, then recurses into each of those traits’ own uses, building a multi-level tree.

Rooted at Trackable below, the graph shows it using Auditable and Sluggable, which use Timestampable and Identifiable respectively, neither of which uses anything further. The inverse graph, Used By, shows the reverse relationship — everything that uses the selected class or trait, directly or indirectly.

See the following code and corresponding graph

trait Trackable {
    use Auditable;
    use Sluggable;
}

trait Auditable {
    use Timestampable;
}

trait Sluggable {
    use Identifiable;
}

trait Timestampable {
}

trait Identifiable {
}

Uses Traits - Classic

The Classic variant is similar to the Simplified variant, showing all relationships in a simple tree, but it uses a custom layout algorithm instead of Graphviz.


Back to Uses Traits

Uses Traits - Cluster

The Cluster variant groups entities by their containing class/file/architecture.


Back to Uses Traits

Uses Traits - Compare

The Compare variant shows how the graph has changed relative to the project's comparison database.


Back to Uses Traits

Uses Traits - Relationship

The Relationship variant filters the graph to only paths connecting the two entities.


Back to Uses Traits

Uses Traits - Simplified

The Simplified variant shows all relationships in a simple tree (no clusters)


Back to Uses Traits