/**
  * Sets the test's $profile property.
  *
  * @param \Pharborist\Objects\ClassNode $test
  */
 private function setProfile(ClassNode $test)
 {
     if (!$test->hasProperty('profile')) {
         $test->appendProperty(ClassMemberNode::create('profile', StringNode::create("'standard'"), 'protected'));
     }
 }
Example #2
0
 /**
  * Creates a clone of this property list and adds it to a class.
  *
  * @param ClassNode $class
  *  The target class.
  *
  * @return static
  *  The cloned property list.
  */
 public function cloneInto(ClassNode $class)
 {
     $clone = clone $this;
     $class->appendProperty($this);
     return $clone;
 }