Code Coverage
 
Classes and Traits
Functions and Methods
Lines
Total
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
CRAP
0.00% covered (danger)
0.00%
0 / 7
Sequence
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
12
0.00% covered (danger)
0.00%
0 / 7
 getSegmentNbr()
0.00% covered (danger)
0.00%
0 / 1
12
0.00% covered (danger)
0.00%
0 / 7
<?php
/**
 *
 */
namespace aae\math\geospatial {
    /**
     * @author Axel Ancona Esselmann
     * @package aae\math\geospatial
     */
    class Sequence extends \aae\math\general\Sequence {
        public $name, $segmentStarts = array(0);
        public function getSegmentNbr() {
            $key = $this->key();
            $segmentNbr = 0;
            for ($i=0; $i < count($this->segmentStarts); $i++) {
                if ($key < $this->segmentStarts[$i]) return $segmentNbr;
                $segmentNbr = $i;
            }
            return $segmentNbr;
        }
    }
}