Last active
June 13, 2022 18:47
-
-
Save DominikStyp/25c7d6b61708603cce680115c092bbfb to your computer and use it in GitHub Desktop.
PHPStorm + Deep Assoc Complete
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
<?php | |
class MyRepository { | |
/** | |
* | |
* | |
* @param $filter = [ | |
* "id" => "uuid", | |
* "version" => "2022-02-03 12:11:00", | |
* "name" => "some document name", | |
* "access_level" => [ | |
* \App\Enums\DocumentAccessLevelEnum::INVESTOR, | |
* \App\Enums\DocumentAccessLevelEnum::FUND_MANAGER, | |
* \App\Enums\DocumentAccessLevelEnum::INVESTOR_ACCOUNT, | |
* ][$any], | |
* "privacy_level" => [ | |
* \App\Enums\DocumentPrivacyLevelEnum::LOW, | |
* \App\Enums\DocumentPrivacyLevelEnum::MEDIUM_LOW, | |
* \App\Enums\DocumentPrivacyLevelEnum::MEDIUM, | |
* \App\Enums\DocumentPrivacyLevelEnum::MEDIUM_HIGH, | |
* \App\Enums\DocumentPrivacyLevelEnum::HIGH, | |
* ][$any], | |
* "creation_time" => "Y-m-d H:i:s", | |
* ] | |
* | |
* @return Document[]|Collection<Document> | |
* | |
*/ | |
public function all( | |
array $filter = [] | |
): Collection { | |
$builder = $this->newQueryBuilder($filter); | |
return $this->resource->all($builder); | |
} | |
} |
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
<?php | |
// IMPORTANT! We get autocompletion only inside the string quotes (or double quotes) where the dots are | |
$obj = new MyRepository(); | |
$obj->all([ | |
'....' => '.....' | |
]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment