示例#1
0
文件: Property.php 项目: actank/phan
 /**
  * @return FullyQualifiedPropertyName
  * The fully-qualified structural element name of this
  * structural element
  */
 public function getFQSEN() : FQSEN
 {
     // Get the stored FQSEN if it exists
     if ($this->fqsen) {
         return $this->fqsen;
     }
     return FullyQualifiedPropertyName::fromStringInContext($this->getName(), $this->getContext());
 }
示例#2
0
 public function testFullyQualifiedPropertyName()
 {
     $this->assertFQSENEqual(FullyQualifiedPropertyName::make(FullyQualifiedClassName::make('\\Name\\Space', 'a'), 'p'), '\\Name\\Space\\a::p');
     $this->assertFQSENEqual(FullyQualifiedPropertyName::fromFullyQualifiedString('\\Name\\a::p'), '\\Name\\a::p');
     $this->assertFQSENEqual(FullyQualifiedPropertyName::fromFullyQualifiedString('Name\\a::p'), '\\Name\\a::p');
     $this->assertFQSENEqual(FullyQualifiedPropertyName::fromFullyQualifiedString('\\Name\\Space\\a::p,2'), '\\Name\\Space\\a::p,2');
     $this->assertFQSENEqual(FullyQualifiedPropertyName::fromFullyQualifiedString('\\Name\\Space\\a,1::p,2'), '\\Name\\Space\\a,1::p,2');
     $this->assertFQSENEqual(FullyQualifiedPropertyName::fromStringInContext('a::p', $this->context), '\\a::p');
 }