| Total Complexity | 11 |
| Total Lines | 51 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 8 | class DepthChartPositionValidator { |
||
| 9 | private $app; |
||
| 10 | |||
| 11 | public function __construct(Application $app) { |
||
| 13 | } |
||
| 14 | |||
| 15 | public function IsDraftSportValid($draft_sport) { |
||
| 16 | $valid = true; |
||
| 17 | $errors = array(); |
||
| 18 | $draft_sports = $this->app['phpdraft.DraftDataRepository']->GetSports(); |
||
| 19 | |||
| 20 | if (strlen($draft_sport) < 3 || strlen($draft_sport) > 4 || strlen($draft_sports[$draft_sport]) == 0) { |
||
| 21 | $errors[] = "Draft sport is an invalid value."; |
||
| 22 | $valid = false; |
||
| 23 | } |
||
| 24 | |||
| 25 | return $this->app['phpdraft.ResponseFactory']($valid, $errors); |
||
| 26 | } |
||
| 27 | |||
| 28 | public function AreDepthChartPositionsValid(DepthChartPositionCreateModel $depthChartPositionCreateModel) { |
||
| 59 | } |
||
| 60 | } |