| @@ 148-150 (lines=3) @@ | ||
| 145 | }, |
|
| 146 | array_keys( $types ) |
|
| 147 | ); |
|
| 148 | if ( count( $list ) > 1 ) { |
|
| 149 | $list[ count( $list ) - 1 ] = 'or ' . $list[ count( $list ) - 1 ]; |
|
| 150 | } |
|
| 151 | $messages[] = array( 'error', 'Type must be ' . implode( count( $list ) > 2 ? ', ' : ' ', $list ) . '.', $diagnostics['lines']['Type'] ); |
|
| 152 | } |
|
| 153 | } |
|
| @@ 120-122 (lines=3) @@ | ||
| 117 | } |
|
| 118 | if ( $bad ) { |
|
| 119 | $bad = array_keys( $bad ); |
|
| 120 | if ( count( $bad ) > 1 ) { |
|
| 121 | $bad[ count( $bad ) - 1 ] = 'or ' . $bad[ count( $bad ) - 1 ]; |
|
| 122 | } |
|
| 123 | throw new \RuntimeException( 'Filename may not contain ' . implode( count( $bad ) > 2 ? ', ' : ' ', $bad ) . '.' ); |
|
| 124 | } |
|
| 125 | ||