Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #900 from doctrine/3.0.x-merge-up-into-master_5eda…
…7af9b7ab38.58753752 Merge release 3.0.2 into master
- Loading branch information
Showing
3 changed files
with
95 additions
and
24 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
43 changes: 43 additions & 0 deletions
43
tests/Doctrine/Tests/Common/Proxy/MagicSetClassWithScalarTypeAndRenamedParameters.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,43 @@ | ||
<?php | ||
|
||
namespace Doctrine\Tests\Common\Proxy; | ||
|
||
/** | ||
* Test asset class | ||
*/ | ||
class MagicSetClassWithScalarTypeAndRenamedParameters | ||
{ | ||
/** | ||
* @var string | ||
*/ | ||
public $id = 'id'; | ||
|
||
/** | ||
* @var string | ||
*/ | ||
public $publicField = 'publicField'; | ||
|
||
/** | ||
* @var string|null | ||
*/ | ||
public $testAttribute; | ||
|
||
/** | ||
* @param string $n | ||
* @param mixed $val | ||
* | ||
* @throws \BadMethodCallException | ||
*/ | ||
public function __set($n, $val) | ||
{ | ||
if ($n === 'test') { | ||
$this->testAttribute = $val; | ||
} | ||
|
||
if ($n === 'publicField' || $n === 'id') { | ||
throw new \BadMethodCallException('Should never be called for "publicField" or "id"'); | ||
} | ||
|
||
$this->testAttribute = $val; | ||
} | ||
} |
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