@@ 119-121 (lines=3) @@ | ||
116 | } |
|
117 | if ( $bad ) { |
|
118 | $bad = array_keys( $bad ); |
|
119 | if ( count( $bad ) > 1 ) { |
|
120 | $bad[ count( $bad ) - 1 ] = 'or ' . $bad[ count( $bad ) - 1 ]; |
|
121 | } |
|
122 | throw new \RuntimeException( 'Filename may not contain ' . implode( count( $bad ) > 2 ? ', ' : ' ', $bad ) . '.' ); |
|
123 | } |
|
124 |
@@ 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 | } |