getStatusHash() public method

Unique string which shows current status of the bundle
public getStatusHash ( ) : string
return string
コード例 #1
0
ファイル: BundleTest.php プロジェクト: KnpLabs/KnpBundles
 /**
  * @test
  */
 public function shouldNotHaveChangesWithOnlyChangedScore()
 {
     $bundle = new Bundle('knplabs/KnpMenuBundle');
     $bundle->setScore(1000);
     $bundle->setReadme('readme number one');
     $bundle->setLastCommitAt(new \DateTime('-10 day'));
     $bundle->setNbFollowers(100);
     $bundle->setNbForks(10);
     $beforeChange = $bundle->getStatusHash();
     $bundle->setScore(1100);
     $afterChange = $bundle->getStatusHash();
     $this->assertEquals($beforeChange, $afterChange);
 }
コード例 #2
0
ファイル: Score.php プロジェクト: KnpLabs/KnpBundles
 /**
  * @param null|Bundle $bundle
  */
 public function setBundle(Bundle $bundle = null)
 {
     $this->bundle = $bundle;
     $this->hash = $bundle->getStatusHash();
 }