public static function create($method, DataSource $annotation = null) {
        Str::assert($method, 'method');

        $annotationStatusCodes = !empty($annotation) && $annotation->getStatusCodes() !== null ? $annotation->getStatusCodes() : array();
        return $annotationStatusCodes ?: self::$expectedStatusCodes[$method];
    }
public static function create($method, DataSource $annotation = null) {
        Str::assert($method, 'method');

        $annotationStatusCodes = !empty($annotation) && $annotation->getStatusCodes() !== null ? $annotation->getStatusCodes() : array();
        return $annotationStatusCodes ?: self::$expectedStatusCodes[$method];
    }
public static function create ( $ method , DataSource $ annotation = null ) { Str :: assert ( $ method , 'method' ) ; $ annotationStatusCodes = ! empty ( $ annotation ) && $ annotation -> getStatusCodes ( ) !== null ? $ annotation -> getStatusCodes ( ) : array ( ) ; return $ annotationStatusCodes ? : self :: $ expectedStatusCodes [ $ method ] ; }
returns the status code depending on its input

@param  string     $method
@param  DataSource $annotation
@return string

@SuppressWarnings("PHPMD.StaticAccess")
returns the status code depending on its input