30, 'jan', 'mar', 'may', 'jul', 'aug', 'oct', 'dec' => 31, 'feb' => is_leap_year($year) ? 29 : 28, default => throw new InvalidArgumentException("Invalid month"), } } function complexityFourteenWithMatch() { return match(strtolower(substr($monthName, 0, 3))) { 'jan' => 31, 'feb' => is_leap_year($year) ? 29 : 28, 'mar' => 31, 'apr' => 30, 'may' => 31, 'jun' => 30, 'jul' => 31, 'aug' => 31, 'sep' => 30, 'oct' => 31, 'nov' => 30, 'dec' => 31, default => throw new InvalidArgumentException("Invalid month"), }; } function complexitySevenWithNullSafeOperator() { $foo = $object1->getX()?->getY()?->getZ(); $bar = $object2->getX()?->getY()?->getZ(); $baz = $object3->getX()?->getY()?->getZ(); } function complexityElevenWithNullSafeOperator() { $foo = $object1->getX()?->getY()?->getZ(); $bar = $object2->getX()?->getY()?->getZ(); $baz = $object3->getX()?->getY()?->getZ(); $bacon = $object4->getX()?->getY()?->getZ(); $bits = $object5->getX()?->getY()?->getZ(); } ?>