Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clean up and refactor code #1663

Merged
merged 224 commits into from
Apr 15, 2024
Merged
Changes from 1 commit
Commits
Show all changes
224 commits
Select commit Hold shift + click to select a range
5e790a7
Rename private helper method
caendesilva Apr 14, 2024
f4e4da4
Use Laravel string limiting for truncation
caendesilva Apr 14, 2024
1344ced
Inline simplified helper methods
caendesilva Apr 14, 2024
2bdd535
Use assert same instead of assert equals
caendesilva Apr 14, 2024
0a44117
Use assert same instead of assert equals
caendesilva Apr 14, 2024
3a7ccaa
Add assert same test
caendesilva Apr 14, 2024
6cd8fe0
Introduce local variables
caendesilva Apr 14, 2024
017a942
Clean up code
caendesilva Apr 14, 2024
49949cc
Use assert same instead of assert equals
caendesilva Apr 14, 2024
a277e03
Add newline
caendesilva Apr 14, 2024
8928fb9
Clarify test helper method name
caendesilva Apr 14, 2024
b71cfa7
Introduce local variables
caendesilva Apr 14, 2024
41fa650
Assert array keys are the same
caendesilva Apr 14, 2024
3b658b7
Add missing function imports
caendesilva Apr 14, 2024
51e44c0
Clarify outdated language in code comment
caendesilva Apr 14, 2024
7d397fc
Call static method statically
caendesilva Apr 14, 2024
294111f
Join comma-separated values into a single line
caendesilva Apr 14, 2024
9dd43c9
Ignore code coverage for deprecated methods
caendesilva Apr 14, 2024
0a5a1a2
Use assert same instead of assert equals
caendesilva Apr 14, 2024
1e3aecb
Use assert same instead of assert equals
caendesilva Apr 14, 2024
a0f31f7
Join comma-separated values into single lines
caendesilva Apr 14, 2024
6ac7201
Clean up and improve test
caendesilva Apr 14, 2024
2f0f483
Sort assertions
caendesilva Apr 14, 2024
57bbbea
Use assert same instead of assert equals
caendesilva Apr 14, 2024
9d35b03
Add newline
caendesilva Apr 14, 2024
02a6903
Remove redundant type annotation
caendesilva Apr 14, 2024
e724e6d
Normalize code style
caendesilva Apr 14, 2024
1461c36
Use assert same instead of assert equals for scalar types
caendesilva Apr 14, 2024
cabab11
Cleanup test file formatting
caendesilva Apr 14, 2024
c6a60f6
Use assert same instead of assert equals
caendesilva Apr 14, 2024
4ce89f5
Add code newlines between setup and assertions
caendesilva Apr 14, 2024
bff5ee4
Use assert same instead of assert equals
caendesilva Apr 14, 2024
326d155
Add code newlines between setup and assertions
caendesilva Apr 14, 2024
1fb2996
Use setup shorthands
caendesilva Apr 14, 2024
364528e
Use assert same instead of assert equals
caendesilva Apr 14, 2024
0f707eb
Clean up test and improve assertions
caendesilva Apr 14, 2024
d2bd913
Use assert same instead of assert equals
caendesilva Apr 14, 2024
58f4719
Cleanup test
caendesilva Apr 14, 2024
be1911a
Cleanup and improve test
caendesilva Apr 14, 2024
dc84c8c
Cleanup and improve test
caendesilva Apr 14, 2024
e1dfedd
Remove voided test constructors
caendesilva Apr 14, 2024
292c23b
Fix formatting
caendesilva Apr 14, 2024
c721df9
Cleanup test
caendesilva Apr 14, 2024
86ad048
Add code spacing
caendesilva Apr 14, 2024
b1b5f69
Cleanup and improve test
caendesilva Apr 14, 2024
8e1d6fa
Cleanup and improve test
caendesilva Apr 14, 2024
650120c
Cleanup test
caendesilva Apr 14, 2024
1be9ed0
Use assert same instead of assert equals
caendesilva Apr 14, 2024
37dcd2d
Inline local variable
caendesilva Apr 14, 2024
adb592b
Fix faulty test name
caendesilva Apr 14, 2024
d5ae4f2
Clean up and improve test
caendesilva Apr 14, 2024
cdca7bd
Clean up and improve test
caendesilva Apr 14, 2024
029fb56
Add spacing
caendesilva Apr 14, 2024
9708823
Use assert same instead of assert equals
caendesilva Apr 14, 2024
55a39d2
Formatting
caendesilva Apr 14, 2024
7085a1b
Cleanup test
caendesilva Apr 14, 2024
fad0b41
Remove redundant class descriptions
caendesilva Apr 14, 2024
9667df8
Extend our unit test case
caendesilva Apr 14, 2024
49978c0
Inline local variable
caendesilva Apr 14, 2024
115a032
Use assert same instead of assert equals
caendesilva Apr 14, 2024
7241682
Add newlines to code
caendesilva Apr 14, 2024
bd1e408
Add spacing
caendesilva Apr 14, 2024
972c3cb
Refactor and improve test
caendesilva Apr 14, 2024
6cd4843
Refactor and improve test
caendesilva Apr 14, 2024
6d491fd
Refactor and improve test
caendesilva Apr 14, 2024
f235908
Normalize test style
caendesilva Apr 14, 2024
d2c46cf
Revert "Refactor and improve test"
caendesilva Apr 14, 2024
44ce49e
Refactor and simplify test
caendesilva Apr 14, 2024
ebdd9d7
Reapply "Refactor and improve test"
caendesilva Apr 14, 2024
8353673
Revert "Refactor and improve test"
caendesilva Apr 14, 2024
cb65bce
Reapply "Refactor and improve test"
caendesilva Apr 14, 2024
915be48
Add code spacing
caendesilva Apr 14, 2024
cf55a0d
Setup fresh filesystem instance
caendesilva Apr 14, 2024
0ab37dd
Update MarkdownDocumentTest.php
caendesilva Apr 14, 2024
0a6e5fe
Update MarkdownDocumentTest.php
caendesilva Apr 14, 2024
af60865
Update MarkdownDocumentTest.php
caendesilva Apr 14, 2024
67017ae
Update MarkdownDocumentTest.php
caendesilva Apr 14, 2024
3b1f92b
Update MarkdownDocumentTest.php
caendesilva Apr 14, 2024
57235ca
Add null coalesce to handle missing keys gracefully in test
caendesilva Apr 14, 2024
7ef7e94
Update Pest test names to be more fluent
caendesilva Apr 14, 2024
a1ab7e0
Add newlines
caendesilva Apr 14, 2024
184fbdf
Make class description more fluent
caendesilva Apr 14, 2024
065f5d9
Normalize comment style
caendesilva Apr 14, 2024
fc8756c
Comment test behaviour
caendesilva Apr 14, 2024
87f64a8
Fix comment link
caendesilva Apr 14, 2024
870a96d
Move down comment
caendesilva Apr 14, 2024
cf5f2cf
Clean up and improve test
caendesilva Apr 14, 2024
2894fad
Merge data assembly
caendesilva Apr 14, 2024
1c7eabf
Refactor to use unit test case
caendesilva Apr 14, 2024
a6dd1e2
Inline local variable
caendesilva Apr 14, 2024
7d7d864
Split comma-separated values into multiple lines
caendesilva Apr 14, 2024
0ee9fd0
Fix formatting
caendesilva Apr 14, 2024
b6a93a6
Refactor and improve code quality of test
caendesilva Apr 14, 2024
13c5e30
Use assert same instead of assert equals
caendesilva Apr 14, 2024
0c45975
Remove extra newline
caendesilva Apr 14, 2024
f77f2e7
Use assert same instead of assert equals
caendesilva Apr 14, 2024
896d1eb
Add code spacing
caendesilva Apr 14, 2024
76d453d
Convert concatenation to string interpolation
caendesilva Apr 14, 2024
002c3da
Simplify helper method parameter
caendesilva Apr 14, 2024
9f89742
Clean up and improve test
caendesilva Apr 14, 2024
df3a124
Add code spacing
caendesilva Apr 14, 2024
50eb5fc
Better test type handling
caendesilva Apr 14, 2024
db90323
Code formatting
caendesilva Apr 14, 2024
e960329
Create temporary helper for property state assertions
caendesilva Apr 14, 2024
a054cef
Assert object has property
caendesilva Apr 14, 2024
dab4eca
Void method
caendesilva Apr 14, 2024
7da2bb5
Inline temporary method
caendesilva Apr 14, 2024
67dfcae
Revert testing helper change in file
caendesilva Apr 14, 2024
0ad2ac4
Sort imports
caendesilva Apr 14, 2024
7fb0fe2
Refactor and cleanup test
caendesilva Apr 14, 2024
9fbde3b
Add code spacing
caendesilva Apr 14, 2024
886d457
Update faulty test to match real type
caendesilva Apr 14, 2024
27948de
Use assert same instead of assert equals
caendesilva Apr 14, 2024
caaa980
Add missing method annotation
caendesilva Apr 14, 2024
a0ca7d4
Use assert same instead of assert equals
caendesilva Apr 14, 2024
30cb896
Add 'void' as the function's return type
caendesilva Apr 14, 2024
d06ef09
Protect testing helper
caendesilva Apr 14, 2024
2f6f164
Format comment
caendesilva Apr 14, 2024
40bab5b
Add spacing
caendesilva Apr 14, 2024
a2f63c9
Make test method names clearer
caendesilva Apr 14, 2024
97fbdaa
Add clearer testing helper method
caendesilva Apr 14, 2024
ecf7f0c
Inline helper method
caendesilva Apr 14, 2024
df9dcb5
Verify mockery expectations in teardown
caendesilva Apr 14, 2024
5a525f2
Convert arrow functions to traditional closures
caendesilva Apr 14, 2024
d790db5
Fix code spacing
caendesilva Apr 14, 2024
a250c99
Apply fixes from StyleCI
StyleCIBot Apr 14, 2024
1641cbb
Remove kernel setup with no effect
caendesilva Apr 14, 2024
c6c4d9d
Merge branch 'code-cleanup' of github.com:hydephp/develop into code-c…
caendesilva Apr 14, 2024
5c40156
Extract helper method for repeated code
caendesilva Apr 14, 2024
9bd9876
Use fluent assertion syntax
caendesilva Apr 14, 2024
43d78c9
Actually assert that files are searched for and found
caendesilva Apr 14, 2024
a148cc5
Formatting
caendesilva Apr 14, 2024
466a9ed
Reset the kernel instance
caendesilva Apr 14, 2024
6c9a6ac
Setup kernel instance
caendesilva Apr 14, 2024
e14b152
Granularly reset kernel instance
caendesilva Apr 14, 2024
fceb5c4
Tap created instance to shorten helper
caendesilva Apr 14, 2024
4565b50
Extract testing helper trait
caendesilva Apr 14, 2024
4b948df
Clarify test trait name
caendesilva Apr 14, 2024
a7ea042
Use kernel state shorthand
caendesilva Apr 14, 2024
122b231
Use config state shorthand
caendesilva Apr 14, 2024
524e03e
Use kernel and config state shorthands
caendesilva Apr 14, 2024
36fe450
Clean up test
caendesilva Apr 14, 2024
0328eba
Inline evaluated true type
caendesilva Apr 14, 2024
25d14b2
Clean up test class
caendesilva Apr 14, 2024
2fd31c2
Normalize line order
caendesilva Apr 14, 2024
20027cb
Use assert same for scalar types
caendesilva Apr 14, 2024
a38f198
Split out extra unit tests
caendesilva Apr 14, 2024
a2bd956
Convert helper method to constant
caendesilva Apr 14, 2024
4eb46d3
Shorten test constant
caendesilva Apr 15, 2024
baa74e5
Merge branch 'master' into code-cleanup
caendesilva Apr 15, 2024
b277750
Add missing return type
caendesilva Apr 15, 2024
cbf64be
Strongly type void return type
caendesilva Apr 15, 2024
c254ec4
Annotate contracted parameter type
caendesilva Apr 15, 2024
f238842
Strongly type parameter type
caendesilva Apr 15, 2024
7bdce6f
Strongly type parameter type
caendesilva Apr 15, 2024
485fddc
Shift return logic to split out null from void return
caendesilva Apr 15, 2024
2a41439
Convert concatenation to 'sprintf()' call
caendesilva Apr 15, 2024
cb0b3e6
Split string in two strings and concatenation
caendesilva Apr 15, 2024
6b8cc0b
Remove private properties that are never read
caendesilva Apr 15, 2024
3fe1554
Annotate received type
caendesilva Apr 15, 2024
6d10acb
Use the filesystem unlinking helper
caendesilva Apr 15, 2024
73afc60
Normalize filesystem calls
caendesilva Apr 15, 2024
fc05ff7
Annotate the accessed matter value
caendesilva Apr 15, 2024
16051dc
Annotate class string generics
caendesilva Apr 15, 2024
f190cd5
Add tests for all cases
caendesilva Apr 15, 2024
b6bb87e
Test sharing invalid type
caendesilva Apr 15, 2024
fc4ac44
Add additional test case
caendesilva Apr 15, 2024
f1a27e0
Narrow down return mixed parameter type
caendesilva Apr 15, 2024
a40611f
Refactor feature test to be unit test
caendesilva Apr 15, 2024
c495cfd
Move unit test to unit namespace
caendesilva Apr 15, 2024
006e3c0
Changed mixed type annotation to scalar
caendesilva Apr 15, 2024
e2f6e02
Simplify type annotation
caendesilva Apr 15, 2024
6787782
Narrow down return type for never null value
caendesilva Apr 15, 2024
d25d274
Annotate enum string type
caendesilva Apr 15, 2024
dc52c62
Add type annotation for known string type
caendesilva Apr 15, 2024
6161425
Annotate accessed value
caendesilva Apr 15, 2024
cc921fc
Introduce local variable
caendesilva Apr 15, 2024
3493a79
Add type annotation
caendesilva Apr 15, 2024
5639094
Call method directly instead of with function
caendesilva Apr 15, 2024
d8e17ee
Use assert same instead of assert equals
caendesilva Apr 15, 2024
354ecd6
Tap result
caendesilva Apr 15, 2024
fca9968
Revert "Tap result"
caendesilva Apr 15, 2024
24bbb15
Extract variable to ensure return type
caendesilva Apr 15, 2024
f8c7d74
Use better typed helper
caendesilva Apr 15, 2024
219c4a3
Refactor command to use the process facade
caendesilva Apr 15, 2024
416862a
Refactor to fake processes
caendesilva Apr 15, 2024
21d6625
Annotate parameter generics
caendesilva Apr 15, 2024
e427be9
Fix type annotation location
caendesilva Apr 15, 2024
f307f87
Introduce local variable
caendesilva Apr 15, 2024
bf2731d
Add type annotation
caendesilva Apr 15, 2024
8b662e4
Add code spacing
caendesilva Apr 15, 2024
d056e92
Add type assertion
caendesilva Apr 15, 2024
41207db
Import used functions
caendesilva Apr 15, 2024
416e2cb
Add code spacing
caendesilva Apr 15, 2024
80a5ea6
Implode long concatenated string
caendesilva Apr 15, 2024
36b1a20
Replace ternary expression with if/else block
caendesilva Apr 15, 2024
92def7b
Introduce type annotated variable
caendesilva Apr 15, 2024
86a8fc1
Introduce type annotated variable
caendesilva Apr 15, 2024
bdeac99
Add spacing
caendesilva Apr 15, 2024
1c085e2
Add clarifying parentheses
caendesilva Apr 15, 2024
66fe0ae
Remove redundant argument
caendesilva Apr 15, 2024
db5a0ea
Clean up the test
caendesilva Apr 15, 2024
39c29fb
Add code newlines
caendesilva Apr 15, 2024
f1b5399
Introduce type annotated variable
caendesilva Apr 15, 2024
8e10892
Add array generics to method annotation
caendesilva Apr 15, 2024
8ce37cb
Refactor smart glob implementation
caendesilva Apr 15, 2024
6f1923b
Add null coalesce
caendesilva Apr 15, 2024
58c3775
Change collection syntax
caendesilva Apr 15, 2024
83ffced
Introduce type annotated variable
caendesilva Apr 15, 2024
87eaa59
Revert "Refactor smart glob implementation"
caendesilva Apr 15, 2024
14b588f
Remove unnecessary values call
caendesilva Apr 15, 2024
6829426
Shift type annotation to base instance
caendesilva Apr 15, 2024
2a5a9ea
Rename local variable
caendesilva Apr 15, 2024
77e8127
Remove old todo marker
caendesilva Apr 15, 2024
622072d
Flip ternary expression operators
caendesilva Apr 15, 2024
998c54d
Comment code reasoning
caendesilva Apr 15, 2024
ebadfbf
Document why cache is not needed
caendesilva Apr 15, 2024
f3e3ee8
Call static methods statically
caendesilva Apr 15, 2024
755a0b6
Use assert same instead of assert equals
caendesilva Apr 15, 2024
f2dfab5
Refactor test to use unit test case
caendesilva Apr 15, 2024
d6d5a0e
Move test to unit namespace
caendesilva Apr 15, 2024
3cb3c0f
Update link to be openable by PhpStorm
caendesilva Apr 15, 2024
cf2af14
Clean up code
caendesilva Apr 15, 2024
896e17c
Update outdated kernel access documentation
caendesilva Apr 15, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Normalize code style
  • Loading branch information
caendesilva committed Apr 14, 2024
commit e724e6dfbec6620be82c38deea174e00082e25f2
Original file line number Diff line number Diff line change
@@ -25,6 +25,7 @@ public function testDynamicDataConstructorCanFindTitleFromFrontMatter()
{
$this->markdown('_pages/foo.md', '# Foo Bar', ['title' => 'My Title']);
$page = MarkdownPage::parse('foo');

$this->assertSame('My Title', $page->title);
}

@@ -47,8 +48,8 @@ public function testDynamicDataConstructorCanFindTitleFromSlug()
public function testDocumentationPageParserCanGetGroupFromFrontMatter()
{
$this->markdown('_docs/foo.md', '# Foo Bar', ['navigation.group' => 'foo']);

$page = DocumentationPage::parse('foo');

$this->assertSame('foo', $page->navigationMenuGroup());
}

Loading