Login   Register  
PHP Classes
elePHPant
Icontem

File: DummyClass.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Philipp Strazny  >  Complexity Analyzer  >  DummyClass.php  >  Download  
File: DummyClass.php
Role: Auxiliary data
Content type: text/plain
Description: data for ComplexityAnalyzerTest
Class: Complexity Analyzer
Evaluate the complexity of classes' code
Author: By
Last change:
Date: 2012-01-25 20:15
Size: 649 bytes
 

Contents

Class file image Download
<?php 
/**
 * just for testing/demonstrating ComplexityAnalyzer
 * in conjunction with DummyClassTest.php
 */ 
class DummyClass {

	// method src with 1 paren
	public function levelOneA(){
		return 'levelOneAReturn';
	}
	
	// method src with 2 parens
	public function levelOneB(){
		$dummy = strpos('whatever', 'w');
		return 'levelOneBReturn';
	}
	// method src with 2 parens
	// and inclusion of levelOneA
	public function levelTwo(){
		$a = $this->levelOneA();
		return 'levelTwo + '.$a;
	}
	// method src with 2 parens
	// and inclusion of levelTwo
	public function levelThree(){
		$a = $this->levelTwo();
		return 'levelThree + '.$a;
	}
}


?>