maj nulib-base
This commit is contained in:
		
							parent
							
								
									bed69e6081
								
							
						
					
					
						commit
						45ad56b201
					
				
							
								
								
									
										9
									
								
								.idea/php.xml
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										9
									
								
								.idea/php.xml
									
									
									
										generated
									
									
									
								
							| @ -54,12 +54,21 @@ | ||||
|       <path value="$PROJECT_DIR$/vendor/sebastian/resource-operations" /> | ||||
|       <path value="$PROJECT_DIR$/vendor/myclabs/php-enum" /> | ||||
|       <path value="$PROJECT_DIR$/vendor/symfony/polyfill-mbstring" /> | ||||
|       <path value="$PROJECT_DIR$/vendor/symfony/deprecation-contracts" /> | ||||
|       <path value="$PROJECT_DIR$/vendor/symfony/yaml" /> | ||||
|       <path value="$PROJECT_DIR$/vendor/symfony/polyfill-ctype" /> | ||||
|       <path value="$PROJECT_DIR$/vendor/nulib/base" /> | ||||
|     </include_path> | ||||
|   </component> | ||||
|   <component name="PhpProjectSharedConfiguration" php_language_level="7.4" /> | ||||
|   <component name="PhpStanOptionsConfiguration"> | ||||
|     <option name="transferred" value="true" /> | ||||
|   </component> | ||||
|   <component name="PhpUnit"> | ||||
|     <phpunit_settings> | ||||
|       <PhpUnitSettings custom_loader_path="$PROJECT_DIR$/vendor/autoload.php" /> | ||||
|     </phpunit_settings> | ||||
|   </component> | ||||
|   <component name="PsalmOptionsConfiguration"> | ||||
|     <option name="transferred" value="true" /> | ||||
|   </component> | ||||
|  | ||||
| @ -1,7 +1,7 @@ | ||||
| <?php | ||||
| namespace nulib\ext\phpss; | ||||
| 
 | ||||
| use nulib\ValueException; | ||||
| use nulib\exceptions; | ||||
| use PhpOffice\PhpSpreadsheet\Cell\Coordinate; | ||||
| use PhpOffice\PhpSpreadsheet\Spreadsheet; | ||||
| use PhpOffice\PhpSpreadsheet\Worksheet\Worksheet; | ||||
| @ -13,14 +13,14 @@ class wsutils { | ||||
|     } elseif (is_numeric($wsname)) { | ||||
|       $sheetCount = $ss->getSheetCount(); | ||||
|       if ($wsname < 1 || $wsname > $sheetCount) { | ||||
|         throw ValueException::invalid_value($wsname, "sheet index"); | ||||
|         throw exceptions::invalid_value($wsname, "sheet index"); | ||||
|       } | ||||
|       $ws = $ss->getSheet($wsname - 1); | ||||
|     } else { | ||||
|       $ws = $ss->getSheetByName($wsname); | ||||
|       if ($ws === null) { | ||||
|         if ($create) $ws = $ss->createSheet()->setTitle($wsname); | ||||
|         else throw ValueException::invalid_value($wsname, "sheet name"); | ||||
|         else throw exceptions::invalid_value($wsname, "sheet name"); | ||||
|       } | ||||
|     } | ||||
|     return $ws; | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user