Skip to content

Commit

Permalink
chore: cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
roxblnfk committed Jul 24, 2024
1 parent 1a73885 commit b72ccfa
Show file tree
Hide file tree
Showing 5 changed files with 53 additions and 8 deletions.
Binary file removed docs/.gitbook/assets/screenshot (1).png
Binary file not shown.
2 changes: 1 addition & 1 deletion docs/general/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ This project uses a Makefile to streamline common development tasks. The Makefil
make help
```

<figure><img src="../.gitbook/assets/screenshot (1).png" alt=""><figcaption><p>visual view of make help command</p></figcaption></figure>
<figure><img src="../.gitbook/assets/screenshot.png" alt=""><figcaption><p>visual view of make help command</p></figcaption></figure>

#### → Key Commands

Expand Down
20 changes: 20 additions & 0 deletions phpstan-baseline.neon
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,16 @@ parameters:
count: 1
path: src/ActiveRecord.php

-
message: "#^Method Cycle\\\\ORM\\\\EntityManagerInterface\\:\\:run\\(\\) invoked with 1 parameter, 0 required\\.$#"
count: 2
path: src/ActiveRecord.php

-
message: "#^Method Cycle\\\\ORM\\\\EntityManagerInterface\\:\\:run\\(\\) invoked with 2 parameters, 0 required\\.$#"
count: 1
path: src/Internal/TransactionFacade.php

-
message: "#^Template type TEntity is declared as covariant, but occurs in contravariant position in parameter select of method Cycle\\\\ActiveRecord\\\\Repository\\\\ActiveRepository\\:\\:with\\(\\)\\.$#"
count: 1
Expand All @@ -25,6 +35,16 @@ parameters:
count: 1
path: tests/src/Functional/ActiveRecordTest.php

-
message: "#^Cannot call method isSuccess\\(\\) on null\\.$#"
count: 1
path: tests/src/Functional/ActiveRecordTest.php

-
message: "#^Result of method Cycle\\\\ActiveRecord\\\\ActiveRecord\\:\\:saveOrFail\\(\\) \\(void\\) is used\\.$#"
count: 1
path: tests/src/Functional/ActiveRecordTest.php

-
message: "#^Call to an undefined method Cycle\\\\Database\\\\Driver\\\\DriverInterface\\:\\:setLogger\\(\\)\\.$#"
count: 1
Expand Down
38 changes: 31 additions & 7 deletions psalm-baseline.xml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<files psalm-version="5.24.0@462c80e31c34e58cc4f750c656be3927e80e550e">
<files psalm-version="5.25.0@01a8eb06b9e9cc6cfb6a320bf9fb14331919d505">
<file src="src/ActiveRecord.php">
<PossiblyUnusedMethod>
<code><![CDATA[deleteOrFail]]></code>
</PossiblyUnusedMethod>
<PossiblyUnusedReturnValue>
<code><![CDATA[EntityManagerInterface]]></code>
<code><![CDATA[EntityManagerInterface]]></code>
</PossiblyUnusedReturnValue>
<TooManyArguments>
<code><![CDATA[run]]></code>
<code><![CDATA[run]]></code>
</TooManyArguments>
</file>
<file src="src/Bridge/Laravel/Providers/ActiveRecordProvider.php">
<UnusedClass>
Expand All @@ -24,26 +24,50 @@
<code><![CDATA[setOrm]]></code>
</PossiblyUnusedMethod>
</file>
<file src="src/Internal/TransactionFacade.php">
<TooManyArguments>
<code><![CDATA[run]]></code>
</TooManyArguments>
</file>
<file src="src/Repository/ActiveRepository.php">
<PossiblyUnusedMethod>
<code><![CDATA[findAll]]></code>
<code><![CDATA[forUpdate]]></code>
</PossiblyUnusedMethod>
</file>
<file src="tests/src/Functional/ActiveRecordTest.php">
<AssignmentToVoid>
<code><![CDATA[$entityManager]]></code>
</AssignmentToVoid>
<NullReference>
<code><![CDATA[isSuccess]]></code>
</NullReference>
<PossiblyUnusedMethod>
<code><![CDATA[it_creates_entity_instance_using_make]]></code>
<code><![CDATA[it_deletes_entity]]></code>
<code><![CDATA[it_deletes_multiple_entities_using_remove_method]]></code>
<code><![CDATA[it_deletes_multiple_entities_in_single_transaction]]></code>
<code><![CDATA[it_finds_all_entities]]></code>
<code><![CDATA[it_finds_entity_by_primary_key]]></code>
<code><![CDATA[it_finds_one_entity]]></code>
<code><![CDATA[it_gets_default_repository_of_entity]]></code>
<code><![CDATA[it_persists_multiple_entities]]></code>
<code><![CDATA[it_persists_multiple_entities_in_single_transaction]]></code>
<code><![CDATA[it_runs_transaction_in_current_transaction_mode_without_opened_transaction]]></code>
<code><![CDATA[it_runs_transaction_in_transaction]]></code>
<code><![CDATA[it_runs_transaction_without_actions]]></code>
<code><![CDATA[it_saves_entity]]></code>
<code><![CDATA[it_triggers_exception_when_tries_to_save_entity_using_save_or_fail]]></code>
<code><![CDATA[it_uses_query_to_select_entity]]></code>
</PossiblyUnusedMethod>
<UndefinedVariable>
<code><![CDATA[$userOne]]></code>
<code><![CDATA[$userOne]]></code>
<code><![CDATA[$userOne]]></code>
<code><![CDATA[$userTwo]]></code>
<code><![CDATA[$userTwo]]></code>
</UndefinedVariable>
<UnusedVariable>
<code><![CDATA[$entityManager]]></code>
</UnusedVariable>
</file>
<file src="tests/src/Functional/Bridge/Spiral/Bootloader/ActiveRecordBootloaderTest.php">
<PossiblyUnusedMethod>
Expand Down
1 change: 1 addition & 0 deletions tests/app/Repository/RepositoryWithActiveQuery.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
use Cycle\ORM\ORMInterface;

/**
* @method UserQuery select()
* @extends ActiveRepository<User>
*/
final class RepositoryWithActiveQuery extends ActiveRepository
Expand Down

0 comments on commit b72ccfa

Please sign in to comment.