@@ -40,7 +40,7 @@ discard block |
||
40 | 40 | public static function signUrlForGoogle(string $sUrlToSign, string $sClientId, string $sPrivateKey) : string |
41 | 41 | { |
42 | 42 | $aUrl = parse_url($sUrlToSign); |
43 | - $aUrl['query'] .= '&client=' .$sClientId; |
|
43 | + $aUrl['query'] .= '&client='.$sClientId; |
|
44 | 44 | |
45 | 45 | $aUrlToSign = $aUrl['path']."?".$aUrl['query']; |
46 | 46 | |
@@ -50,8 +50,8 @@ discard block |
||
50 | 50 | |
51 | 51 | $sEncodedSignature = str_replace(array('+', '/'), array('-', '_'), base64_encode($sSignature)); |
52 | 52 | |
53 | - $sOriginalUrl = $aUrl['scheme']."://".$aUrl['host'].$aUrl['path'] . "?".$aUrl['query']; |
|
53 | + $sOriginalUrl = $aUrl['scheme']."://".$aUrl['host'].$aUrl['path']."?".$aUrl['query']; |
|
54 | 54 | |
55 | - return $sOriginalUrl. '&signature='. $sEncodedSignature; |
|
55 | + return $sOriginalUrl.'&signature='.$sEncodedSignature; |
|
56 | 56 | } |
57 | 57 | } |
@@ -34,7 +34,7 @@ |
||
34 | 34 | public function set(string $name, string $value = null) : Headers |
35 | 35 | { |
36 | 36 | if ($value !== null) { |
37 | - header($name . ': ' . $value); |
|
37 | + header($name.': '.$value); |
|
38 | 38 | } |
39 | 39 | else { |
40 | 40 | header($name); |
@@ -72,13 +72,13 @@ discard block |
||
72 | 72 | |
73 | 73 | if (!file_exists($sPrivatePath.'Controller')) { |
74 | 74 | |
75 | - mkdir($sPublicPath . 'css', 0777, true); |
|
76 | - mkdir($sPublicPath . 'js', 0777, true); |
|
77 | - mkdir($sPublicPath . 'img', 0777, true); |
|
75 | + mkdir($sPublicPath.'css', 0777, true); |
|
76 | + mkdir($sPublicPath.'js', 0777, true); |
|
77 | + mkdir($sPublicPath.'img', 0777, true); |
|
78 | 78 | } |
79 | 79 | else { |
80 | 80 | |
81 | - echo 'The Project (public part) ' . $sPrivatePath . " exists\n"; |
|
81 | + echo 'The Project (public part) '.$sPrivatePath." exists\n"; |
|
82 | 82 | } |
83 | 83 | } |
84 | 84 | |
@@ -91,16 +91,16 @@ discard block |
||
91 | 91 | |
92 | 92 | if (!file_exists($sPrivatePath.'Controller')) { |
93 | 93 | |
94 | - mkdir($sPrivatePath . 'Controller', 0777, true); |
|
95 | - mkdir($sPrivatePath . 'Entity', 0777, true); |
|
96 | - mkdir($sPrivatePath . 'Model', 0777, true); |
|
97 | - mkdir($sPrivatePath . 'View', 0777, true); |
|
98 | - mkdir($sPrivatePath . 'conf', 0777, true); |
|
99 | - mkdir($sPrivatePath . 'common', 0777, true); |
|
94 | + mkdir($sPrivatePath.'Controller', 0777, true); |
|
95 | + mkdir($sPrivatePath.'Entity', 0777, true); |
|
96 | + mkdir($sPrivatePath.'Model', 0777, true); |
|
97 | + mkdir($sPrivatePath.'View', 0777, true); |
|
98 | + mkdir($sPrivatePath.'conf', 0777, true); |
|
99 | + mkdir($sPrivatePath.'common', 0777, true); |
|
100 | 100 | } |
101 | 101 | else { |
102 | 102 | |
103 | - echo 'The Project (private part) ' . $sPrivatePath . " exists\n"; |
|
103 | + echo 'The Project (private part) '.$sPrivatePath." exists\n"; |
|
104 | 104 | } |
105 | 105 | |
106 | 106 | $sContent = file_get_contents(__DIR__.DIRECTORY_SEPARATOR.'..'.DIRECTORY_SEPARATOR.'common'.DIRECTORY_SEPARATOR.'Controller.php'); |
@@ -37,10 +37,10 @@ |
||
37 | 37 | |
38 | 38 | foreach ($controllerFiles as $oneController) { |
39 | 39 | |
40 | - if (is_file(__DIR__.'/../../../../tests/'.$one.'/app/Controller/' . $oneController) && $oneController != '..' && $oneController != '.') { |
|
40 | + if (is_file(__DIR__.'/../../../../tests/'.$one.'/app/Controller/'.$oneController) && $oneController != '..' && $oneController != '.') { |
|
41 | 41 | |
42 | 42 | $unitTest = new \PHPUnit_TextUI_Command; |
43 | - $unitTest->run([__DIR__.'/../../../../tests/'.$one.'/app/Controller/' . $oneController]); |
|
43 | + $unitTest->run([__DIR__.'/../../../../tests/'.$one.'/app/Controller/'.$oneController]); |
|
44 | 44 | } |
45 | 45 | } |
46 | 46 | } |
@@ -14,7 +14,7 @@ discard block |
||
14 | 14 | * |
15 | 15 | * new version with SPL to have the capacity to add external autoload |
16 | 16 | */ |
17 | -spl_autoload_register(function (string $sClassName) |
|
17 | +spl_autoload_register(function(string $sClassName) |
|
18 | 18 | { |
19 | 19 | |
20 | 20 | $sClassName = ltrim($sClassName, '\\'); |
@@ -26,7 +26,7 @@ discard block |
||
26 | 26 | |
27 | 27 | $sNamespace = substr($sClassName, 0, $iLastNsPos); |
28 | 28 | $sClassName = substr($sClassName, $iLastNsPos + 1); |
29 | - $sFileName = str_replace('\\', DIRECTORY_SEPARATOR, $sNamespace).DIRECTORY_SEPARATOR; |
|
29 | + $sFileName = str_replace('\\', DIRECTORY_SEPARATOR, $sNamespace).DIRECTORY_SEPARATOR; |
|
30 | 30 | } |
31 | 31 | |
32 | 32 | $sFileName = str_replace('/', '\\', $sFileName); |
@@ -61,7 +61,7 @@ |
||
61 | 61 | * @param int $iTimeout expiration of cache |
62 | 62 | * @return mixed |
63 | 63 | */ |
64 | - public function get(string $sName, int &$iFlags = null, int $iTimeout = 0) |
|
64 | + public function get(string $sName, int&$iFlags = null, int $iTimeout = 0) |
|
65 | 65 | { |
66 | 66 | return parent::get($sName); |
67 | 67 | } |
@@ -61,7 +61,7 @@ |
||
61 | 61 | * @param int $iTimeout expiration of cache |
62 | 62 | * @return mixed |
63 | 63 | */ |
64 | - public function get(string $sName, int &$iFlags = null, int $iTimeout = 0) |
|
64 | + public function get(string $sName, int&$iFlags = null, int $iTimeout = 0) |
|
65 | 65 | { |
66 | 66 | return parent::get($sName); |
67 | 67 | } |
@@ -35,9 +35,9 @@ discard block |
||
35 | 35 | */ |
36 | 36 | public static function object_to_array($mObject) : array |
37 | 37 | { |
38 | - if ( is_object($mObject)) { |
|
38 | + if (is_object($mObject)) { |
|
39 | 39 | |
40 | - $mObject = (array) $mObject; |
|
40 | + $mObject = (array)$mObject; |
|
41 | 41 | } |
42 | 42 | |
43 | 43 | |
@@ -45,7 +45,7 @@ discard block |
||
45 | 45 | |
46 | 46 | $aNew = array(); |
47 | 47 | |
48 | - foreach($mObject as $sKey => $mValues) { |
|
48 | + foreach ($mObject as $sKey => $mValues) { |
|
49 | 49 | |
50 | 50 | $sKey = preg_replace("/^\\0(.*)\\0/", "", $sKey); |
51 | 51 | $aNew[$sKey] = self::object_to_array($mValues); |
@@ -74,7 +74,7 @@ discard block |
||
74 | 74 | * @param int $iTimeout expiration of cache |
75 | 75 | * @return mixed |
76 | 76 | */ |
77 | - public function get(string $sName, int &$iFlags = null, int $iTimeout = 0) |
|
77 | + public function get(string $sName, int&$iFlags = null, int $iTimeout = 0) |
|
78 | 78 | { |
79 | 79 | if ($iTimeout > 0 && file_exists($this->_sFolder.$this->_getSubDirectory($sName).md5($sName).'.fil.cac') |
80 | 80 | && time() - filemtime($this->_sFolder.$this->_getSubDirectory($sName).md5($sName).'.fil.cac') > $iTimeout) { |
@@ -84,7 +84,7 @@ discard block |
||
84 | 84 | |
85 | 85 | if (file_exists($this->_sFolder.$this->_getSubDirectory($sName).md5($sName).'.fil.cac')) { |
86 | 86 | |
87 | - return unserialize(file_get_contents($this->_sFolder . $this->_getSubDirectory($sName) . md5($sName) . '.fil.cac')); |
|
87 | + return unserialize(file_get_contents($this->_sFolder.$this->_getSubDirectory($sName).md5($sName).'.fil.cac')); |
|
88 | 88 | } else { |
89 | 89 | |
90 | 90 | return false; |