From c36333ae0790440c47a682db955e88a487ab9b64 Mon Sep 17 00:00:00 2001 From: Martin Konecny Date: Fri, 10 May 2013 12:37:25 -0400 Subject: [PATCH] code cleanup -user proper method for checking null -reduce line length to 80 chars --- airtime_mvc/application/models/MusicDir.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/airtime_mvc/application/models/MusicDir.php b/airtime_mvc/application/models/MusicDir.php index 117d06f40..08b2b2649 100644 --- a/airtime_mvc/application/models/MusicDir.php +++ b/airtime_mvc/application/models/MusicDir.php @@ -195,7 +195,7 @@ SQL; $exist_dir = self::getDirByPath($p_path); - if ($exist_dir == NULL) { + if (is_null($exist_dir)) { $temp_dir = new CcMusicDirs(); $dir = new Application_Model_MusicDir($temp_dir); } else { @@ -228,7 +228,12 @@ SQL; return array("code"=>1, "error"=>"$msg"); } catch (Exception $e) { return array("code"=>1, - "error"=>sprintf(_("%s is already set as the current storage dir or in the watched folders list"), $p_path)); + "error" => sprintf( + _("%s is already set as the current storage dir or in the". + " watched folders list"), + $p_path + ) + ); } }