Skip to content

Commit

Permalink
[#12] ColumnWithoutAnnotation: make sure that @property-read and @pro…
Browse files Browse the repository at this point in the history
…perty-write could be used;
  • Loading branch information
rentalhost committed Jun 1, 2017
1 parent 5df15e4 commit 71586c3
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -429,3 +429,19 @@ class EloquentModel_TimestampColumnFromConstant extends Model {
class CC_EloquentModel_TimestampsUndefined extends Model {
protected $timestamps;
}

/**
* @property-read mixed $property_read
* @property-write mixed $property_write
*/
class EloquentModel_PropertyReadAndWriteShouldBeAllowed extends Model
{
public function propertyWrite()
{
$propertyReadAndWrite->property_write;
}
}

$propertyReadAndWrite = new EloquentModel_PropertyReadAndWriteShouldBeAllowed;
$propertyReadAndWrite->property_read;
$propertyReadAndWrite->property_read; // twice
Original file line number Diff line number Diff line change
Expand Up @@ -355,3 +355,19 @@ class EloquentModel_TimestampColumnFromConstant extends Model {
class CC_EloquentModel_TimestampsUndefined extends Model {
protected $timestamps;
}

/**
* @property-read mixed $property_read
* @property-write mixed $property_write
*/
class EloquentModel_PropertyReadAndWriteShouldBeAllowed extends Model
{
public function propertyWrite()
{
$propertyReadAndWrite->property_write;
}
}

$propertyReadAndWrite = new EloquentModel_PropertyReadAndWriteShouldBeAllowed;
$propertyReadAndWrite->property_read;
$propertyReadAndWrite->property_read; // twice

0 comments on commit 71586c3

Please sign in to comment.