Skip to content

Commit

Permalink
fix(IRelationship): Update type hints to satisfy IRelationship inte…
Browse files Browse the repository at this point in the history
…rface
  • Loading branch information
elpete committed Mar 12, 2024
1 parent 55dd301 commit 026d7e0
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
6 changes: 3 additions & 3 deletions models/Relationships/BaseRelationship.cfc
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ component accessors="true" {
*
* @return BaseRelationship
*/
public BaseRelationship function setRelationMethodName( required string name ) {
public any function setRelationMethodName( required string name ) {
variables.relationMethodName = arguments.name;
return this;
}
Expand Down Expand Up @@ -306,7 +306,7 @@ component accessors="true" {
*
* @return quick.models.Relationships.BaseRelationship
*/
public BaseRelationship function withDefault( any attributes = {} ) {
public any function withDefault( any attributes = {} ) {
variables.returnDefaultEntity = true;
variables.defaultAttributes = arguments.attributes;
return this;
Expand All @@ -319,7 +319,7 @@ component accessors="true" {
*
* @return quick.models.Relationships.BaseRelationship
*/
public BaseRelationship function applyAliasSuffix( required string suffix ) {
public any function applyAliasSuffix( required string suffix ) {
variables.relationshipBuilder.withAlias( variables.related.tableName() & arguments.suffix );
return this;
}
Expand Down
2 changes: 1 addition & 1 deletion models/Relationships/BelongsToMany.cfc
Original file line number Diff line number Diff line change
Expand Up @@ -579,7 +579,7 @@ component extends="quick.models.Relationships.BaseRelationship" accessors="true"
*
* @return quick.models.Relationships.HasManyThrough
*/
public BelongsToMany function applyAliasSuffix( required string suffix ) {
public any function applyAliasSuffix( required string suffix ) {
variables.tableSuffix = arguments.suffix;
variables.table = "#variables.table# #variables.table##suffix#";
super.applyAliasSuffix( argumentCollection = arguments );
Expand Down
2 changes: 1 addition & 1 deletion models/Relationships/BelongsToThrough.cfc
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ component extends="quick.models.Relationships.BaseRelationship" {
*
* @return quick.models.Relationships.BelongsToThrough
*/
public BelongsToThrough function applyAliasSuffix( required string suffix ) {
public any function applyAliasSuffix( required string suffix ) {
return this;
}

Expand Down
2 changes: 1 addition & 1 deletion models/Relationships/HasOneOrManyThrough.cfc
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ component extends="quick.models.Relationships.BaseRelationship" accessors="true"
*
* @return quick.models.Relationships.HasOneOrManyThrough
*/
public HasOneOrManyThrough function applyAliasSuffix( required string suffix ) {
public any function applyAliasSuffix( required string suffix ) {
return this;
}

Expand Down
8 changes: 4 additions & 4 deletions models/Relationships/IRelationship.cfc
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ interface displayname="IRelationship" {
*
* @name The relation method name for this relationship.
*
* @return IRelationship
* @return quick.models.Relationships.IRelationship
*/
public IRelationship function setRelationMethodName( required string name );
public any function setRelationMethodName( required string name );

/**
* Retrieves the entities for eager loading.
Expand Down Expand Up @@ -139,7 +139,7 @@ interface displayname="IRelationship" {
*
* @return quick.models.Relationships.IRelationship
*/
public IRelationship function withDefault( any attributes );
public any function withDefault( any attributes );

/**
* Applies a suffix to an alias for the relationship.
Expand All @@ -148,7 +148,7 @@ interface displayname="IRelationship" {
*
* @return quick.models.Relationships.IRelationship
*/
public IRelationship function applyAliasSuffix( required string suffix );
public any function applyAliasSuffix( required string suffix );

/**
* Retrieves the current query builder instance.
Expand Down

0 comments on commit 026d7e0

Please sign in to comment.