| @@ 121-123 (lines=3) @@ | ||
| 118 | } |
|
| 119 | if ( $bad ) { |
|
| 120 | $bad = array_keys( $bad ); |
|
| 121 | if ( count( $bad ) > 1 ) { |
|
| 122 | $bad[ count( $bad ) - 1 ] = 'or ' . $bad[ count( $bad ) - 1 ]; |
|
| 123 | } |
|
| 124 | throw new \RuntimeException( 'Filename may not contain ' . implode( count( $bad ) > 2 ? ', ' : ' ', $bad ) . '.' ); |
|
| 125 | } |
|
| 126 | ||
| @@ 141-143 (lines=3) @@ | ||
| 138 | }, |
|
| 139 | array_keys( $types ) |
|
| 140 | ); |
|
| 141 | if ( count( $list ) > 1 ) { |
|
| 142 | $list[ count( $list ) - 1 ] = 'or ' . $list[ count( $list ) - 1 ]; |
|
| 143 | } |
|
| 144 | $messages[] = array( 'error', 'Type must be must be ' . implode( count( $list ) > 2 ? ', ' : ' ', $list ) . '.', $diagnostics['lines']['Type'] ); |
|
| 145 | } |
|
| 146 | } |
|