Skip to content

Commit 44f3f84

Browse files
authored
Added diagrams, icons and improvements (phpactor#309)
1 parent e334549 commit 44f3f84

File tree

12 files changed

+95
-30
lines changed

12 files changed

+95
-30
lines changed

doc/README.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,15 @@ Packages
3030

3131
Phpactor is made up of a few different packages:
3232

33+
![Components](images/components.png)
34+
3335
- [phpactor/class-mover](https://github.com/phpactor/class-mover): Find and update class references.
3436
- [phpactor/class-to-file](https://github.com/phpactor/class-to-file): Convert files to class names and vice-versa.
3537
- [phpactor/code-builder](https://github.com/phpactor/code-builder): Library for creating and idempotently updating source code.
3638
- [phpactor/code-transform](https://github.com/phpactor/code-transform): Transform code.
3739
- [phpactor/path-finder](https://github.com/phpactor/path-finder): Simple for file relationships when they share common path segments.
3840
- [phpactor/source-code-filesystem](https://github.com/phpactor/source-code-filesystem): Find and manage source code trees.
39-
- [phpactor/test-utils](https://github.com/phpactor/test-utils): Simple for file relationships when they share common path segments.
41+
- [phpactor/test-utils](https://github.com/phpactor/test-utils): Shared test utilities for Phpactor
4042
- [phpactor/worse-reflection](https://github.com/phpactor/worse-reflection): Static source reflection library.
4143

4244
Depends On
@@ -47,15 +49,16 @@ Phpactor stands on the shoulders of some other packages:
4749
- [Couscous](http://couscous.io/): This documentation is generated with Couscous.
4850
- [Jetbrains PhpStorm Stubs](https://github.com/JetBrains/phpstorm-stubs): Built in PHP classes are supported through this stub collection from PhpStorm.
4951
- [PHPBench](https://github.com/phpbench/phpbench): For tracking performance.
52+
- [PHPUnit](https://github.com/sebastianbergmann/phpunit): The de facto
53+
standard PHP test framework
5054
- [Symfony](https://symfony.com): The command line application is built with the Symfony console component.
5155
- [Tolerant PHP Parser](https://github.com/Microsoft/tolerant-php-parser): Large parts of Phpactor are integrated with the TPP.
5256

5357
Influenced By
5458
-------------
5559

56-
implementing the LSP, some terminology has been borrowed from it.
5760
- [BetterReflection](https://github.com/Roave/BetterReflection): Phpactors reflection API was heavily influenced by this library.
58-
- [Language Server Protocol](https://github.com/Microsoft/language-server-protocol): While not
61+
- [Language Server Protocol](https://github.com/Microsoft/language-server-protocol): While not implementing the LSP, some terminology has been borrowed from it.
5962
- [Nikic PHP Parser](https://github.com/nikic/PHP-Parser): The original Phpactor used this before switching to TPP.
6063

6164
Similar Projects

doc/build.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/usr/bin/env bash
2+
for dotfile in `ls doc/dot`; do
3+
name=${dotfile%.dot}
4+
dot doc/dot/$dotfile -Tpng > doc/images/$name.png
5+
done

doc/dot/class-referenes.dot

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
2+
digraph {
3+
Class [label="Acme\\AbstractServiceFactoryFactoryImpl"]
4+
File1 [label="lib/Acme/Engine:32"]
5+
File2 [label="lib/Acme/Entity/Car:100"]
6+
File3 [label="lib/Acme/Circulator:200"]
7+
File4 [label="lib/Acme/ContainerContainer:100,120,130"]
8+
9+
File1 -> Class
10+
File2 -> Class
11+
File3 -> Class
12+
File4 -> Class
13+
}

doc/dot/components.dot

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
digraph {
2+
CodeBuilder [label="Code Builder"]
3+
Transform [label="Code Transform"]
4+
Reflection [label="Worse Reflection"]
5+
Filesystem [label="SC Filesystem"]
6+
ClassMover [label="Class Mover"]
7+
Phpactor [label="Phpactor"]
8+
ClassToFile [label="Class to File"]
9+
TestUtils [label="Test Utils"]
10+
PathFinder [label="Path Finder"]
11+
12+
Transform -> Phpactor
13+
Reflection -> Phpactor
14+
Filesystem -> Phpactor
15+
ClassMover -> Phpactor
16+
Reflection -> Transform
17+
CodeBuilder -> Transform
18+
ClassToFile -> Phpactor
19+
PathFinder -> Phpactor
20+
21+
Reflection -> TestUtils
22+
Phpactor -> TestUtils
23+
Transform -> TestUtils
24+
CodeBuilder -> TestUtils
25+
ClassMover -> TestUtils
26+
}

doc/images/class-referenes.png

32 KB
Loading

doc/images/components.png

63.6 KB
Loading

doc/navigation.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Navigate / list all references to a given class.
1616

1717
- **Command**: `$ phpactor references:class path/to/Class.php`
1818
- **VIM Context Menu**: _Class context menu > Find references_.
19-
- **VIM Command**: `call phpactor#FindReferences()`
19+
- **VIM Command**:`:call phpactor#FindReferences()`
2020

2121
### Description
2222

@@ -27,14 +27,16 @@ The VIM plugin will load the class references into a quick fix list which you ca
2727

2828
The CLI command will list the references and show a highlighted line where the references were found.
2929

30+
![Class references](images/class-referenes.png)
31+
3032
Class Member References
3133
-------------------------
3234

3335
Navigate / list all references to a given class member (method, property or constant).
3436

3537
- **Command**: `$ phpactor references:member path/to/Class.php memberName`
3638
- **VIM Context Menu**: _Member context menu > Find references_.
37-
- **VIM Command**: `call phpactor#FindReferences()`
39+
- **VIM Command**:`:call phpactor#FindReferences()`
3840

3941
### Description
4042

@@ -52,7 +54,7 @@ Jump to the definition of a class or class member.
5254

5355
- **Command**: _RPC Only_
5456
- **VIM Context Menu**: _Member/class context menu > Goto definition_.
55-
- **VIM Command**: `call phpactor#GotoDefinition()`
57+
- **VIM Command**:`:call phpactor#GotoDefinition()`
5658

5759
### Description
5860

@@ -67,7 +69,7 @@ Jump to a related file (e.g. unit test, integration test, benchmark), and option
6769

6870
- **Command**: _RPC Only_
6971
- **VIM Context Menu**: _Class context menu > Navigate_.
70-
- **VIM Command**: `call phpactor#Navigate()`
72+
- **VIM Command**:`:call phpactor#Navigate()`
7173

7274
### Description
7375

doc/refactorings.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ Automatically add any missing properties to a class.
3535

3636
- **Command**: `$ phpactor class:transform path/to/Class.php --transform=add_missing_assignments`
3737
- **VIM Context Menu**: _Class context menu > Implement Contracts_.
38-
- **VIM Command**: `call phpactor#Transform()`
38+
- **VIM Command**:`:call phpactor#Transform()`
3939

4040
### Motivation
4141

@@ -81,7 +81,7 @@ Copy an existing class to another location updating its name and namespace.
8181

8282
- **Command**: `$ phpactor class:copy path/to/ClassA.php path/to/ClassB.php` (class FQN also accepted).
8383
- **VIM context menu**: _Class context menu > Copy Class_
84-
- **VIM function**: `call phpactor#CopyFile()`
84+
- **VIM function**:`:call phpactor#CopyFile()`
8585

8686
### Motivation
8787

@@ -134,7 +134,7 @@ Move a class (or folder containing classes) from one location to another.
134134

135135
- **Command**: `$ phpactor class:move path/to/ClassA.php path/to/ClassB.php` (class FQN also accepted).
136136
- **VIM context menu**: _Class context menu > Move Class_
137-
- **VIM function**: `call phpactor#MoveFile()`
137+
- **VIM function**:`:call phpactor#MoveFile()`
138138

139139
### Motivation
140140

@@ -190,7 +190,7 @@ Generate a new class with a name and namespace at a given location or from a cla
190190

191191
- **Command**: `$ phpactor class:new path/To/ClassName.php` (class FQN also accepted).
192192
- **VIM context menu**: _Class context menu > New Class_
193-
- **VIM function**: `call phpactor#ClassNew()`
193+
- **VIM function**:`:call phpactor#ClassNew()`
194194

195195
### Motivation
196196

@@ -240,7 +240,7 @@ Complete the assignments and add properties for an incomplete constructor.
240240

241241
- **Command**: `$ phpactor class:transform path/to/class.php --transform=complete_constructor`
242242
- **VIM plugin**: _Class context menu > Complete Constructor_.
243-
- **VIM function**: `call phpactor#Transform()`
243+
- **VIM function**:`:call phpactor#Transform()`
244244

245245
### Motivation
246246

@@ -297,7 +297,7 @@ Extract a constant from a scalar value.
297297

298298
- **Command**: _RPC only_
299299
- **VIM plugin**: _Symbol context menu > Extract Constant_.
300-
- **VIM function**: `call phpactor#ContextMenu()`
300+
- **VIM function**:`:call phpactor#ContextMenu()`
301301

302302
### Motivation
303303

@@ -366,7 +366,7 @@ Extract an interface from a class. If a wildcard is given (CLI only) generate an
366366

367367
- **Command**: `$ phpactor class:inflect path/to/Class.php path/to/Interface.php` (wild card accepted).
368368
- **VIM plugin**: _Class context menu > Inflect > Extract interface_.
369-
- **VIM function**: `call phpactor#ClassInflect()`
369+
- **VIM function**:`:call phpactor#ClassInflect()`
370370

371371
### Motivation
372372

@@ -407,7 +407,7 @@ Generate an accessor for a class property.
407407

408408
- **Command**: _RPC only_
409409
- **VIM plugin**: _Property context menu > Generate accessor_.
410-
- **VIM function**: `call phpactor#ContextMenu()`
410+
- **VIM function**:`:call phpactor#ContextMenu()`
411411

412412
### Motivation
413413

@@ -461,7 +461,7 @@ Generate or update a method based on the method call under the cursor.
461461

462462
- **Command**: _RPC only_
463463
- **VIM plugin**: _Method context menu > Generate method_.
464-
- **VIM function**: `call phpactor#ContextMenu()`
464+
- **VIM function**:`:call phpactor#ContextMenu()`
465465

466466
### Motivation
467467

@@ -533,7 +533,7 @@ Add any non-implemented methods from interfaces or abstract classes.
533533

534534
- **Command**: `$ phpactor class:transform /path/to/class.php --transform=implement_contracts`
535535
- **VIM plugin**: _Class context menu > Transform > Implement contracts_.
536-
- **VIM function**: `call phpactor#Transform()`
536+
- **VIM function**:`:call phpactor#Transform()`
537537

538538
### Motivation
539539

@@ -574,7 +574,7 @@ Import a class into the current namespace based on the class name under the curs
574574

575575
- **Command**: _VIM function only_
576576
- **VIM plugin**: _VIM function only_
577-
- **VIM function**: `call phpactor#AddUse()`
577+
- **VIM function**:`:call phpactor#AddUse()`
578578

579579
### Motivation
580580

@@ -652,7 +652,7 @@ Overide a method from a parent class.
652652

653653
- **Command**: _RPC only_
654654
- **VIM plugin**: _Class context menu > Override method_.
655-
- **VIM function**: `call phpactor#ContextMenu()`
655+
- **VIM function**:`:call phpactor#ContextMenu()`
656656

657657
### Motivation
658658

@@ -698,7 +698,7 @@ Rename a variable in the local or class scope.
698698

699699
- **Command**: _RPC only_
700700
- **VIM plugin**: _Variable context menu > Rename_.
701-
- **VIM function**: `call phpactor#ContextMenu()`
701+
- **VIM function**:`:call phpactor#ContextMenu()`
702702

703703
### Motivation
704704

@@ -757,7 +757,7 @@ Rename a class.
757757

758758
- **Command**: `$ phpactor references:class path/to/Class.php --replace="NewName"` (class FQN accepted)
759759
- **VIM plugin**: _Class context menu > Replace references_.
760-
- **VIM function**: `call phpactor#ContextMenu()`
760+
- **VIM function**:`:call phpactor#ContextMenu()`
761761

762762
### Motivation
763763

@@ -814,7 +814,7 @@ Rename a class member.
814814

815815
- **Command**: `$ phpactor references:member path/to/Class.php memberName --type="method" --replace="newMemberName"` (FQN accepted)
816816
- **VIM plugin**: _Member context menu > Replace references_.
817-
- **VIM function**: `call phpactor#ContextMenu()`
817+
- **VIM function**:`:call phpactor#ContextMenu()`
818818

819819
### Motivation
820820

doc/support.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
currentMenu: support
3+
---
4+
Support
5+
=======
6+
7+
Need help? Create a Github issue or ping the Phactor twitter account:
8+
9+
- [Github Issues](https://github.com/phpactor/phpactor/issues)
10+
- Twitter [@phpactor](https://twitter.com/phpactor)

doc/template/css/main.css

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,13 @@ section {
1313
h1, h2, h3, h4 {
1414
color: #df691a;
1515
}
16+
17+
h2 {
18+
border-bottom-style: solid;
19+
border-bottom-width: 1px;
20+
border-bottom-color: #aaa;
21+
}
22+
1623
h3 {
1724
font-size: 23px;
1825
}

0 commit comments

Comments
 (0)