forked from 1EdTech/lti-1-3-php-library
-
Notifications
You must be signed in to change notification settings - Fork 24
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
Final changes #123
Merged
Merged
Final changes #123
Changes from all commits
Commits
Show all changes
33 commits
Select commit
Hold shift + click to select a range
53d3cf0
Implement some changes
dbhynds 9590f42
Change a few more things
dbhynds 2aa7074
Type a few things
dbhynds c83e288
A few more chagnes
dbhynds 881b66c
Add code coverage
dbhynds e8e18db
Bump phpunit version
dbhynds 7eaafac
Use xdebug maybe
dbhynds df33cce
Separate test
dbhynds ec64318
Simplify it
dbhynds d248598
Typo
dbhynds 7394ef1
Don't use debug mode
dbhynds 1503f82
Add badges
dbhynds ab54c47
On one line
dbhynds eeddd3a
Run tests weekly
dbhynds 759e469
Abstract stuff
dbhynds 8679ca0
Abstract stuff
dbhynds 46e9f7e
Move deep link stuff
dbhynds 92ff67f
Move has dimensions
dbhynds 4678da0
Merge branch 'fix-todos' into final-changes
dbhynds 7a66e36
Move objects again
dbhynds 12c24af
Merge branch 'fix-todos' into final-changes
dbhynds 5f464b9
Merge branch 'fix-todos' into final-changes
dbhynds 0267ef0
Merge branch 'v6-deep-link' into final-changes
dbhynds b8e7f33
Add a helper to clean up arrayable
dbhynds d7482d7
Abstract null array filter
dbhynds d81abc8
Make Arrayable and Jsonable concerns
dbhynds b1e9cc7
Merge branch 'v6.0-beta' into final-changes
dbhynds 2df843d
reorder methods
dbhynds d486058
Resolve some issues
dbhynds 1a86e9e
Fix name
dbhynds 08bb46e
Fix if
dbhynds 8c4f412
Merge branch 'v6-deep-link' into final-changes
dbhynds 9dea6df
Add missing interface method
dbhynds File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,13 @@ | ||
name: Tests & style checks | ||
name: Tests & Style Checks | ||
on: | ||
# Trigger on any PR being opened, or on a merge to master (to update the badge) | ||
# Trigger on any PR being opened | ||
pull_request: | ||
# Or weekly and on a merge to master (to update the badge) | ||
push: | ||
branches: | ||
- master | ||
schedule: | ||
- cron: 0 0 * * 0 | ||
jobs: | ||
lint: | ||
name: Lint | ||
|
@@ -34,3 +37,19 @@ jobs: | |
composer-options: "${{ matrix.composer-options }}" | ||
- name: Run tests | ||
run: composer test | ||
|
||
coverage: | ||
name: Code Coverage | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: "actions/checkout@v3" | ||
- uses: "shivammathur/setup-php@v2" | ||
with: | ||
php-version: latest | ||
coverage: xdebug | ||
- uses: "ramsey/composer-install@v2" | ||
- uses: paambaati/[email protected] | ||
env: | ||
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }} | ||
with: | ||
coverageCommand: composer test |
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 |
---|---|---|
|
@@ -15,4 +15,5 @@ tests/_support/_generated/* | |
vendor | ||
|
||
# ignore the coverage folders | ||
**/.phpunit.cache | ||
**/coverage |
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,15 @@ | ||
<?php | ||
|
||
namespace Packback\Lti1p3\Concerns; | ||
|
||
use Packback\Lti1p3\Helpers\Helpers; | ||
|
||
trait Arrayable | ||
{ | ||
abstract public function getArray(): array; | ||
|
||
public function toArray(): array | ||
{ | ||
return Helpers::filterOutNulls($this->getArray()); | ||
} | ||
} |
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,13 @@ | ||
<?php | ||
|
||
namespace Packback\Lti1p3\Concerns; | ||
|
||
trait JsonStringable | ||
{ | ||
use Arrayable; | ||
|
||
public function __toString(): string | ||
{ | ||
return json_encode($this->toArray()); | ||
} | ||
} |
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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm guessing the
getArray()
is just how the model is returned? I was wondering why this was named so generically.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Correct. I need something that builds the potential array of properties before sending in through the various concerns for processing. I settled on
getArray()
but am open to suggestions for a better way to name this.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is fine, I could understand what it was doing by just looking at the function.