-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
- Loading branch information
Showing
6 changed files
with
85 additions
and
4 deletions.
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
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
52 changes: 52 additions & 0 deletions
52
tests/Console/ModelsCommand/Relations/Types/SampleToBadlyNamedNotManyRelationType.php
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,52 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\Relations\Types; | ||
|
||
use Illuminate\Database\Eloquent\Collection; | ||
use Illuminate\Database\Eloquent\Model; | ||
use Illuminate\Database\Eloquent\Relations\Concerns\SupportsDefaultModels; | ||
use Illuminate\Database\Eloquent\Relations\Relation; | ||
|
||
/** | ||
* Sample for custom relation | ||
* | ||
* the relation is a big fake and only for testing of the docblock generation | ||
* | ||
* @package Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\Relations | ||
*/ | ||
class SampleToBadlyNamedNotManyRelationType extends Relation | ||
{ | ||
use SupportsDefaultModels; | ||
|
||
public function addConstraints() | ||
{ | ||
// Fake | ||
} | ||
|
||
public function addEagerConstraints(array $models) | ||
{ | ||
// Fake | ||
} | ||
|
||
public function initRelation(array $models, $relation) | ||
{ | ||
// Fake | ||
} | ||
|
||
public function match(array $models, Collection $results, $relation) | ||
{ | ||
// Fake | ||
} | ||
|
||
public function getResults() | ||
{ | ||
// Fake | ||
} | ||
|
||
protected function newRelatedInstanceFor(Model $parent) | ||
{ | ||
// Fake | ||
} | ||
} |
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